pythonocc-core icon indicating copy to clipboard operation
pythonocc-core copied to clipboard

BRepAlgoAPI_Cut cutting order

Open giovannicono opened this issue 2 years ago • 4 comments

Hi, I have two verified solid objects in input to the BRepAlgoAPI_Cut tool, a blade and a slice. If the blade is not vertical swirled I get a perfect cut with BRepAlgoAPI_Cut(bladeIGES_Slice, bladeIGES_Bspline), but if it's swirled I get a cutted blade on tip and hub. I can not figure out where is the problem, the two blade files are exactly the same for dimension etc, this is the only parameter that change. I attach the examples of the input objects and the two outputs. BRepAlgoAPI_Cut_issue

giovannicono avatar Jul 13 '23 08:07 giovannicono

Hello, could you provide example .stp files too please?

Tanneguydv avatar Jul 13 '23 10:07 Tanneguydv

Sorry, I sent it by mail but the file was too large. I upload it here. Example.zip

giovannicono avatar Jul 17 '23 08:07 giovannicono

It's ok for me, for both shapes : Straight blade : image

Swirled blade : image

Be sure to respect the correct order of the method parameters : BRepAlgoAPI_Cut(basis, cutter)

basis = "argument" and cutter="tool" in this description -->

https://dev.opencascade.org/doc/refman/html/class_b_rep_algo_a_p_i___cut.html

Tanneguydv avatar Jul 17 '23 12:07 Tanneguydv

The order is the same for both cutting operation because the function is the same. The blades and slices are always generated with PythonOCC, then used for the cutting operation. I generate the 4 faces of the blade and then sew it together, returning the .Shape() to pass to the boolean subtractor. Maybe is there a way to return a more stable object?

giovannicono avatar Jul 17 '23 12:07 giovannicono