openScad + STL cannot render

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

openScad + STL cannot render

Helmut Deichmann
Hello,

I dit often now try to put an STL file upon the object created with openScad.
Each time when I do render this the STL objekt is simply gone.

Even as I created elefants with openScad and did put on the speaker box I ceated I could not render it.
On the other hand the STL objekt it self I can render. So no problem inside.

Senciely

Helmut Deichmann

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

Re: openScad + STL cannot render

NateTG
I would check the stl mesh with netfabb or something similar just in case.



--
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: openScad + STL cannot render

cbernhardt
In reply to this post by Helmut Deichmann
I believe the problem might be caused by the normal vectors in the STL file.
To test this I drew a 100 x 100 x 100 cube in AutoCAD and randomly drew
3DFACES (three dimensional triangular facets) to cover each side, 12
triangles total.  I then exported the cube as an STL file, calculating the
normal vector of each triangle as the cross product of the first two sides
as drawn.

When I imported the cube.stl  file into OpenSCAD it previewed (F5) and
rendered (F6) correctly but when I added an OpenSCAD object (i.e. an
extruded polygon) both objects previewed correctly but rendering (F6) caused
the STL object to disappear.

I wrote a routine inside AutoCAD to display the normal vectors when
importing an STL file and discovered that some of them, depending on the
direction in which the triangle had been drawn, did not point to the outside
of the cube.  After redrawing the suspect triangles so that all normal
vectors pointed to the outside of the cube, everything worked correctly in
OpenSCAD.

I don't know if there is a program to automatically "fix" the normal
vectors.  Perhaps some of the more experienced OpenSCAD users know of such a
program??

Charles



--
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: openScad + STL cannot render

codifies
I don't know about the likes of AutoCAD as I'm too tight to buy
propriety software and comfortable with my tin foil hat.....

however in blender you can "recalculate outside", "recalculate inside"
and also flip normals

You can also display normals which I usually do, just as a quick check...


On 31/01/18 19:57, cbernhardt wrote:

> I believe the problem might be caused by the normal vectors in the STL file.
> To test this I drew a 100 x 100 x 100 cube in AutoCAD and randomly drew
> 3DFACES (three dimensional triangular facets) to cover each side, 12
> triangles total.  I then exported the cube as an STL file, calculating the
> normal vector of each triangle as the cross product of the first two sides
> as drawn.
>
> When I imported the cube.stl  file into OpenSCAD it previewed (F5) and
> rendered (F6) correctly but when I added an OpenSCAD object (i.e. an
> extruded polygon) both objects previewed correctly but rendering (F6) caused
> the STL object to disappear.
>
> I wrote a routine inside AutoCAD to display the normal vectors when
> importing an STL file and discovered that some of them, depending on the
> direction in which the triangle had been drawn, did not point to the outside
> of the cube.  After redrawing the suspect triangles so that all normal
> vectors pointed to the outside of the cube, everything worked correctly in
> OpenSCAD.
>
> I don't know if there is a program to automatically "fix" the normal
> vectors.  Perhaps some of the more experienced OpenSCAD users know of such a
> program??
>
> Charles
>
>
>
> --
> 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: openScad + STL cannot render

atnbueno
In reply to this post by cbernhardt
You can check and fix the normals of an STL with the --normal-directions option of ADMesh:

2018-01-31 20:57 GMT+01:00 cbernhardt <[hidden email]>:
I believe the problem might be caused by the normal vectors in the STL file.
To test this I drew a 100 x 100 x 100 cube in AutoCAD and randomly drew
3DFACES (three dimensional triangular facets) to cover each side, 12
triangles total.  I then exported the cube as an STL file, calculating the
normal vector of each triangle as the cross product of the first two sides
as drawn.

When I imported the cube.stl  file into OpenSCAD it previewed (F5) and
rendered (F6) correctly but when I added an OpenSCAD object (i.e. an
extruded polygon) both objects previewed correctly but rendering (F6) caused
the STL object to disappear.

I wrote a routine inside AutoCAD to display the normal vectors when
importing an STL file and discovered that some of them, depending on the
direction in which the triangle had been drawn, did not point to the outside
of the cube.  After redrawing the suspect triangles so that all normal
vectors pointed to the outside of the cube, everything worked correctly in
OpenSCAD.

I don't know if there is a program to automatically "fix" the normal
vectors.  Perhaps some of the more experienced OpenSCAD users know of such a
program??

Charles



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

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



--
Saludos,
Antonio



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

Re: openScad + STL cannot render

Parkinbot
In reply to this post by cbernhardt
OpenSCAD like most other programms doesn't make use of the normals at all. It
recalcs them from the vertices. You can check that by rendering and
exporting

cube(10);

e.g. to my.stl. Open the STL with an editor and modify the normals as you
like. Then import the result and check:

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





--
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: openScad + STL cannot render

Helmut Deichmann
In reply to this post by Helmut Deichmann
Hello found my problem, my Laptop has no enough memory. I have Importe the upper part of the speak er as stl. It us running and cab be redndert very fast, perhaps couse made with openScad. So I selected Another stl File and did render. What I had to see was the spwaker part was missing and the elephan was there. 
Problem is clear now.
Thanks for the replay.

Helmut Deichmann 



Von meinem Samsung Gerät gesendet.


-------- Ursprüngliche Nachricht --------
Von: Parkinbot <[hidden email]>
Datum: 31.01.18 22:29 (GMT+01:00)
An: [hidden email]
Betreff: Re: [OpenSCAD] openScad + STL cannot render

OpenSCAD like most other programms doesn't make use of the normals at all. It
recalcs them from the vertices. You can check that by rendering and
exporting

cube(10);

e.g. to my.stl. Open the STL with an editor and modify the normals as you
like. Then import the result and check:

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





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