feat: implement Feature 1 — File Loading#4
Merged
kraulerson merged 10 commits intomainfrom Apr 6, 2026
Merged
Conversation
Brainstormed and approved design for Feature 1 (File Loading). Data-layer only — no UI. Covers MeshData, MeshDocument, load_mesh() API, exception hierarchy, format-specific handling, and test strategy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7-task TDD plan for Feature 1 (File Loading). Covers exception hierarchy, dataclasses, undo stack, MeshDocument, test fixtures, path validation, and load_mesh pipeline. Task 1 complete. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generates cube meshes (8 verts, 12 faces) for STL binary, STL ASCII, OBJ, OBJ+materials, PLY, and 3MF, plus 4 invalid fixtures for error path testing. Adds networkx==3.6.1 and lxml==6.0.2 as required dependencies for trimesh's 3MF loader. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ndling Completes mesh_loader.py with load_mesh(), OBJ warning detection, unit mismatch warnings, and binary STL pre-parse validation to differentiate corrupt vs empty files that trimesh silently swallows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the complete data-layer file loading pipeline for meshscope (Feature 1 of 10 in the MVP Cutline). Loads STL (binary/ASCII), OBJ, 3MF, and PLY mesh files into an in-memory
MeshDocumentwith full validation, error handling, and computed metadata. No UI — viewport integration comes with Feature 2.What's included
MeshLoadError→FileValidationError/MeshParseErrorsubclasses) with user-facing messages ready for UI displayBoundingBox,MeshMetadata,MeshDatafrozen dataclasses) with typed numpy arrays (mypy strict clean)load_mesh()pipeline: validate → detect format → pre-parse STL validation → parse via trimesh (explicitfile_type, never genericload()) → Scene handling for 3MF → convert to data model → OBJ unsupported directive warnings → unit mismatch detection → structured loggingDesign spec deviations (deferred)
source_formatstores"stl"/"ply"rather than sub-types ("stl_binary"/"ply_ascii"). Plan tests assert the simpler form. Can add sub-type detection when UI needs it.parse_meshis inlined inload_meshrather than extracted as a separate function. Can extract if reuse is needed.Test plan
pytest tests/ -v)mypy src/meshscope/)🤖 Generated with Claude Code