problem STL

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

problem STL

jon_bondy
When I create this STL, it is defective, but I cannot figure out what
the defect is.  It looks fine in OpenSCAD.


minID = 35;
maxID = 45;
ht = 25;
th = 2;

$fn = 100;
minIR = minID/2;
maxIR = maxID/2;

module Cup()
     rotate_extrude(convexity = 10)
         polygon([[0,0],
                  [-minIR-th,0],
                  [-maxIR-th,ht],
                  [-maxIR-th-th,ht],
                  [-maxIR-th-th,ht+th],
                  [-maxIR,ht+th],
                  [-minIR,th],
                  [0,th]]);

Cup();


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

Re: problem STL

Richard Urwin
The whole thing is inside-out.

If you view it in Thrown-together mode it's all purple. If you view it in MeshLab it's black.

To fix it, you can tell MeshaLab to reverse all the faces, Then it comes out nice and grey like it is supposed to.

https://dl.dropboxusercontent.com/u/96640124/screenshot.png

Maybe you need to reverse the order of the nodes? I'm not enough of an expert on OpenSCAD to know, but that is the issue.
Reply | Threaded
Open this post in threaded view
|

Re: problem STL

jon_bondy
Thank you.  I guess the polygon builder got everything backwards?  Or I
entered the points backwards.

Jon


On 10/8/2016 11:21 AM, Richard Urwin wrote:

> The whole thing is inside-out.
>
> If you view it in Thrown-together mode it's all purple. If you view it in
> MeshLab it's black.
>
> To fix it, you can tell MeshaLab to reverse all the faces, Then it comes out
> nice and grey like it is supposed to.
>
> https://dl.dropboxusercontent.com/u/96640124/screenshot.png
>
> Maybe you need to reverse the order of the nodes? I'm not enough of an
> expert on OpenSCAD to know, but that is the issue.
>
>
>
> --
> View this message in context: http://forum.openscad.org/problem-STL-tp18608p18609.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7797 / Virus Database: 4656/13167 - Release Date: 10/07/16
>
>


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

Re: problem STL

Ronaldo
In reply to this post by jon_bondy
2016-10-08 11:39 GMT-03:00 jon <[hidden email]>:
When I create this STL, it is defective, but I cannot figure out what the defect is.  It looks fine in OpenSCAD.

How have you detected it is defective? I had no issues importing the cup stl file in OpenSCAD (Windows version 2015.03-2 ).

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

Re: problem STL

jon_bondy
In reply to this post by Richard Urwin
Turns out if the shape is on the negative part of the Y plane, it will
always be inside out.


On 10/8/2016 11:21 AM, Richard Urwin wrote:

> The whole thing is inside-out.
>
> If you view it in Thrown-together mode it's all purple. If you view it in
> MeshLab it's black.
>
> To fix it, you can tell MeshaLab to reverse all the faces, Then it comes out
> nice and grey like it is supposed to.
>
> https://dl.dropboxusercontent.com/u/96640124/screenshot.png
>
> Maybe you need to reverse the order of the nodes? I'm not enough of an
> expert on OpenSCAD to know, but that is the issue.
>
>
>
> --
> View this message in context: http://forum.openscad.org/problem-STL-tp18608p18609.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7797 / Virus Database: 4656/13167 - Release Date: 10/07/16
>
>


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

Re: problem STL

jon_bondy
In reply to this post by Ronaldo

It appears as defective in NetFabb, and I cannot print it.


On 10/8/2016 11:28 AM, Ronaldo Persiano wrote:
2016-10-08 11:39 GMT-03:00 jon <[hidden email]>:
When I create this STL, it is defective, but I cannot figure out what the defect is.  It looks fine in OpenSCAD.

How have you detected it is defective? I had no issues importing the cup stl file in OpenSCAD (Windows version 2015.03-2 ).


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


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13167 - Release Date: 10/07/16



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

Re: problem STL

cacb
In reply to this post by jon_bondy
Your polygon is defined clockwise. Unless I am mistaken it needs to be
counterclockwise. Either reverse the order of the points or reverse the
sign of one of the coordinates.

As this is rotation symmetry about Z, it works to simply flip the sign
for the x coordinates:

minID = 35;
maxID = 45;
ht = 25;
th = 2;

$fn = 100;
minIR = minID/2;
maxIR = maxID/2;

module Cup()
     rotate_extrude(convexity = 10)
         polygon([[0,0],
                  [minIR+th,0],
                  [maxIR+th,ht],
                  [maxIR+th+th,ht],
                  [maxIR+th+th,ht+th],
                  [maxIR,ht+th],
                  [minIR,th],
                  [0,th]]);

Cup();

Carsten Arnholm


On 08. okt. 2016 16:39, jon wrote:

> When I create this STL, it is defective, but I cannot figure out what
> the defect is.  It looks fine in OpenSCAD.
>
>
> minID = 35;
> maxID = 45;
> ht = 25;
> th = 2;
>
> $fn = 100;
> minIR = minID/2;
> maxIR = maxID/2;
>
> module Cup()
>     rotate_extrude(convexity = 10)
>         polygon([[0,0],
>                  [-minIR-th,0],
>                  [-maxIR-th,ht],
>                  [-maxIR-th-th,ht],
>                  [-maxIR-th-th,ht+th],
>                  [-maxIR,ht+th],
>                  [-minIR,th],
>                  [0,th]]);
>
> Cup();
>
>
> _______________________________________________
> 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
tp3
Reply | Threaded
Open this post in threaded view
|

Re: problem STL

tp3
In reply to this post by jon_bondy
On 10/08/2016 05:35 PM, jon wrote:
> Turns out if the shape is on the negative part of the Y plane,
> it will always be inside out.
>
What version of OpenSCAD is that? Latest release?

I guess, that fix might be only in the snapshot versions:
https://github.com/openscad/openscad/issues/1282

ciao,
  Torsten.


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

Re: problem STL

jon_bondy
2105.03

Yeah.  I know.  <blush>


On 10/8/2016 12:01 PM, Torsten Paul wrote:

> On 10/08/2016 05:35 PM, jon wrote:
>> Turns out if the shape is on the negative part of the Y plane,
>> it will always be inside out.
>>
> What version of OpenSCAD is that? Latest release?
>
> I guess, that fix might be only in the snapshot versions:
> https://github.com/openscad/openscad/issues/1282
>
> ciao,
>    Torsten.
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7797 / Virus Database: 4656/13171 - Release Date: 10/08/16
>
>


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

Re: problem STL

Ronaldo
In reply to this post by cacb
cacb wrote
Your polygon is defined clockwise. Unless I am mistaken it needs to be
counterclockwise. Either reverse the order of the points or reverse the
sign of one of the coordinates.
The polygon vertex circulation does not affect the orientation of the model generated by rotate_extrude, neither with negative angles.