objects made with for loops show in preview, but won't render

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

objects made with for loops show in preview, but won't render

onion
hey folks,

i'm placing .stls in a specific order (using a for loop) and while they show
up in preview, they don't show up in the render, and it occasionally bounces
back warnings like "UI-WARNING: Object may not be a valid 2-manifold and may
need repair!"

my first thought was that my .stl is broken, but i'm actually placing the
same .stl outside of a loop, and that one shows up fine.

here's a snapshot of the code:
<http://forum.openscad.org/file/t2636/openscadCode.png>

preview:
<http://forum.openscad.org/file/t2636/cukeSlice1.png>

render:
<http://forum.openscad.org/file/t2636/cukeSlice2.png>

does anyone know what's wrong? i'm worried it has to do with my function
math but i don't know enough about how that math is processed to
troubleshoot further. any help would be super appreciated.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: objects made with for loops show in preview, but won't render

MichaelAtOz
Administrator
Try:

import("cuke.stl");
cube(1);

If you just have one object it doesn't call CGAL, the cube() forces a
union(), I suspect the stl is bad, uploaded it here and I'll have a look.



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

* click on my MichaelAtOz label, there is a link to email me.

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.

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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.
Reply | Threaded
Open this post in threaded view
|

Re: objects made with for loops show in preview, but won't render

onion
here's the .stl:
cuke.stl <http://forum.openscad.org/file/t2636/cuke.stl>  

i tried cube(1), interestingly this made it stop rendering any of the
objects?

if it's ok, can i ask why cgal isn't called for one object? i know what cgal
is, technically, but i'm not super familiar with how it works



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: objects made with for loops show in preview, but won't render

nophead
No if you only have one object then CGAL isn't called, the object is just drawn and may look OK even if it is broken. As soon as you have two or more it has to union them, so CGAL will be called and it won't accept anything that is non-manifold.

On Sun, 1 Mar 2020 at 23:09, onion <[hidden email]> wrote:
here's the .stl:
cuke.stl <http://forum.openscad.org/file/t2636/cuke.stl> 

i tried cube(1), interestingly this made it stop rendering any of the
objects?

if it's ok, can i ask why cgal isn't called for one object? i know what cgal
is, technically, but i'm not super familiar with how it works



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: objects made with for loops show in preview, but won't render

onion
This post was updated on .
oh ok cool, thanks! i'll look into fixing the .stl, super appreciate the
quick responses

edit: fixing the .stl worked, thanks again



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: objects made with for loops show in preview, but won't render

MichaelAtOz
Administrator
onion wrote

> oh ok cool, thanks! i'll look into fixing the .stl, super appreciate the
> quick responses
>
> edit: fixing the .stl worked, thanks again
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Yeh, didn't look good:
<http://forum.openscad.org/file/t359/onion_cuke.jpg>

Purple = duplicate triangles, red=self-intersections



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

* click on my MichaelAtOz label, there is a link to email me.

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.

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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.