Discussion:
[OpenSCAD] puzzlecutlib rendering problem & STL export error Current top level object is empty.
FourthDr
9 years ago
Permalink
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.
MichaelAtOz
9 years ago
Permalink
Your STL is probably invalid, check it with Netfabb Basic, or share it here.
Post by FourthDr
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
"Current top level object is empty. " when trying to export as STL.
The F6 is cached, so you don't get the error again unless you clear cache or
exit/rerun OpenSCAD. (a flaw IMO).
Object is empty because F6 failed.




-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17442.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

The stl file I am trying to use the puzzlecut plugin on originally came from
netfabb. So the stl should be valid. I'll attach all the files I am using
below. Hopefully you can see the error.

I don't see the problem, but then again I'm fairly new to OpenSCAD.

I even asked the author of the plugin, but he has not posted anything on his
block for nearly a year. So seems like he is MIA. Thanks.

Cycl_XleftFrame-base_cut.stl
<http://forum.openscad.org/file/n17443/Cycl_XleftFrame-base_cut.stl>
puzzlecutlib.scad <http://forum.openscad.org/file/n17443/puzzlecutlib.scad>
puzzlecutdemo2-cut.scad
<http://forum.openscad.org/file/n17443/puzzlecutdemo2-cut.scad>



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17443.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
9 years ago
Permalink
Well the STL doesn't show any issues in Meshlab or Netfabb Basic.
But doing

translate([60,10,-10])
import("td17440 Cycl_XleftFrame-base_cut2.stl");
cube([10,20,5]);

Causes the error. So CGAL doesn't like it.
The error '->plane()).is_degenerate() ' points to degenerate faces, but
these usually are detected by Netfabb.
Meshmixer says it has repaired the file, but unfortunately it doesn't tell
what it did or what was wrong.

So I ran it thru Netfabb online <https://netfabb.azurewebsites.net/> and
it now works.

Here is the fixed file td17440_Cycl_XleftFrame-base_cut_fixed.stl
<http://forum.openscad.org/file/n17444/td17440_Cycl_XleftFrame-base_cut_fixed.stl>



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17444.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

I looked at the td17440_Cycl_XleftFrame-base_cut_fixed.stl file and it did
not have the puzzle cuts. So I opened in OpenSCAD and tried to render and
then export to stl. Here is the result:

Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL ERROR:
assertion violation! Expr: cet->get_index() == ce->twin()->get_index() File:
/opt/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1169
ERROR: CGAL error in CGALUtils::applyBinaryOperator intersection: CGAL
ERROR: assertion violation! Expr: cet->get_index() ==
ce->twin()->get_index() File:
/opt/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1169
ERROR: CGAL error in CGALUtils::applyBinaryOperator union: CGAL ERROR:
assertion violation! Expr: G.mark(v1,0)==G.mark(v2,0)&&
G.mark(v1,1)==G.mark(v2,1) File:
/opt/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_S2/SM_overlayer.h
Line: 287
Geometries in cache: 14
Geometry cache size in bytes: 466976
CGAL Polyhedrons in cache: 12
CGAL cache size in bytes: 2695800
Total rendering time: 0 hours, 0 minutes, 15 seconds
Rendering finished.
Current top level object is empty.


As you can see I am still getting the CGAL error along with the object is
empty error when I try to export. I should mention I am using OpenSCAD
version 2015.03-2. And I'm on a 32bit version of windows. Did you try
exporting the part with the puzzle cuts to stl? Or did you just run the
unmodified stl through netfabb online?



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17445.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

