Furthemore, keep extrusions created by code, and then do Boolean difference via builtin command BooleanDifference, the result is right. It seems that extrusions created by code are ok, and there is something wrong with api CreateBooleanDifference?
@dale,thanks for your reply, it works in one scenario and failed in another one.
Replace my code creating Brep from curve with code in sample, the result are different: one is correct, and another is wrong, it is shown in below picture.
My apologies, but I don’t understand what your command is trying to do. Perhaps you can provide a description of what you are trying to do, and why? A step-by-step of what you are trying to do would be helpful.
Also, can simply your 3dm file and only provide the geometry you need to test the command? It’s not clear to me what to select and what not to select.
What try to do: I want to get boolean difference result of closed curve substracted by Brep.
Take below image for example, there are two groups of curve and Brep, what i want are closed curves with red color.
Steps to achieve it 2.1. create surface brep from closed curve, then create extrusion from surface. 2.2. get the face of brep intersected with curve, then create extrusion from face. 2.3. using CreateBooleanDifference with two extrusion 2.4. get bottom face and face’s edges. the step has not been implemented in code
simplied 3dm file sample code are below. In updated code, the Objects are selected by id, no need to select by mouse. SU-polyline.3dm (44.1 KB) SUTestCommand.cs (5.0 KB)