# [OpenSCAD] problem STL

Carsten Arnholm arnholm at arnholm.org
Sat Oct 8 11:58:20 EDT 2016

```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
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>

```

More information about the Discuss mailing list