Skip to content

fix: separate component solids in STEP output#53

Open
omair445 wants to merge 3 commits intotscircuit:mainfrom
omair445:fix/separate-component-solids-issue-6
Open

fix: separate component solids in STEP output#53
omair445 wants to merge 3 commits intotscircuit:mainfrom
omair445:fix/separate-component-solids-issue-6

Conversation

@omair445
Copy link

hey, figured out why rectangles were missing in the STEP output.

root cause: all component triangles were being merged into a single ClosedShell, creating an invalid STEP solid that viewers silently drop.

fix: each component box now gets its own ManifoldSolidBrep, and defaulted includeComponents to true. the basics04 test case now correctly produces 3 separate solids (board + R1 + C1).

all 11 tests pass.

resolves #6

Previously all component triangles were merged into a single ClosedShell,
which violates STEP's requirement that each ManifoldSolidBrep has a closed,
watertight boundary. Viewers silently drop the invalid merged solid.

Now each component box gets its own ClosedShell and ManifoldSolidBrep,
so resistor/capacitor blocks render correctly in STEP viewers.

Also defaults includeComponents to true since most users expect component
geometry in their exports.

Fixes tscircuit#6
@vercel
Copy link

vercel bot commented Feb 14, 2026

@omair445 is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@rushabhcodes rushabhcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add snapshot proof

@omair445
Copy link
Author

added snapshot test showing the separated solids output — each component now gets its own ManifoldSolidBrep (board + 2 components = 3 separate solids)

Copy link

@rushabhcodes rushabhcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@omair445
Copy link
Author

formatting fixed — just pushed the biome format changes. the snapshot test is passing now, showing all 3 separate solids (board + 2 components) as expected. let me know if you need me to regenerate the snapshot or if there's something specific about the png you want me to look at!

@omair445
Copy link
Author

Hey everyone, I am very very sorry I got stuck in work-related stuff and haven't been able to follow up on this. I am happy if anyone else can take care of this from here or if the maintainers want to push the final bits. Apologies again for the delay!

@rushabhcodes
Copy link

this is not correct please read the issue carefully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Determine why rectangles are missing in output

2 participants