I thought about gluing the parts together, but I don't think that would work
very will with PLA. The parts are for the Cyclone PCB Factory. Basically a
mini milling machine for PCB's and other light materials like acrylic wood
etc.. The parts are for the X axis, so they need to be solid enough for
left-right motion and to support a Dremel on top. An interlocking cut would
make the two parts stronger than just glue. I suppose I could screw them
together. It just would have been so much more elegant to be able to make
the puzzle cut. You would think this problem comes up frequently enough that
some of the major 3D software publishers would have a built-in solution for
when a part is too big to print.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17454.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
nop head
9 years ago
Permalink
It made it to the forum though.
I just approved it, but didn't see it in the forum, but in the mailing
list.
Hence above forum post, which seems to have worked.
Nophead, what version did you use to export that? (and I presume when you
say Michael's version you mean ..._fixed.stl?)
I used OpenScad 2015.05.16 (git e673fff).

Yes it came from your td17440_Cycl_XleftFrame-base_cut_fixed.stl. Netfabb
doesn't show any errors in that but once it has passed through OpenScad /
CGAL it shows 20 holes and 17 shells.


​
...
MichaelAtOz
9 years ago
Permalink
I replied with a version that works but it is blocked for being too long.
Lets see in an Admin can fix that...
nopheads_repaired.stl
<http://forum.openscad.org/file/n17458/nopheads_repaired.stl>



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17458.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

I see this attached STL actually compiles with no problems. What did you do
to the file? Or to the OpenSCAD code? Has an admin responded to your request
yet? If not, you can PM(not sure if this forum supports that) me and I'll
arrange an ftp upload if needed. Let me know. I actually will need to make
changes to my part, so having working OpenSCAD code or a work-around
procedure would be helpful. Thank you for the help :-)



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17475.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
9 years ago
Permalink
Nophead loaded that STL saying above "This repaired version seems to work.
With Michael's version [aka the ...fixed.stl] I got the error message but
instead of an empty object I got something that looked like the original. I
exported that and repaired it in Netfabb. That version will then cut with
Michael's test.".

I just loaded his STL after his post got held up, as I'm an Admin.

I just tried to reproduce what he did and can't get the same result (tho not
using his exact version). The STL still gets the error, and Netfabb doesn't
show any issues.

So sorry, not solved...



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17476.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
nop head
9 years ago
Permalink
Does the version I upload work with the original code?

I think the root problem is the old bug that OpenScad cannot import STL
files with vertices that are close together because it snaps them to a grid
and breaks the topology. Until OpenScad can import STL files properly there
will be an endless stream of these reports.
...
MichaelAtOz
9 years ago
Permalink
Post by nop head
Does the version I upload work with the original code?
With the puzzle cut code, yes.
Post by nop head
I think the root problem is the old bug that OpenScad cannot import STL
files with vertices that are close together because it snaps them to a grid
and breaks the topology. Until OpenScad can import STL files properly there
will be an endless stream of these reports.
Meshlab shows lots of self intersecting vertices. Fewer in the _fixed.stl.
But when ticking the 'unify' box on load there are none.
However, when exporting that (from meshlab), that STL still gets the CGAL
error.

With your hint, I changed it to;

module cutInTwo()
{
scale(0.5)
translate([0,-20,0])
xMaleCut()
rotate ([0,-90,90])
scale(2)
translate([55,-35,-16])
import("td17440 Cycl_XleftFrame-base_cut_fixed.stl"
, convexity=8);;
}

Which works. Seems the up scaled vertices are ok, so presumably it is the
NefPoly which has issues with the close vertices (if my vague understanding
is anywhere close). ?? clue

@ForthDr you will/may need to fiddle with the translate()'s as the scale(2)
moves the object.

The scale() change did not fix the degenerate issue, so you will need to run
the STL thru Netfabb online if you get that error.




-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17478.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi nophead:

I took the STL (nopheads_repaired.stl) that MichaelAtOz posted for you and
plugged it into the original puzzlecutdemo2.scad using the original
puzzlecutlib.scad library and the file rendered just fine. It also exported
to stl no problems. So, what can I do to get revisions of this part to do
the same without any problems?



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17479.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
9 years ago
Permalink
So, what can I do to get revisions of this part to do the same without any
problems?
What do you mean by 'get revisions of this part'?

Do you mean you want to do something to that STL, like add a hole or chop
off an end?

If so you can do something like;

difference()
{
translate([52.254,16.372,-9.77]) // close to origin
import("nopheads repaired.stl", convexity=8);
// -
translate([-15,40,20])
#rotate([0,90,0])
cylinder(r=2,h=20,$fn=18);
}


<Failed to load image: http://forum.openscad.org/file/n17481/td17440_edit_f5.jpg>

Which renders & exports;

