Open vvoovv opened 6 months ago
Where can I find the code for that in the existing code base of the addon?
For instance, the function _isectSegSeg()
does that, see line 116 in lib/CompGeom/BoolPolyOps.py.
There is a condition in the function _isectSegSeg()
if 0. < t1 < 1. and 0. < t2 < 1:
Why doesn't it include 0 and 1?
In other words, why doesn't it have the form
if 0. <= t1 <= 1. and 0. <= t2 <= 1:
?
In other words, why doesn't it have the form
if 0. <= t1 <= 1. and 0. <= t2 <= 1:
?
_isectSegSeg()
is used by the function 'boolPolyOp()', which finds unions, intersections and differences of polygons. It finds the intersection points of the polygons. The endpoints of the polygon segments are already processed as IN, ON or OUT of the partner polygon, before these intersections are calculated. Since these endpoints are already known, they must be excluded by _isectSegSeg()
, so that they are not duplicated. Therefore, 0 and 1 are excluded.
I am starting to implement intersections with Geometry Nodes. For that I will need to find an intersection point of 2 line segments.
Where can I find the code for that in the existing code base of the addon?