Repository navigation
Modeling Algorithms - Fix edge extended beyond both vertices by fille… - #1592
Open
angelobartolome wants to merge 2 commits into
Open
angelobartolome wants to merge 2 commits into
angelobartolome wants to merge 2 commits into
Conversation
…t ends When two fillet ends cross the same edge outside it, one beyond each of its vertices, the rebuilt edge was extended on one side only and the shell was left open. TopOpeBRepBuild_PaveSet::Prepare added the edge's own vertices to the interference points even when the edge is extended past them. The 1d area builder then put the vertex at the far end between the two extension points and split them into two areas, and the one holding a single pave was dropped. - do not add a bounding vertex of an open edge when an interference point with the same orientation lies beyond it - add a GTest with two fillets crossing one edge beyond both vertices
Contributor
Author
Signed-off-by: Angelo Bartolome <angelo.m.bartolome@gmail.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.




Pre-Submission Checks
.github/CONTRIBUTING.md.Group - Summaryformat.Problem / Motivation
Two concave fillets that each build a valid solid on their own give an open shell when built together, if both fillet ends cross the same edge outside it: one beyond each of its vertices.
BRepCheckreports four wires and the shellBRepCheck_NotClosedand four facesBRepCheck_UnorientableShape. The volume drops by 1567.31 instead of growing by 396.12.Reduced case: a plate standing on a cylinder, with the end caps unified with the plate's coplanar sides up to z = 40, where the plate's outline leans outwards. Fillets of radius > 5/3 on the two lines where the plate meets the cylinder are trimmed by the leaning face, and each crosses the z = 40 edge of the end face beyond one of its vertices, at parameters −0.6282 and 20.6282 on a [0, 20] edge. ChFi3d's data structure holds both points correctly. The rebuilt edge runs from −0.6282 to the edge's own vertex at 20, so the wires around the other end don't close. The same failure shows up on a real part (fillet R50 between a clamp's plate and its bore).
Proposed Solution
TopOpeBRepBuild_PaveSet::Prepareadds the edge's own vertices to the interference points before the paves are grouped into edges. On this edge the sorted paves are FORWARD (−0.6282), FORWARD (vertex, 0), REVERSED (vertex, 20), REVERSED (20.6282). InTopOpeBRepBuild_Area1dBuilder, the pave at −0.6282 opens an area. Both vertices join it, because a boundary loop is only tested against the area's block loops. The pave at 20.6282 is then OUT of the REVERSED vertex at 20, so it starts an area of its own.MakeEdgesdrops that area because it holds a single pave.With one fillet the vertices are processed before any area exists. They then go through the mutual IN test that keeps the vertex at 0 and rejects the one at 20, so the edge comes out right only because of the processing order.
The fix is in
Prepare: a bounding vertex of an open edge is no longer added when an interference point with the same orientation lies beyond it (by more thanPrecision::PConfusion()). The edge is extended past that vertex, so the vertex lies inside the new edge and shouldn't bound an area. Closed edges (FUN_islook) and degenerated edges keep the previous behaviour.Validation
Checks performed:
Local macOS arm64 Debug (
OpenCascadeGTest):BRepFilletAPI_MakeFilletTest.FilletEndsCrossingSharedEdgeBeyondBothVertices. It builds the reduced shape through the API and checks that each fillet alone and both together are valid, and that the volume changes add up (547193.04; 545229.61 before the fix).TKFillet/GTestsandTKBool/GTests(fillet, chamfer, ChFi3d, BRepAlgo, BRepAlgoAPI, TopOpeBRepBuild, TopOpeBRepDS, TopOpeBRepTool): 66/66 pass; before the fix the new test was the only failure.OpenCascadeGTest: 9157 passed, 3 skipped (missing reference data, unrelated to this fix), 0 failed.CLA Confirmation
CLA ID / submission reference: 1144