<Failed to load image: http://forum.openscad.org/file/n17481/td17440_edit_f6.jpg>



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17481.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
nop head
9 years ago
Permalink
If the original STL is generated by OpenScad then you can remove the close
vertices. If you post the code I can have a look at it. If you look at the
triangulation there seem to be far too many triangles to tessellate such a
simple shape. In particular these look very suspicious.




Another solution would be to apply the puzzle cut directly to the OpenScad
object to avoid exporting it to STL and reading it back in again, which in
general doesn't work with OpenScad.
...
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

This is what I was originally doing before I got mired in OpenSCAD error
messages. I am building a milling machine. I have all but 2 of the 3D
printable parts printed. The two parts that are too big to print are already
in stl format. I was experimenting with where to cut the part to maximize
strength when rejoining the parts. So I first opened one of the stl files in
netfabb(5.1.2, since have upgraded to v7) and made a few cuts. I then opened
the stl in OpenSCAD to use the puzzlecut library. Once I had the puzzle cut
in what I thought was the right place, I tried to render and export back to
stl. Once that was done I was going to open the stl in netfabb again and
rejoin the parts. This way I would then have the puzzle cut where I needed
it. There where over hangs so that is why I was cutting first, then
puzzling, then rejoining. Here are the original stl files before any
changes:

Cycl_XleftFrame.stl
<http://forum.openscad.org/file/n17491/Cycl_XleftFrame.stl>
Cycl_XrightFrame.stl
<http://forum.openscad.org/file/n17491/Cycl_XrightFrame.stl>

As you can see, these parts are too long on one dimension for a 150mm^3
printing volume My idea was to puzzle the base in such a way to shorten the
object to fit while at the same time making the pieces fit together so the x
and y movement would not cause the parts to come apart.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17491.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
David Gustavson
9 years ago
Permalink
If you're printing in ABS, solvent welds are very strong in my
experience. I do sometimes add alignment features though, like a short
pin and hole, to make sure the bond doesn't go askew. But large ABS
prints are prone to warping if you don't have a heated building chamber.
Sometimes you can print as mirror symmetrical half parts that can be
bonded back to back to cancel out warps.
Dave
...
FourthDr
9 years ago
Permalink
Hi David B. Gustavson:

I'm printing is PLA. No heated bed at the moment. That is on my to-do list.




--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17493.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
nophead
9 years ago
Permalink
I can see where the crazy tessellation comes from now. There is a fan of
triangles for the simicircular cutout in the tall part that you have
removed. Netfabb is a mesh editor so it just truncates the fan of triangles
leaving some very close vertices. OpenScad can't handle close vertices.

Does it work if you puzzlecut the whole part rather than a section of it
made with Netfabb?



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17495.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
9 years ago
Permalink
Unfortunately those original files have the problem. They are degenerate.
Unfortunately when run thru Netfabb online they then get the other CGAL
error. I can't see a way to fix them.

Perhaps get someone with a bigger printer to print them for you??



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17498.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi: MichaelAtOz:

Unfortunately I don't know anyone with a larger printer. For hire places
charge a fortune for "making". I can't afford to pay someone $100/hour to do
nothing but click File>open, then File>Print. Anyone can do that. Wish I got
paid that much for something so simple. On top of that most places also want
the file ready to go to their specs so they don't have to do any work at
all. So not worth it. Guess I'll have to work on this for a little longer.

There is one other thing I have not been able to figure out. How would I
change the puzzle cut from the default "T" shape to a round cutout? Like a
ball and socket shape. I don't see where in the code that does that.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17513.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
9 years ago
Permalink
Post by FourthDr
There is one other thing I have not been able to figure out. How would I
change the puzzle cut from the default "T" shape to a round cutout? Like a
ball and socket shape. I don't see where in the code that does that.
The T lock is shaped by the following lines of makePuzzleStamp() in the
...
I guess dovetail is safer, stronger and easier to adjust.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17518.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi Ronaldo:

Thanks. I plugged your code in and it works so far. But I'm needing to
re-slice the entire part. The base cutting was just a first draft so to
speak. I've reevaluated my original idea and that first draft will not
shorten the longest dimension of the original part. So I will see if I can
cut in a different place and still make a part that holds together. I'll
reply once I've had a chance to tinker with it.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17528.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi Ronaldo:

