I have a larger model where F5 works but F6 fails. The problem seems to be related to what I'm generating using skin(). Here's a small model that shows the problem:
<quote>use <scad-utils/transformations.scad>
use <scad-utils/lists.scad>
use <scad-utils/shapes.scad>
use <skin.scad>
airfoil_inch = [ [0.00,0.00], [.031,.084], [.062,.123], [.125,.176], [.250,.243],
[.375,.290], [.500,.324], [.625,.349], [.750,.366], [1.00,.375],
[1.25,.343], [1.50,.285], [1.75,.208], [2.00,.126], [2.25,0.00] ];
scale_factor = 1.82/2.5;
airfoil_mm = [ for (i = [0:len(airfoil_inch)-1]) airfoil_inch[i]25.4 ];
airfoil_mm_scaled = [ for (i = [0:len(airfoil_inch)-1]) scale_factorairfoil_mm[i] ];
color("red") translate([30,0,0]) skin([
transform(translation([-25.4,0,0]), airfoil_mm),
transform(translation([-scale_factor*25.4,0,25.4]), airfoil_mm_scaled)
]);
translate([-35,0,0]) linear_extrude(height = 25.4, center = false, convexity = 10, twist = 0, scale = scale_factor)
translate([-25.4,0,0]) polygon(points = airfoil_mm);
</quote>
When I turn on Thrown Together, the red airfoil transforms to all "pink". What I read says this is bad, but I see nothing in the underlying 2D shape that sticks out as a problem. What am I missing here? I'm running with OpenSCAD 2015.03-3 on a 10.12.6 Mac.
Works without a problem here with 2015.03.
Puzzling.
Jon
On 1/13/2018 6:10 PM, jltbel@aol.com wrote:
I have a larger model where F5 works but F6 fails. The problem seems
to be related to what I'm generating using skin(). Here's a small
model that shows the problem:
airfoil_inch = [ [0.00,0.00], [.031,.084], [.062,.123], [.125,.176],
[.250,.243],
[.375,.290], [.500,.324], [.625,.349], [.750,.366],
[1.00,.375],
[1.25,.343], [1.50,.285], [1.75,.208], [2.00,.126],
[2.25,0.00] ];
scale_factor = 1.82/2.5;
airfoil_mm = [ for (i = [0:len(airfoil_inch)-1]) airfoil_inch[i]25.4 ];
airfoil_mm_scaled = [ for (i = [0:len(airfoil_inch)-1])
scale_factorairfoil_mm[i] ];
color("red") translate([30,0,0]) skin([
transform(translation([-25.4,0,0]), airfoil_mm),
transform(translation([-scale_factor*25.4,0,25.4]), airfoil_mm_scaled)
]);
translate([-35,0,0]) linear_extrude(height = 25.4, center = false,
convexity = 10, twist = 0, scale = scale_factor)
translate([-25.4,0,0]) polygon(points = airfoil_mm);
</quote>
When I turn on Thrown Together, the red airfoil transforms to all
"pink". What I read says this is bad, but I see nothing in the
underlying 2D shape that sticks out as a problem. What am I missing
here? I'm running with OpenSCAD 2015.03-3 on a 10.12.6 Mac.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.
What O/S are you running on? O/S X, PC, Linux?
Sent from: http://forum.openscad.org/
It turns pink because you polygon is defined in wrong order. skin() expects
airfoil_inch = reverse([ [0.00,0.00], [.031,.084], [.062,.123], [.125,.176],
[.250,.243],
[.375,.290], [.500,.324], [.625,.349], [.750,.366],
[1.00,.375],
[1.25,.343], [1.50,.285], [1.75,.208], [2.00,.126],
[2.25,0.00] ]);
--
Sent from: http://forum.openscad.org/
Thanks, that works. From this fix, I gather that when you are defining a 2D polygon to be extruded to 3D, the points have to be defined in a CCW manner (i.e. the right hand rule wrt the z-axis). linear_extrude must have some way of fixing that, as it doesn't seem to care whether the points are CW or CCW.
-----Original Message-----
From: Parkinbot rudolf@parkinbot.com
To: discuss discuss@lists.openscad.org
Sent: Sun, Jan 14, 2018 2:27 am
Subject: Re: [OpenSCAD] Problem with skin()
It turns pink because you polygon is defined in wrong order. skin() expects
airfoil_inch = reverse([ [0.00,0.00], [.031,.084], [.062,.123], [.125,.176],
[.250,.243],
[.375,.290], [.500,.324], [.625,.349], [.750,.366],
[1.00,.375],
[1.25,.343], [1.50,.285], [1.75,.208], [2.00,.126],
[2.25,0.00] ]);
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
B29Parts wrote
From this fix, I gather that when you are defining a 2D polygon to be
extruded to 3D, the points have to be defined in a CCW manner (i.e. the
right hand rule wrt the z-axis).
Well, it depends on the direction you are extruding. You could also call
skin() with polygons in reversed order
skin([
transform(translation([-scale_factor*25.4,0,25.4]), airfoil_mm_scaled),
transform(translation([-25.4,0,0]), airfoil_mm),
]);
to get the desired result with unreversed vertex order. Always use F12 to
check if you got the right order.
--
Sent from: http://forum.openscad.org/