FourthDr
9 years ago
Hi:
Hoping some one can help me out. I did search for this error, and did find
other people with similar problem but no real solution that applies to my
problem.
I have downloaded puzzlecutlib.scad from thiniverse in order to cut up an
stl model that is slightly too big for my 3D printer. I was able to get the
puzzle cut where I wanted it after a bit of tweaking of the code. Including
changing the "child" statements in the library file to "children" to
eliminate one error. I also modified the puzzlecutdemo2.scad and added
translate([70,0,-22]) at the bottom of the code that imports the stl because
the model was importing in the wrong alinement with the puzzle cut.
I now have it just the way I want it. But I have a problem rendering it. I
get this error with F6:
"Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: pe_prev->is_border() ||
!internal::Plane_constructor::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()
File:
/opt/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
Line: 251
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: pe_prev->is_border() ||
!internal::Plane_constructor::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()
File:
/opt/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
Line: 251
Geometries in cache: 14
Geometry cache size in bytes: 415712
CGAL Polyhedrons in cache: 12
CGAL cache size in bytes: 152016
Total rendering time: 0 hours, 0 minutes, 2 seconds
Rendering finished."
I seem to have solve that error by saving the file with a new name. I now
get a different error, I can not see the model after hitting F6 unless I
select preview. And I get this error when I try to export to STL:
"Current top level object is empty. " when trying to export as STL.
The code for both files are listed below:
puzzlecutdemo2.scad:
//OpenSCAD PuzzleCut Library Demo - by Rich Olson
//http://www.nothinglabs.com
//Tested on build 2012.08.22
//License: http://creativecommons.org/licenses/by/3.0/
//demo object "Bucket O' Octopodes (thicker legs)" -
http://www.thingiverse.com/thing:8896
//NOTE: Complex objects may result in "normalized tree" errors / rendering
problems
//These can be worked around by doing a full render (just hit F6)
include <puzzlecutlib.scad>
stampSize = [500,500,70]; //size of cutting stamp (should cover 1/2 of
object)
cutSize = 8; //size of the puzzle cuts
xCut1 = [-58 ,-5 ,-30]; //locations of puzzle cuts relative to X axis center
yCut1 = [-4, 5, 16]; //for Y axis
kerf = 0; //supports +/- numbers (greater value = tighter fit)
//using a small negative number may be useful to assure easy fit for 3d
printing
//using positive values useful for lasercutting
//negative values can also help visualize cuts without seperating
pieces
cutInTwo(); //cuts in two along y axis
//cutInFour(); //cuts in four along x / y axis
//comment out lines as needed to render individual pieces
module cutInTwo()
{
translate([0,-20,0])
xMaleCut() drawOcto();
translate([0,0,0])
xFemaleCut() drawOcto();
}
module cutInFour()
{
translate([6,-6,0])
xMaleCut() yMaleCut() drawOcto();
translate([-6,-6,0])
xMaleCut() yFemaleCut() drawOcto();
translate([6,6,0])
xFemaleCut() yMaleCut() drawOcto();
translate([-6,6,0])
xFemaleCut() yFemaleCut() drawOcto();
}
module drawOcto()
{
rotate ([0,-90,90]) translate([70,0,-22]) import("Cycl_XleftFrame-base
cut.stl");
}
***********************************
puzzlecutlib.scad:
//OpenSCAD PuzzleCut Library Demo - by Rich Olson
//http://www.nothinglabs.com
//Tested on build 2012.08.22
//License: http://creativecommons.org/licenses/by/3.0/
module xMaleCut(offset = 0, cut = xCut1)
{
difference()
{
children(0);
translate([0,offset,0]) makePuzzleStamp(cutLocations = cut);
}
}
module xFemaleCut(offset = 0, cut = xCut1)
{
intersection()
{
children(0);
translate([0,offset,0]) makePuzzleStamp(cutLocations = cut,
kerf = kerf); //only set kerf on female side
}
}
module yMaleCut(offset = 0, cut = yCut1)
{
difference()
{
children(0);
rotate ([0,0,90]) translate([0,offset,0]) makePuzzleStamp(cutLocations =
cut);
}
}
module yFemaleCut(offset = 0, cut = yCut1)
{
intersection()
{
children(0);
rotate ([0,0,90]) translate([0,offset,0]) makePuzzleStamp(cutLocations =
cut,
kerf = kerf); //only set kerf on female side
}
}
module makePuzzleStamp(kerf = 0)
{
difference()
{
//make the cube
translate ([0,stampSize[0] / 2 - kerf,0])
cube (stampSize, center = true);
//make the cuts
for ( i = cutLocations )
{
translate([i,0,0])
cube ([(cutSize / 2) - kerf * 2, cutSize - kerf * 2,stampSize[2]],
center = true);
translate([i,cutSize / 2,0])
cube ([cutSize - kerf * 2,(cutSize / 2) - kerf * 2, stampSize[2]],
center = true);
}
}
}
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hoping some one can help me out. I did search for this error, and did find
other people with similar problem but no real solution that applies to my
problem.
I have downloaded puzzlecutlib.scad from thiniverse in order to cut up an
stl model that is slightly too big for my 3D printer. I was able to get the
puzzle cut where I wanted it after a bit of tweaking of the code. Including
changing the "child" statements in the library file to "children" to
eliminate one error. I also modified the puzzlecutdemo2.scad and added
translate([70,0,-22]) at the bottom of the code that imports the stl because
the model was importing in the wrong alinement with the puzzle cut.
I now have it just the way I want it. But I have a problem rendering it. I
get this error with F6:
"Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: pe_prev->is_border() ||
!internal::Plane_constructor::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()
File:
/opt/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
Line: 251
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: pe_prev->is_border() ||
!internal::Plane_constructor::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()
File:
/opt/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
Line: 251
Geometries in cache: 14
Geometry cache size in bytes: 415712
CGAL Polyhedrons in cache: 12
CGAL cache size in bytes: 152016
Total rendering time: 0 hours, 0 minutes, 2 seconds
Rendering finished."
I seem to have solve that error by saving the file with a new name. I now
get a different error, I can not see the model after hitting F6 unless I
select preview. And I get this error when I try to export to STL:
"Current top level object is empty. " when trying to export as STL.
The code for both files are listed below:
puzzlecutdemo2.scad:
//OpenSCAD PuzzleCut Library Demo - by Rich Olson
//http://www.nothinglabs.com
//Tested on build 2012.08.22
//License: http://creativecommons.org/licenses/by/3.0/
//demo object "Bucket O' Octopodes (thicker legs)" -
http://www.thingiverse.com/thing:8896
//NOTE: Complex objects may result in "normalized tree" errors / rendering
problems
//These can be worked around by doing a full render (just hit F6)
include <puzzlecutlib.scad>
stampSize = [500,500,70]; //size of cutting stamp (should cover 1/2 of
object)
cutSize = 8; //size of the puzzle cuts
xCut1 = [-58 ,-5 ,-30]; //locations of puzzle cuts relative to X axis center
yCut1 = [-4, 5, 16]; //for Y axis
kerf = 0; //supports +/- numbers (greater value = tighter fit)
//using a small negative number may be useful to assure easy fit for 3d
printing
//using positive values useful for lasercutting
//negative values can also help visualize cuts without seperating
pieces
cutInTwo(); //cuts in two along y axis
//cutInFour(); //cuts in four along x / y axis
//comment out lines as needed to render individual pieces
module cutInTwo()
{
translate([0,-20,0])
xMaleCut() drawOcto();
translate([0,0,0])
xFemaleCut() drawOcto();
}
module cutInFour()
{
translate([6,-6,0])
xMaleCut() yMaleCut() drawOcto();
translate([-6,-6,0])
xMaleCut() yFemaleCut() drawOcto();
translate([6,6,0])
xFemaleCut() yMaleCut() drawOcto();
translate([-6,6,0])
xFemaleCut() yFemaleCut() drawOcto();
}
module drawOcto()
{
rotate ([0,-90,90]) translate([70,0,-22]) import("Cycl_XleftFrame-base
cut.stl");
}
***********************************
puzzlecutlib.scad:
//OpenSCAD PuzzleCut Library Demo - by Rich Olson
//http://www.nothinglabs.com
//Tested on build 2012.08.22
//License: http://creativecommons.org/licenses/by/3.0/
module xMaleCut(offset = 0, cut = xCut1)
{
difference()
{
children(0);
translate([0,offset,0]) makePuzzleStamp(cutLocations = cut);
}
}
module xFemaleCut(offset = 0, cut = xCut1)
{
intersection()
{
children(0);
translate([0,offset,0]) makePuzzleStamp(cutLocations = cut,
kerf = kerf); //only set kerf on female side
}
}
module yMaleCut(offset = 0, cut = yCut1)
{
difference()
{
children(0);
rotate ([0,0,90]) translate([0,offset,0]) makePuzzleStamp(cutLocations =
cut);
}
}
module yFemaleCut(offset = 0, cut = yCut1)
{
intersection()
{
children(0);
rotate ([0,0,90]) translate([0,offset,0]) makePuzzleStamp(cutLocations =
cut,
kerf = kerf); //only set kerf on female side
}
}
module makePuzzleStamp(kerf = 0)
{
difference()
{
//make the cube
translate ([0,stampSize[0] / 2 - kerf,0])
cube (stampSize, center = true);
//make the cuts
for ( i = cutLocations )
{
translate([i,0,0])
cube ([(cutSize / 2) - kerf * 2, cutSize - kerf * 2,stampSize[2]],
center = true);
translate([i,cutSize / 2,0])
cube ([cutSize - kerf * 2,(cutSize / 2) - kerf * 2, stampSize[2]],
center = true);
}
}
}
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440.html
Sent from the OpenSCAD mailing list archive at Nabble.com.