Here is the revision I think will work for me to be able to print. Currently
I'm using the default T puzzle piece because naturally the thing won't
render and I can't clearly see the cuts with the other code. I'll want to do
this for both prints Cycl_XrightFrame.stl and Cycl_XrleftFrame.stl. Please
see attached.

Cycl_XleftFrame.stl
<http://forum.openscad.org/file/n17536/Cycl_XleftFrame.stl>
Cycl_XrightFrame.stl
<http://forum.openscad.org/file/n17536/Cycl_XrightFrame.stl>
puzzlecutdemo2-cut-test2.scad
<http://forum.openscad.org/file/n17536/puzzlecutdemo2-cut-test2.scad>
puzzlecutlib.scad <http://forum.openscad.org/file/n17536/puzzlecutlib.scad>





--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17536.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
9 years ago
Permalink
naturally the thing won't render and I can't clearly see the cuts with the
other code.
Not sure if this is part of the problem but, add convexity=8 to you import
and it previews better.



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17541.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

I get this error when I added that code:

ERROR: Parser error in line 146: syntax error
ERROR: Compilation failed!



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17542.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
9 years ago
Permalink
Like this

import("Cycl_XleftFrame_fixed_ml.stl", convexity=8);




-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17544.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

Definitely an improvement! Much more detail. It's a wonder it doesn't just
do that by default.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17546.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi MichaelAtOz:

I've been searching around for something that can fix/repair SLT or the
original source format that the STL's for the mill came in. Not much luck on
the source files original format. But along the way I found an interesting
plugin for commercial CAD apps like AutoCAD and Solidworks etc. called
3dprinttech. Links below:

https://blog.adafruit.com/2014/07/31/split-large-designs-into-printable-parts/
http://labs.cctech.co.in/3dprinttech/
https://apps.autodesk.com/en/Detail/Index?id=7059401767782074929&appLang=en&os=Win32_64

Unfortunately, it is 3 years old and has not been updated. The companies
website no longer has a labs sub-domain and you can only download it from
the AutoCAD app store. I'm not going to run out and buy AutoCAD obviously
for a plugin that probably doesn't work with the latest version.

Would be neat if OpenSCAD could do that. With the exception of also being
able to create connectors other than pegs as my printer doesn't handle small
hole/pegs/pins accurately enough for that to work.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17547.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
9 years ago
Permalink
I'll want to do this for both prints Cycl_XrightFrame.stl and
Cycl_XrleftFrame.stl. Please see attached.
Those two files have problems too. You probably could not puzzlecut them.
Have you tried to fix them with Netfabb or Meshlab? Sketchup was not helpful
this time. I have them fixed using Meshlab AND Netfabb site Torsten linked
above. Both are free.
Cycl_XleftFrame_fixed_ML.stl
<http://forum.openscad.org/file/n17549/Cycl_XleftFrame_fixed_ML.stl>
Cycl_XrightFrame_Sk_fixed.stl
<http://forum.openscad.org/file/n17549/Cycl_XrightFrame_Sk_fixed.stl>
I'm using the default T puzzle piece because naturally the thing won't
render and I can't clearly see the cuts with the other code.
A change in the dovetail code could provide a larger peg.
I've been searching around for something that can fix/repair SLT or the
original source format that the STL's for the mill came in. Not much luck
on
the source files original format.
https://en.wikipedia.org/wiki/STL_%28file_format%29
<https://en.wikipedia.org/wiki/STL_%28file_format%29>
Would be neat if OpenSCAD could do that. With the exception of also being
able to create connectors other than pegs as my printer doesn't handle
small
hole/pegs/pins accurately enough for that to work.
OpenSCAD already do that with a simple user code like puzzlecutlib.scad. No
reason to include it in the core. There is nothing fundamentally wrong with
puzzlecutlib.scad. The problems you had came from problematic stl's. For
this, there are tools out there.




--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17549.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi Ronaldo:

Thanks for the fix. For future reference, what tools did you use to fix the
stl's? Other than netfabb/meshlab/sketchup are there any other useful
utilities you could recommend? You said yourself any one of those alone may
not find a problem or be able to fix a problem. Also, how did you actually
fix the stl files? Did you just use the automatic fix function or did you
have to go through a more elaborate repair procedure?

