Repair self-intersecting STL surfaces before TetGen meshing - #103
Closed
zasexton wants to merge 13 commits into
Closed
Repair self-intersecting STL surfaces before TetGen meshing#103zasexton wants to merge 13 commits into
zasexton wants to merge 13 commits into
Conversation
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
original_boundaryFixes #102
Root cause and recovery policy
The issue attachment is topologically closed and manifold, but those properties do not rule out geometric self-intersections. A diagnostic TetGen pass reports 124 segment-facet intersections and one facet-facet intersection. The previous quiet worker surfaced only
Unknown exception, and its PyACVD retry produced a non-manifold surface with 16 open edges before failing again.The new order is:
Native TetGen calls remain in child processes with temporary working directories and concurrently drained stdout/stderr. Infrastructure and programming failures do not start geometry recovery.
Exact attachment measurements
The source file checksum is
ec3d4e23757659604c939e7d2f418587bfedc2a067479e4964f0ab40ee637275.Timing from the exact-file low-level benchmark:
The full create/solve/build attachment regression at resolution 25 passed in 10:34 of test time (10:37 wall clock), with 4,787,744 KiB peak RSS and no swap.
Verification
The attachment and local planning file are intentionally not committed or downloaded by normal CI. The pull-request workflow exercises the focused tests and smoke test across the supported operating-system/Python matrix.
Compatibility and controls
The lower-level
tetrahedralize()function keeps its historical(grid, nodes, elements)return by default;return_result=Trueopts into the selected surface and structured report. Domain continues to enforceorder=1andnobisect=True, rejects raw switch strings that could bypass that contract, and accepts the documented recovery controls. Recovery remains optional throughrepair_on_failureandremesh_on_failure, with a configurablerepair_max_distance_ratiothat defaults to 1%.