mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-09 13:26:51 +02:00
add sanitize_region, appease docsgen
This commit is contained in:
12
regions.scad
12
regions.scad
@@ -78,6 +78,16 @@ function check_and_fix_path(path, valid_dim=undef, closed=false, name="path") =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Function: sanitize_region()
|
||||||
|
// Usage:
|
||||||
|
// r_fixed = sanitize_region(r);
|
||||||
|
// Description:
|
||||||
|
// Takes a malformed input region that contains self-intersecting polygons or polygons
|
||||||
|
// that cross each other and converts it into a properly defined region without
|
||||||
|
// these defects.
|
||||||
|
function sanitize_region(r) = exclusive_or([for(poly=r) each polygon_parts(poly)]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Module: region()
|
// Module: region()
|
||||||
// Usage:
|
// Usage:
|
||||||
@@ -154,7 +164,7 @@ function do_segments_intersect(s1,s2) =
|
|||||||
)
|
)
|
||||||
approx_sign(a1)!=approx_sign(a2) && approx_sign(a3)!=approx_sign(a4);
|
approx_sign(a1)!=approx_sign(a2) && approx_sign(a3)!=approx_sign(a4);
|
||||||
|
|
||||||
// Note: parallel intersecting lines seem to have all the a's equal approx to zero
|
// note that parallel intersecting lines seem to have all the a's equal approx to zero
|
||||||
|
|
||||||
|
|
||||||
// Function: polygons_equal()
|
// Function: polygons_equal()
|
||||||
|
Reference in New Issue
Block a user