Now that I can actually render the files without errors, I have run into
another problem. The puzzlecutlib.scad simply slices the part in half and
places all the cuts on that one slice plain. It looks like I need some of
the cuts offset to avoid creating a thin peninsula in one area since the cut
goes the entire length of the width where I want to make a cut. Not sure if
I an explaining that clearly or not. See model.

puzzlecutdemo2-cut-test2.scad
<http://forum.openscad.org/file/n17562/puzzlecutdemo2-cut-test2.scad>
Cycl_XrightFrame_Sk_fixed.stl
<http://forum.openscad.org/file/n17562/Cycl_XrightFrame_Sk_fixed.stl>
puzzlecutlib.scad <http://forum.openscad.org/file/n17562/puzzlecutlib.scad>



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17562.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
9 years ago
Permalink
If all you need is "for a 150mm^3 printing volume"

Why not cut it like so, each is <=100mm;

<Failed to load image: http://forum.openscad.org/file/n17563/puzzlecut.jpg>



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17563.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi:

That was my original design. But I thought is would come apart. I finally
did get the two parts cut with dove tail and separated into 4 individual
parts for printing over the weekend using the design you suggested.

As usual, I thought to myself what if the parts don't fit? So I quickly
created a sample coin shaped part and cut it in half for a test pint.

The first print was way too tight and the two half would not join. So I
revised the design using KERF, and printed a second version.

The second revision didn't fit either, the only change with kerf of .4 was a
gap at the bottom of the female dovetail cut outs. I though kerf would add a
gap along the entire cut? But apparently not. Or could it be a problem with
the dovetail code which was not originally part of the puzzlecutlib?

So how would I adjust the fit on the two parts of kerf doesn't do it?



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17569.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
9 years ago
Permalink
I don't recommend the use of Sketchup. I had used it because I am used to it
and had not much experience with other tools. But it is cumbersome. I think
Netfabb should be the first choice. The site Torsten referred is easy to use
and the results are usually good. You always can submit the fixed part again
if the first fixing wasn't enough. I think that was my procedure. You should
try it. Meshlab is a big software with lots of options but requires some
experience.

Regarding your cuts: I understand that you want to puzzlecut the part at
that line in order to strenght the joints by the mounting bolts. But I would
not cut it upright like you did because the printing will require support to
deal with the notches when the part is laid down on the printer table. I
would cut it laid down so the notches goes vertically as Torsten's image
shows. Anyway, you should choose the cutSize and xCut1 parameters to avoid
interference with part features and thin surfaces. With cutSize=6, your cut
seems to work.

I still think dovetails are a better choice. I did not understood what were
your troubles with them.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17564.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Rob Ward
9 years ago
Permalink
Just to throw in an experience I had of a small 'L' bracket part that snapped. There was no way I could brace it any more than I had, so I made up a batch of 5min epoxy and with a toothpick smeared and poked the glue back into the 30% fill. Then a point of weakness became very strong.
So my question is could you over dimension the parts to be joined, then remove the excess 'skin' and bond the two parts in that fashion? On a bigger area an old tooth brush could help penetrate the fill matrix quickly. Marker indentations into the faces to be joined could help determine how much plastic to remove.

Rob
...
--
Sent from my Android
Ronaldo
9 years ago
Permalink
I am not sure I have understood well your problem, solution and question. Are
they about puzzlecutlib.scad cuts? In the puzzlecutlib demos, the parameter
"kerf" allows for control how tight or loose the joint will be. FourDr, who
is dealing with those issues, may have an experience to share.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17566.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi Ronaldo:

I created a test coin over the weekend to test the fit of the split parts.
This only took a few minute per print compared to several hours for the
final parts. In my tests, the first print had a kerf of 0 and was so tight
the parts would not fit. On the second print with kerf of .4, again the
parts did not fit and the only difference was a gap at the bottom of the
dovetail cut instead of along the entire puzzle cut. What do you think is
the cause? See files below:

