This is my first attempt at a polyhedron. I hope I’m doing something obvious wrong, but I can’t figure out what that might be.
I have a cylinder and a polyhedron. If I remove the cylinder, the polyhedron renders. When the cylinder is present, I get the error:
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: pe != 0 File: /Users/kintel/code/OpenSCAD/openscad-2015.03-2/../libraries/install/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h Line: 212
Originally, I had the cylinder and polyhedron overlapping, but I raised the cylinder for testing, with no change to the error. I’m running 2015.03-2.
//x
board_length = 65.75;
//y
board_width = 6.5;
//z
board_height = 30;
//wall thickness
wall = 0.8;
//support bumps
bump_height = 1;
bump_width = 2;
//snap-in pegs
peg_radius = 1;
peg_length = board_width-(bump_height/2);
peg_z = 52.5;
//circuit board thickness
pcb_thickness = 1.5;
$fn = 100;
//snap pegs
translate([wall+3.75, wall-.1, wall+28.5])
rotate([-90,0,0])
cylinder(h = peg_length, r = peg_radius, center = false);
//peg supports
polyhedron(points=[ [wall+3.75-peg_radius+.1,wall-.01,wall+26.25-peg_radius-peg_radius*2], //0
[wall+3.75+peg_radius-.1,wall-.01,wall+26.25-peg_radius-peg_radius*2], //1
[wall+3.75+peg_radius-.1,wall+peg_length/2+2,wall+26.5], //2
[wall+3.75-peg_radius+.1,wall+peg_length/2+2,wall+26.5], //3
[wall+3.75-peg_radius+.1,wall-.01,wall+26.5], //4
[wall+3.75+peg_radius-.1,wall-.01,wall+26.5] //5
],
faces=[[0,1,2,3],[0,3,4],[1,2,5],[0,1,5,4],[2,3,4,5]]);
I would appreciate any tips.
Three of the five faces are facing inwards instead of outwards. Use the
thrown together view to see them in purple and then reverse the order of
the points.
On 2 December 2015 at 18:08, Tom Owad mail@schnitz.com wrote:
This is my first attempt at a polyhedron. I hope I’m doing something
obvious wrong, but I can’t figure out what that might be.
I have a cylinder and a polyhedron. If I remove the cylinder, the
polyhedron renders. When the cylinder is present, I get the error:
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: pe != 0 File:
/Users/kintel/code/OpenSCAD/openscad-2015.03-2/../libraries/install/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
Line: 212
Originally, I had the cylinder and polyhedron overlapping, but I raised
the cylinder for testing, with no change to the error. I’m running
2015.03-2.
//x
board_length = 65.75;
//y
board_width = 6.5;
//z
board_height = 30;
//wall thickness
wall = 0.8;
//support bumps
bump_height = 1;
bump_width = 2;
//snap-in pegs
peg_radius = 1;
peg_length = board_width-(bump_height/2);
peg_z = 52.5;
//circuit board thickness
pcb_thickness = 1.5;
$fn = 100;
//snap pegs
translate([wall+3.75, wall-.1, wall+28.5])
rotate([-90,0,0])
cylinder(h = peg_length, r = peg_radius, center = false);
//peg supports
polyhedron(points=[
[wall+3.75-peg_radius+.1,wall-.01,wall+26.25-peg_radius-peg_radius*2], //0
[wall+3.75+peg_radius-.1,wall-.01,wall+26.25-peg_radius-peg_radius*2], //1
[wall+3.75+peg_radius-.1,wall+peg_length/2+2,wall+26.5], //2
[wall+3.75-peg_radius+.1,wall+peg_length/2+2,wall+26.5], //3
[wall+3.75-peg_radius+.1,wall-.01,wall+26.5],
//4
[wall+3.75+peg_radius-.1,wall-.01,wall+26.5]
//5
],
faces=[[0,1,2,3],[0,3,4],[1,2,5],[0,1,5,4],[2,3,4,5]]);
I would appreciate any tips.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On Dec 2, 2015, at 1:16 PM, nop head nop.head@gmail.com wrote:
Three of the five faces are facing inwards instead of outwards. Use the thrown together view to see them in purple and then reverse the order of the points.
That’s all it took. Thank you so much!