Open
Conversation
The previous implementation converted component boxes (resistors, etc.) to triangulated meshes and placed all triangles in a single ClosedShell. This produced invalid STEP geometry because: 1. Multiple disconnected boxes in one ClosedShell is not a valid manifold 2. Triangular faces don't share edges properly for B-Rep topology The fix creates proper B-Rep box solids using 8 vertices, 12 shared edges, and 6 rectangular faces per component, each as its own ManifoldSolidBrep. Boxes with custom meshes (from external models) still use the triangle approach but are now created as individual solids. Closes tscircuit#6 /claim tscircuit#6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@mendarb is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
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
ClosedShell. This produced invalid B-Rep geometry because multiple disconnected boxes in one shell is not a valid manifold solid, and triangular faces don't share edges properly.createBRepBoxSolidfunction that generates each component as its ownManifoldSolidBrepwith 8 vertices, 12 shared edges, and 6 rectangularAdvancedFaceentities — a valid closed shell. Boxes with custom meshes (from external models) still use the triangle approach but are now individual solids.Before: 26 separate triangle meshes (each just 1 triangle), components invisible in most viewers
After: 3-4 proper solid meshes (board + individual component boxes), all rendering correctly
Test plan
basics07test: verifies 3 resistor boxes appear as proper solids with correct dimensions (3x1.5x1.5mm)occt-import-jsthat each component produces a proper mesh with correct bounding boxbunx biome format --write .appliedCloses #6
/claim #6
🤖 Generated with Claude Code