Test_Cylinder.scad
<http://forum.openscad.org/file/n17570/Test_Cylinder.scad>
puzzlecutlib.scad <http://forum.openscad.org/file/n17570/puzzlecutlib.scad>
Cylinder.stl <http://forum.openscad.org/file/n17570/Cylinder.stl>



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17570.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
9 years ago
Permalink
If you comment out the translate([0,-20,0]) in cutInTwo(), the render will
display the two parts joined together. And you will see the gap between them
around the peg when kerf is greater than 0. A low kerf will require more
precision from the 3D printer. If your printer is not well calibrated you
should try to enlarge the kerf.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17577.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi Ronaldo:

That's what I did finally when I tested the kerf with the original T shaped
cut. Which worked correctly with a -.4 kerf. But when I switched back to the
dovetail code, the kerf is not working correctly. What happens is with a +.4
I get a gap at the top of the dovetails and when I use a -.4 I get a gap at
the bottom of the dovetails. Not what is suppose to happen. What I expected
it to do was change the gap size along the entire dovetail, larger gap with
negative values and smaller gap with positive values. But that is not what
is happening.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17578.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
9 years ago
Permalink
You are right. There is an error in the way dovetail() deals with kerf.

Although it can be corrected I found a better way to define the joints.
...
To define a new cut shape it is enough to provide its list of points as a
new profile. The profile round_dt is an example.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17582.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi Ronaldo:

I added that code. It did fix the dovetail. But it is doing something weird
at the origin 0,0,0. Also, the T and the ballsocket do not render now. With
the ballsock code I get a dovetail with a half ballsocket at the origin and
with the T code I get a zigzag at the origin on one of the cuts the rest
stay as a dovetail.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17599.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
9 years ago
Permalink
FourthDr,

I could not find any trouble with the new dovetail at the origin neither
with the t_lock shape. Are you sure your xCut1 positions are correctly
spaced? If you have two of them too close, you may get strange results.

I did not include the ballsocket in my last version. As I said, to have any
other cut shape it is enough to write a list of points of the new profile.
ball_sock = concat( [ for(i=[245:-31:-65]) 0.4*[cos(i), 1.5+sin(i)] ],
[ [0.4*cos(-65),-0.1], [-0.4*cos(-65),-0.1] ] );
profile = ball_sock;
The previous round_dt shape is indeed a crude form of a rounded dovetail.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17609.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi :

Your previous code generates errors:

Compiling design (CSG Tree generation)...
WARNING: Ignoring unknown variable 'i'.
WARNING: Ignoring unknown variable 'i'.

Not sure what is causing that, since it does compile and export ok.

Was not able to get the other code for T and ballsocket to work at all. The
cut simply stays a dovetail.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17643.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
9 years ago
Permalink
I could not reproduce the errors you mentioned with my codes. Try these ones:
puzzlecutlib3.scad
<http://forum.openscad.org/file/n17646/puzzlecutlib3.scad>
Test_Cylinder.scad
<http://forum.openscad.org/file/n17646/Test_Cylinder.scad>



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17646.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
FourthDr
9 years ago
Permalink
Hi Ronaldo:

Thanks for all your help, along with everyone else that contributed to this
thread. I was able to get all three shapes working. And I got my parts 3D
printed. They fit perfectly after making several test coins with different
kerfs. The final parts used a kerf of -.275 and are tight enough that they
look like they won't need to be glued.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17696.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Ronaldo
9 years ago
Permalink
Well, I got the file manually repaired in Sketchup. It is now disgestible by
CGAL.
Cycl_XleftFrame-base_cut-repaired.stl
<http://forum.openscad.org/file/n17520/Cycl_XleftFrame-base_cut-repaired.stl>

<Failed to load image: http://forum.openscad.org/file/n17520/Cycl_XleftFrame.png>

<Failed to load image: http://forum.openscad.org/file/n17520/Cycl_XleftFrame2.png>



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17520.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Parkinbot
9 years ago
Permalink
"blade edge sharp crease" is what it says and mostly results from numerical
errors. (Almost) degenerated triangles will most probably not show up as
'desired' in the sliced path. A closer look at the triangulation (CTRL+1)
unveals what has happend.

Kisslicer indicates those errors, but silently gets around most of them.
Redness of colors indicate severity of errors.
<Failed to load image: http://forum.openscad.org/file/n17463/puzzle1.png>



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17463.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Loading...