discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Non-manifold when union() or hull() a torus created with rotate_extrude()

Q
QuackingPlums
Tue, Dec 9, 2014 11:23 AM

I was investigating ways of filleting cylinders to make "cup" shapes and
thought I would be clever by hulling a torus with a regular cylinder, but I
consistently get a "non manifold" error when slicing the output.

Here is my code:

fillet_radius = 5;
inner_r = 30;
outer_r = inner_r+5;
cup_height = 70;

difference()
{
// outer cup
cylinder(h=cup_height, r=outer_r);

// inner cavity
translate([0, 0, fillet_radius])
	Cup(cup_height, inner_r, fillet_radius);

}

module Cup(height, radius, fillet_radius)
{
translate([0, 0, fillet_radius])
hull()
{
Ring_torus(R = radius-fillet_radius, r = fillet_radius);
cylinder(h = height-fillet_radius, r = radius);
}
}

module Ring_torus(R, r)
{
rotate_extrude()
translate([R, 0, 0])
circle(r);
}

I have tried unioning the various parts before hulling, and also replacing
the hull with unions of cylinders (one large one, one small one, and a ring
torus to bridge the two) but the error persists.

I've tried adding fudge factors in case there's a problem at the toroidal
'equator' but it doesn't help.

Interestingly, the problem doesn't occur if I don't union or hull the torus
with a cylinder. Is there a winding issue with objects created with
rotate_extrude() that only manifests when unioned with another object?

--
View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I was investigating ways of filleting cylinders to make "cup" shapes and thought I would be clever by hulling a torus with a regular cylinder, but I consistently get a "non manifold" error when slicing the output. Here is my code: fillet_radius = 5; inner_r = 30; outer_r = inner_r+5; cup_height = 70; difference() { // outer cup cylinder(h=cup_height, r=outer_r); // inner cavity translate([0, 0, fillet_radius]) Cup(cup_height, inner_r, fillet_radius); } module Cup(height, radius, fillet_radius) { translate([0, 0, fillet_radius]) hull() { Ring_torus(R = radius-fillet_radius, r = fillet_radius); cylinder(h = height-fillet_radius, r = radius); } } module Ring_torus(R, r) { rotate_extrude() translate([R, 0, 0]) circle(r); } I have tried unioning the various parts before hulling, and also replacing the hull with unions of cylinders (one large one, one small one, and a ring torus to bridge the two) but the error persists. I've tried adding fudge factors in case there's a problem at the toroidal 'equator' but it doesn't help. Interestingly, the problem doesn't occur if I don't union or hull the torus with a cylinder. Is there a winding issue with objects created with rotate_extrude() that only manifests when unioned with another object? -- View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Tue, Dec 9, 2014 6:33 PM

On 12/09/2014 12:23 PM, QuackingPlums wrote:

I was investigating ways of filleting cylinders to make "cup" shapes and
thought I would be clever by hulling a torus with a regular cylinder, but I
consistently get a "non manifold" error when slicing the output.

I can't see any problems with the latest dev-snapshot on Linux. The exported
STL looks good in NetFabb.

ciao,
Torsten.

On 12/09/2014 12:23 PM, QuackingPlums wrote: > I was investigating ways of filleting cylinders to make "cup" shapes and > thought I would be clever by hulling a torus with a regular cylinder, but I > consistently get a "non manifold" error when slicing the output. > I can't see any problems with the latest dev-snapshot on Linux. The exported STL looks good in NetFabb. ciao, Torsten.
Q
QuackingPlums
Wed, Dec 10, 2014 9:04 AM

Weird - got an email reply from Marius but it didn't show up on nabble.

kintel wrote

but I consistently get a "non manifold" error when slicing the output.

I quickly tested your file and opened it in Slic3r. Everything looks fine
there (using OpenSCAD-2014.12.07 on Mac an the latest Slic3r).

Could you specify which version of OpenSCAD, which OS as well as where you
get non-manifold errors reported?

-Marius

I'm still on the 11.05 snapshot of OpenSCAD on OSX - I'll update it later
and try again. I haven't tried running it through netfabb so I'll do that
too.
It sounds like Slic3r might be my problem - I tend to use whichever version
that is bundled with Repetier Host, and I have been a little lax in updating
this across all of my machines lately (I use a combination of OSX and
Windows).

--
View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448p10468.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Weird - got an email reply from Marius but it didn't show up on nabble. kintel wrote >> but I consistently get a "non manifold" error when slicing the output. >> > I quickly tested your file and opened it in Slic3r. Everything looks fine > there (using OpenSCAD-2014.12.07 on Mac an the latest Slic3r). > > Could you specify which version of OpenSCAD, which OS as well as where you > get non-manifold errors reported? > > -Marius I'm still on the 11.05 snapshot of OpenSCAD on OSX - I'll update it later and try again. I haven't tried running it through netfabb so I'll do that too. It sounds like Slic3r might be my problem - I tend to use whichever version that is bundled with Repetier Host, and I have been a little lax in updating this across all of my machines lately (I use a combination of OSX and Windows). -- View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448p10468.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Wed, Dec 10, 2014 11:45 AM

God works in mysterious ways...  ;)


Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/

View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448p10472.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

God works in mysterious ways... ;) ----- Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ -- View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448p10472.html Sent from the OpenSCAD mailing list archive at Nabble.com.
B
Bananapeel
Wed, Dec 10, 2014 12:06 PM

I read that one on nabble, it must have been deleted.

--
View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448p10473.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I read that one on nabble, it must have been deleted. -- View this message in context: http://forum.openscad.org/Non-manifold-when-union-or-hull-a-torus-created-with-rotate-extrude-tp10448p10473.html Sent from the OpenSCAD mailing list archive at Nabble.com.