mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-24 01:43:08 +02:00
Correction in _cleave_connected_region and polygon_triangulate and some few tweaks
This commit is contained in:
@@ -278,9 +278,8 @@ function _path_self_intersections(path, closed=true, eps=EPSILON) =
|
||||
// signs at its two vertices can have an intersection with segment
|
||||
// [a1,a2]. The variable signals is zero when abs(vals[j]-ref) is less than
|
||||
// eps and the sign of vals[j]-ref otherwise.
|
||||
signals = [for(j=[i+2:1:plen-(i==0 && closed? 2: 1)]) vals[j]-ref > eps ? 1
|
||||
: vals[j]-ref < -eps ? -1
|
||||
: 0]
|
||||
signals = [for(j=[i+2:1:plen-(i==0 && closed? 2: 1)])
|
||||
abs(vals[j]-ref) < eps ? 0 : sign(vals[j]-ref) ]
|
||||
)
|
||||
if(max(signals)>=0 && min(signals)<=0 ) // some remaining edge intersects line [a1,a2]
|
||||
for(j=[i+2:1:plen-(i==0 && closed? 3: 2)])
|
||||
|
Reference in New Issue
Block a user