Add native mesh file I/O (OBJ, STL, PLY) #1369
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 316 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.345
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1369"
general
weight: 0.35
dhairyashilRG
Description
This PR adds native, zero-dependency mesh I/O utilities (
wp.load_mesh()andwp.save_mesh()) to Warp as per the planCurrently, loading basic test meshes in Warp requires either
pxr.UsdGeom(a massive dependency) or third-party packages liketrimesh. This forces many basic geometry tests and examples to be gated behindUSD_AVAILABLE.This PR implements lightweight, pure-Python parsers for standard mesh formats (Wavefront OBJ, ASCII/Binary STL, and ASCII/Binary PLY) directly into Warp. This is intended to drop the OpenUSD requirement for testing simple geometries and improve onboarding, not to replace high-performance C++ pipelines for massive assets.
Checklist
Test plan
warp/tests/io/test_mesh.py) for OBJ, STL (ASCII/Binary + vertex deduplication), and PLY formats.cube.obj,cube.stl, etc.).uv run --extra dev -m warp.tests -s autodetect -k TestMeshIONew feature / enhancement
Out of scope for this PR: Material/texture loading (.mtl files), animation/sequence loading, and GPU-accelerated parsing (file I/O is CPU-bound).
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Native mesh import/export for OBJ, STL (binary/ASCII), and PLY (binary/ASCII) with zero external dependencies; auto-detection, optional winding flip, and device-aware load/save with round-trip support.
Documentation
Changelog updated and a detailed mesh I/O testing/status document added.
Tests
New unit and validation tests, deterministic mesh assets, and a validation script covering parsing, formats, edge cases, and round-trips.
Examples
Example updated to show alternative mesh-loading via the new I/O.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->