miho / JCSG

Java implementation of BSP based CSG (Constructive Solid Geometry)
Other
177 stars 52 forks source link

Why does "difference" keep parts in the CSG that don't "intersect" #65

Open ZenoGillis opened 3 years ago

ZenoGillis commented 3 years ago

Hi,

We're working with your library and noticed something curious, why does the "substract" function keep parts that don't intersect with the given part?

Imho if they don't intersect then A.difference(B) should just return A

(we ran into a visual issue and now fixed it by first checking if the parts intersect before executing the difference)

image

madhephaestus commented 3 years ago

The more modern fork https://github.com/NeuronRobotics/JCSG has this and many other major bug fixes.