Enhance fillet handling and add validation for geometry integrity#1293
Enhance fillet handling and add validation for geometry integrity#1293angelobartolome wants to merge 7 commits into
Conversation
… consumed faces (Open-Cascade-SAS#1177) - Updated hatching process to retain points and segments, allowing for valid domain creation when fillet tangency lines coincide with boundary edges. - Introduced functions to identify and remove faces that have been collapsed to zero-area bands due to large fillet radii, ensuring proper stitching of remaining faces. - Adjusted shape computation to incorporate the removal of consumed faces, improving overall geometry integrity.
…lidation - Enhanced intersection logic to differentiate between genuine crossings and tangential meetings of fillets, improving error handling for large radii cases (issue Open-Cascade-SAS#1177). - Introduced a new function to check if a face is planar, aiding in the validation of consumed faces during geometry reconstruction. - Updated the face removal process to ensure invalid planar faces are correctly identified and handled, enhancing overall geometry integrity.
…-Cascade-SAS#1177 - Introduced a new test case to validate the chamfering of every edge of a 50x50x10 slab with a distance of 5, ensuring that the operation completes without crashing. - Verified that the resulting shape is valid and that no degenerate mid edges are left after the chamfering process.
…is_CheckSmallFace - Replaced the previous bounding box and surface properties checks with a more efficient method using ShapeAnalysis_CheckSmallFace. - Improved the logic for identifying consumed faces by checking for zero-width bands and spots, enhancing geometry validation during fillet operations.
… for improved readability - Adjusted spacing in variable declarations to enhance code clarity and maintain consistency across the files. - No functional changes were made; this is purely a formatting improvement.
… readability - Combined return statements in the ChFi3d_IsConsumedFace function to streamline the code. - No functional changes were made; this is a minor formatting improvement aimed at enhancing code clarity.
|
Amazing job! If you will need anything from me - let me know. In case when you complete the implementation, I would be happy to review and prepare to the OCCT rules and maybe fix something (usually the final steps I do by myself, they are mostly specific for the project). |
|
Thanks @dpasukhi ! I think this PR is good to go as is right now, it will solve a bunch of use cases already. I'm exploring extending this to allow for overflowing fillets/chamfers, but that is harder and bigger task, I'll probably do it in another PR or discussion if I succeed. I see two failing checks in the pipelines, I think we need to check those before continuing |
|
I will analyze regressions and also will have a full circle of testing (on our side we have x2+ tests) |
|
17 FAILED Test failed (regression) only 2 real regressions, but it is anyway were before, all the other FAILED - improvements. There is a issue with performance, because you add BRepCheck + Sewing on each operation, which is not cheap. But it will take me some time to analyze the possibility to avoid BRepCheck and Sewing, because it is too expensive just to be and we usually avoid extra complex operations on the middle of others. Also |
|
Sounds good, and I agree with the performance issue, let me know if I can help in anyway! |
|
@dpasukhi have you had more thoughts on how to workaround the performance and methodology issues you raised in #1293 (comment) ? |
There are no needs to thoughts. The fix will require the deep debug and proper writing the cases. That part still pending when I will have at least a few day to debug. |
|
Any update on this? |
|
I started to work on it. It will take about 1+-1 week for me approximately (I can't fully allocate the time on R&D :( |
This pull request addresses issue #1177 by improving the robustness of fillet and chamfer operations when the radius or distance is large enough to entirely consume adjacent faces. The changes ensure that degenerate or invalid faces are detected and removed, allowing fillets and chamfers to meet cleanly without leaving behind problematic geometry. Additional regression tests are added to verify correct behavior in these edge cases.
Robustness improvements for fillet/chamfer operations:
ChFi3d_RemoveConsumedFacesinChFi3d_Builder.cxxto detect and remove faces that have been fully consumed (collapsed to a negligible area) by fillet or chamfer operations, and to re-stitch the remaining faces into a valid solid or shell. This function is now called during the result assembly inChFi3d_Builder::Compute(). [1] [2]ChFi3d_IsConsumedFaceandChFi3d_IsPlanarto identify faces that should be removed.Intersection and hatching logic improvements:
ChFi3d_Builder_0.cxxandChFi3d_Builder_C1.cxxto distinguish between transversal (invalid) and tangential (valid) fillet/chamfer intersections, allowing tangentially meeting fillets/chamfers to proceed without error. [1] [2] [3]ChFi3d_Builder_SpKP.cxxto retain points and segments, enabling valid domains to be created even when a fillet's tangency line coincides with a face boundary.Regression tests for consumed faces and edge cases:
BRepFilletAPI_MakeFillet_Test.cxxandBRepFilletAPI_MakeChamfer_Test.cxxto verify that fillet and chamfer operations succeed and produce valid solids when faces are fully consumed, including cases where fillets/chamfers meet on opposing edges or remove entire faces. [1] [2]Dependency and include updates:
ChFi3d_Builder.cxx.Discussion
Issue #172