discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Difference between an extruded polygon and a cylinder

B
Britfox
Wed, Nov 11, 2015 2:11 PM

Hello,

*$fa = 0.01;
$fs = 0.2;

difference(){
translate([0,0,10]) rotate([270,0,0])
rotate_extrude() polygon(points=[
[3,0],[3,20],
[6,20],[6,18],
[5,18],[4,16],
[4,0]]);
cylinder(20,8,8);}*

And below is what i'm seeing using this code and the preview mode:
http://forum.openscad.org/file/n14369/151111025932137720.png

I'm seeing "through" the oject at certain view angles:
Is this a known problem ? Does it come from my old graphic card drivers ?

I guess the other way to do this is by using some primitives solids but I
really like the rotate_extrude and polygon commands.

Thanks for your help.

--
View this message in context: http://forum.openscad.org/Difference-between-an-extruded-polygon-and-a-cylinder-tp14369.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hello, *$fa = 0.01; $fs = 0.2; difference(){ translate([0,0,10]) rotate([270,0,0]) rotate_extrude() polygon(points=[ [3,0],[3,20], [6,20],[6,18], [5,18],[4,16], [4,0]]); cylinder(20,8,8);}* And below is what i'm seeing using this code and the preview mode: <http://forum.openscad.org/file/n14369/151111025932137720.png> I'm seeing "through" the oject at certain view angles: Is this a known problem ? Does it come from my old graphic card drivers ? I guess the other way to do this is by using some primitives solids but I really like the rotate_extrude and polygon commands. Thanks for your help. -- View this message in context: http://forum.openscad.org/Difference-between-an-extruded-polygon-and-a-cylinder-tp14369.html Sent from the OpenSCAD mailing list archive at Nabble.com.
T
thehans
Wed, Nov 11, 2015 2:26 PM

This issue is solved by increasing the convexity parameter on the
rotate_extrude call

just increasing it to 3 works for me, on your example.  More complex objects
may require higher values.  Higher values will take longer to preview

rotate_extrude(convexity=3) polygon(points=[
...

--
View this message in context: http://forum.openscad.org/Difference-between-an-extruded-polygon-and-a-cylinder-tp14369p14370.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

This issue is solved by increasing the convexity parameter on the rotate_extrude call just increasing it to 3 works for me, on your example. More complex objects may require higher values. Higher values will take longer to preview rotate_extrude(convexity=3) polygon(points=[ ... -- View this message in context: http://forum.openscad.org/Difference-between-an-extruded-polygon-and-a-cylinder-tp14369p14370.html Sent from the OpenSCAD mailing list archive at Nabble.com.
B
Britfox
Wed, Nov 11, 2015 2:31 PM

Thank you thehans !

--
View this message in context: http://forum.openscad.org/Difference-between-an-extruded-polygon-and-a-cylinder-tp14369p14371.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Thank you thehans ! -- View this message in context: http://forum.openscad.org/Difference-between-an-extruded-polygon-and-a-cylinder-tp14369p14371.html Sent from the OpenSCAD mailing list archive at Nabble.com.