Hi everyone !
I’m having an issue with BooleanDifference. Basically i have two closed polysurfaces: a symmetrical boat (X-axis) and a box all over the port side of the boat (Y>=0). So as to be clear, port side (‘left side’) of the boat is inside the box while starboard side (‘right side’) is outside the box. I want to perform a boolean difference so as to get the box minus the boat.
My issue is: if i do it in the GUI with boolean difference selecting subtract from BOX and subtract with BOAT it works fine. But, if I use the following script, it deletes everything … (I already verified that the 2 first lines were selecting the right solid)
box = rs.FirstObject(select = True) #select the box
ship = rs.InvertSelectedObjects() #select the boat
bool = rs.BooleanDifference(box, ship)
And if I print “bool” it shows me: [<System.Guid object at 0x000000000000008C [00000000-0000-0000-0000-000000000000]>]
Any thoughts ? Am i clear enough ?
I also tried to do it with simple geometries (a box and a sphere), trying to subtract half of the sphere from the box, and this time, the result with the script is quite random … Or i get the right thing, i.e the box minus half oh the sphere, or i get the “other part” of the sphere, the one which does not intersect the box.
Thanks a lot,