Irev-Dev / Round-Anything

A set of OpenSCAD utilities for adding radii and fillets, that embodies a robust approach to developing OpenSCAD parts.
https://kurthutten.com/blog/round-anything-a-pragmatic-approach-to-openscad-design
MIT License
504 stars 47 forks source link

polyRoundExtrude cannot be used in difference #12

Closed adam-trhon closed 4 years ago

adam-trhon commented 4 years ago

I cannot use polyRoundExtrude within difference(). I have OpenSCAD version 2019.05.

To reproduce it, here are some definitions first:

use <polyround.scad>;

base_outer_points = [
    [-10.5,  10,  1],
    [ 10.5,  10,  1],
    [ 10.5, -10,  1],
    [-10.5, -10,  1],
];
base_outer_height = 6;

base_inner_points = [
    [-9.5, -9, .5],
    [-9.5,  9, .5],
    [ 9.5,  9, .5],
    [ 9.5, -9, .5]
];  
base_inner_height = 4;

When I append the following:

difference() {
        polyRoundExtrude(base_outer_points, base_outer_height, 0.7, 0);
        translate([0, 0, -.1])
            polyRoundExtrude(base_inner_points, base_inner_height+.1, 0.7, 0);
}

I get the following errors:

 ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /usr/include/CGAL/Nef_S2/SM_const_decorator.h Line: 330
 ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /usr/include/CGAL/Nef_S2/SM_const_decorator.h Line: 330

and the following output:

`polyRoundExtrude-difference-result

adam-trhon commented 4 years ago

Just now I noticed the pull request #10 and a quick test revealed that it fixes this issue. Sorry for not checking before posting

Irev-Dev commented 4 years ago

All good @adam-trhon and thanks @nickcoutsos. I've asked for a couple of changes, but hope to get #10 merged soon.

Irev-Dev commented 4 years ago

10 has been merged, going to close this issue. We can open it again if #10 didn't fix it entirely.