The result for the command rs.BooleanDifference in GhPython for Rhino6 is not working properly,
the result is a union. Its possible to see the code that i used in GhPython on the right side of the images, that i think its correct and its working properly in GhPython for Rhino5.
I send below two images:
Image 1 shows the two surfaces to make the subtraction between them;
Image 2 shows the result of the rs.BooleanDifference that is an union between the two surfaces.
Anyone can give me a clue to solve this problem? Thanks!
when creating a 4 point surface, the order in which you select the first 3 points determines the direction of the surface normal (inside the Python component there is exactly your boolean difference script)
if the points are selected in opposite orders (not both clockwise/not both countercloskwise) as @christopher.ho pointed out, the resulting surface normals will be facing opposite directions, and the boolean in this case will work like: x - (-y) = x+y
you can confirm this is the case also by doing a rs.BooleanUnion of the two surfaces with opposite normals, the boolean in this case will work like x + (-y) = x-y
So rather like the wrapping paper in the latest xkcd, if you invert the surface normals in your brep then it ´contains’ everything outside of its surface