discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

rotate_extrude with polygon touching x-axis

T
Trygon
Sat, Aug 29, 2015 6:32 AM

I just wanted to check that I am correct in assuming that rotate_extrude has
some specific logic that deals with polygons that touch the x-axis, e.g.

d=1;
p=[[d,-10],[20,-10],[20,10],[d,10]];
rotate_extrude() polygon(p);

The centre hole closes when d=0.  Is this OK, no danger of leaving a very
small hole and/or "junk" on the centre line?

Thanks.

--
View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I just wanted to check that I am correct in assuming that rotate_extrude has some specific logic that deals with polygons that touch the x-axis, e.g. d=1; p=[[d,-10],[20,-10],[20,10],[d,10]]; rotate_extrude() polygon(p); The centre hole closes when d=0. Is this OK, no danger of leaving a very small hole and/or "junk" on the centre line? Thanks. -- View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Sat, Aug 29, 2015 10:13 AM

I had lots of problems with this while working on this project.

F6 exposed the problem and this approach fixed it.

--
View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636p13638.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I had lots of problems with this while working on this project. - http://www.thingiverse.com/thing:923244 So my solution was to purposely shift the profile 0.1 off the Yaxis and then union in a cylinder that was radius > 0.1 to fill the hole. F6 exposed the problem and this approach fixed it. -- View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636p13638.html Sent from the OpenSCAD mailing list archive at Nabble.com.
T
Trygon
Sat, Aug 29, 2015 3:50 PM

I had wondered, as you suggest, if leaving a small hole and then filling it
in with a cylinder was a safer option, particularly given that numbers are
held as floating point.

However the OpenSCAD manual does include an example that creates a solid
with no central hole:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#Extruding_a_Polygon
...?

--
View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636p13640.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I had wondered, as you suggest, if leaving a small hole and then filling it in with a cylinder was a safer option, particularly given that numbers are held as floating point. However the OpenSCAD manual does include an example that creates a solid with no central hole: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#Extruding_a_Polygon ...? -- View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636p13640.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Sat, Aug 29, 2015 10:33 PM

I agree it should work - and maybe it works with Zero.
But I created my curves in inkscape and exported from there and so mine all
have long floating point values. Top and Bottom are the same but FP.
So I ran into this  problem. Its quite likely (given other threads) that its
simply an FP accuracy problem and CGAL should work it perfectly.

So if you can do it with Zero as your major axis endpoint - I'm guessing
it'll probably work.

--
View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636p13642.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I agree it should work - and maybe it works with Zero. But I created my curves in inkscape and exported from there and so mine all have long floating point values. Top and Bottom are the same but FP. So I ran into this problem. Its quite likely (given other threads) that its simply an FP accuracy problem and CGAL should work it perfectly. So if you can do it with Zero as your major axis endpoint - I'm guessing it'll probably work. -- View this message in context: http://forum.openscad.org/rotate-extrude-with-polygon-touching-x-axis-tp13636p13642.html Sent from the OpenSCAD mailing list archive at Nabble.com.