discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] puzzlecutlib rendering problem & STL export error Current top level object is empty.

M
MichaelAtOz
Tue, May 31, 2016 6:02 AM

FourthDr wrote

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);
}

http://forum.openscad.org/file/n17481/td17440_edit_f5.jpg

Which renders & exports;

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.

FourthDr wrote > 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); } <http://forum.openscad.org/file/n17481/td17440_edit_f5.jpg> Which renders & exports; <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.
NH
nop head
Tue, May 31, 2016 7:26 AM

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.

On 31 May 2016 at 07:02, MichaelAtOz oz.at.michael@gmail.com wrote:

FourthDr wrote

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);
}

http://forum.openscad.org/file/n17481/td17440_edit_f5.jpg

Which renders & exports;

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.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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. On 31 May 2016 at 07:02, MichaelAtOz <oz.at.michael@gmail.com> wrote: > FourthDr wrote > > 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); > } > > > <http://forum.openscad.org/file/n17481/td17440_edit_f5.jpg> > > Which renders & exports; > > <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. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
F
FourthDr
Tue, May 31, 2016 6:59 PM

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.

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.
DG
David Gustavson
Tue, May 31, 2016 7:19 PM

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

On Tue, May 31, 2016, at 11:59 AM, FourthDr wrote:

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.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 On Tue, May 31, 2016, at 11:59 AM, FourthDr wrote: > 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. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
F
FourthDr
Tue, May 31, 2016 7:25 PM

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.

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.
N
nophead
Tue, May 31, 2016 8:27 PM

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.

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.
M
MichaelAtOz
Tue, May 31, 2016 10:58 PM

FourthDr wrote

Here are the original stl files before any changes:

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 wrote > Here are the original stl files before any changes: 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.
F
FourthDr
Wed, Jun 1, 2016 8:15 PM

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.

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.
R
Ronaldo
Thu, Jun 2, 2016 3:27 AM

FourthDr wrote

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
puzzlecutlib.scad:

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);

To get a ball socket substitute those lines by:

translate([i,0,0]) ball_socket(cutSize, kerf, stampSize[2]);

and for a dovetail by:

translate([i,0,0]) dovetail(cutSize, kerf, stampSize[2]);

where those modules should be defined as:

module dovetail(cutSize, kerf, height) {
angle = 12;
offset = kerf*(1/2+tan(angle));
intersection(){
translate([-cutSize/2-offset, cutSize+kerf, -1])
rotate([0,0,-90+angle]) cube([cutSize2, cutSize2,
height+2]);
scale([-1,1,1])
translate([-cutSize/2-offset, cutSize+kerf, -1])
rotate([0,0,-90+angle]) cube([cutSize2, cutSize2,
height+2]);
cube([2*(cutSize+kerf), 2cutSize+kerf, 2(height+1)], center =
true);
}
}

module ball_socket(cutSize, kerf, height){
cube ([(cutSize / 2) + kerf, cutSize - kerf * 2,height+2], center
= true);
translate([0,cutSize/2,0])
cylinder(r=cutSize/2 + kerf/2, h = height+2, $fn=12, center =
true);
}

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 wrote > 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 puzzlecutlib.scad: > 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); To get a ball socket substitute those lines by: > translate([i,0,0]) ball_socket(cutSize, kerf, stampSize[2]); and for a dovetail by: > translate([i,0,0]) dovetail(cutSize, kerf, stampSize[2]); where those modules should be defined as: > module dovetail(cutSize, kerf, height) { > angle = 12; > offset = kerf*(1/2+tan(angle)); > intersection(){ > translate([-cutSize/2-offset, cutSize+kerf, -1]) > rotate([0,0,-90+angle]) cube([cutSize*2, cutSize*2, > height+2]); > scale([-1,1,1]) > translate([-cutSize/2-offset, cutSize+kerf, -1]) > rotate([0,0,-90+angle]) cube([cutSize*2, cutSize*2, > height+2]); > cube([2*(cutSize+kerf), 2*cutSize+kerf, 2*(height+1)], center = > true); > } > } > > module ball_socket(cutSize, kerf, height){ > cube ([(cutSize / 2) + kerf, cutSize - kerf * 2,height+2], center > = true); > translate([0,cutSize/2,0]) > cylinder(r=cutSize/2 + kerf/2, h = height+2, $fn=12, center = > true); > } 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.
R
Ronaldo
Thu, Jun 2, 2016 4:17 AM

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

http://forum.openscad.org/file/n17520/Cycl_XleftFrame.png

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.

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> <http://forum.openscad.org/file/n17520/Cycl_XleftFrame.png> <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.