discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

a pinhole makes object nonplanar

JJ
Johan Jonker
Wed, Dec 21, 2016 3:10 PM

http://forum.openscad.org/file/n19659/bcneck.jpg
Another attempt of me to get the best out of OpenSCAD stranded on non planar
messages. It is a bass clarinet neck. I tried it by just making an sweeping
or skinning an outside and make it hollow by subtracting an similar inside.
Version: 2016.10.04
Windows: 10

The picture above works when I disable all the objects in the
difference-list. But when I enable just the tiny pinhole there are nonplanar
warnings and no results.
I checked the main objects with Meshlab and NettFab. No problems
reported.How do I solve this?
This is the output in the consule:

--
View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

<http://forum.openscad.org/file/n19659/bcneck.jpg> Another attempt of me to get the best out of OpenSCAD stranded on non planar messages. It is a bass clarinet neck. I tried it by just making an sweeping or skinning an outside and make it hollow by subtracting an similar inside. Version: 2016.10.04 Windows: 10 The picture above works when I disable all the objects in the difference-list. But when I enable just the tiny pinhole there are nonplanar warnings and no results. I checked the main objects with Meshlab and NettFab. No problems reported.How do I solve this? This is the output in the consule: -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Wed, Dec 21, 2016 4:21 PM

Johan, there is a problem just with neck_in.stl. It cannot be boolean
operated.

I have loaded it in Meshlab and repaired it with Merge Close Vertices. Two
vertices were merged and all problems has gone:

http://forum.openscad.org/file/n19660/Neck.png

The repaired stl:  neck_in_a.stl
http://forum.openscad.org/file/n19660/neck_in_a.stl

--
View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19660.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Johan, there is a problem just with neck_in.stl. It cannot be boolean operated. I have loaded it in Meshlab and repaired it with Merge Close Vertices. Two vertices were merged and all problems has gone: <http://forum.openscad.org/file/n19660/Neck.png> The repaired stl: neck_in_a.stl <http://forum.openscad.org/file/n19660/neck_in_a.stl> -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19660.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RU
Richard Urwin
Wed, Dec 21, 2016 4:27 PM

Has anyone ever written an idiots guide to Meshlab? There are loads of
options and I have no idea which ones are worth trying.

--
View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19661.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Has anyone ever written an idiots guide to Meshlab? There are loads of options and I have no idea which ones are worth trying. -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19661.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JJ
Johan Jonker
Wed, Dec 21, 2016 5:22 PM

I really need that idiots manual ;-)
Thanks Ronaldo for doing that. But does it mean that it can be boolean
operated?The problem is how to prevent it in OpenSCAD.
The problem also occured without subtracting the inside. Only with a very
small 22m hole in the outside.
neck_version2.scad
http://forum.openscad.org/file/n19664/neck_version2.scad
I tried a complete different approach without using skin or sweep.
Instead of that I make a ring of two circles and use lineair_extrude and
rotate_extrude.That seems to work even with the pinhole. So it seems that
the surface of the skin and sweep is different from the extruded circle.
http://forum.openscad.org/file/n19664/bcneck2.jpg

--
View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19664.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I really need that idiots manual ;-) Thanks Ronaldo for doing that. But does it mean that it can be boolean operated?The problem is how to prevent it in OpenSCAD. The problem also occured without subtracting the inside. Only with a very small 22m hole in the outside. neck_version2.scad <http://forum.openscad.org/file/n19664/neck_version2.scad> I tried a complete different approach without using skin or sweep. Instead of that I make a ring of two circles and use lineair_extrude and rotate_extrude.That seems to work even with the pinhole. So it seems that the surface of the skin and sweep is different from the extruded circle. <http://forum.openscad.org/file/n19664/bcneck2.jpg> -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19664.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Wed, Dec 21, 2016 7:21 PM

I don't believe the issue is the use of skin or sweep. It may happen with
linear_extrude or rotate_extrude too. If you make a difference of any mesh
and a hole shape, it may happen that some new vertices appear very near to
original ones. And that is possibly the problematic cause.

Yes, I did boolean operations with the repaired neck_in_a.stl and it came
out all right. But when I subtract the following cube from your new model,
CGAL issues a warning that the object may not be a valid 2-manifold:

translate([0,0,60]) cube(50);

2016-12-21 15:22 GMT-02:00 Johan Jonker johangjonker@zonnet.nl:

I really need that idiots manual ;-)
Thanks Ronaldo for doing that. But does it mean that it can be boolean
operated? The problem is how to prevent it in OpenSCAD.
The problem also occured without subtracting the inside. Only with a very
small 22m hole in the outside.

I don't believe the issue is the use of skin or sweep. It may happen with linear_extrude or rotate_extrude too. If you make a difference of any mesh and a hole shape, it may happen that some new vertices appear very near to original ones. And that is possibly the problematic cause. Yes, I did boolean operations with the repaired neck_in_a.stl and it came out all right. But when I subtract the following cube from your new model, CGAL issues a warning that the object may not be a valid 2-manifold: translate([0,0,60]) cube(50); 2016-12-21 15:22 GMT-02:00 Johan Jonker <johangjonker@zonnet.nl>: > I really need that idiots manual ;-) > Thanks Ronaldo for doing that. But does it mean that it can be boolean > operated? The problem is how to prevent it in OpenSCAD. > The problem also occured without subtracting the inside. Only with a very > small 22m hole in the outside. > > >
R
Ronaldo
Wed, Dec 21, 2016 9:07 PM

This may be a source of troubles:
http://forum.openscad.org/file/n19667/joint.png
That is a high zoom of the joint line of a linear_extrude and a
rotate_extrude. You have set $fn= 100 in the rotate_extrudes and $fn=80 in
linear_extrudes. The joint shows a series of very thin triangles. If you use
the same refinement in both and care about matching the joint may be
cleaner. I am not saying that it is the cause of the CGAL warning but
depending on the mismatch it may lead you to troubles that doesn't happen
with sweep/skin.

--
View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19667.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

This may be a source of troubles: <http://forum.openscad.org/file/n19667/joint.png> That is a high zoom of the joint line of a linear_extrude and a rotate_extrude. You have set $fn= 100 in the rotate_extrudes and $fn=80 in linear_extrudes. The joint shows a series of very thin triangles. If you use the same refinement in both and care about matching the joint may be cleaner. I am not saying that it is the cause of the CGAL warning but depending on the mismatch it may lead you to troubles that doesn't happen with sweep/skin. -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19667.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JJ
Johan Jonker
Wed, Dec 21, 2016 9:32 PM

That is a very interesting example. That makes it a bit more understandable
why things like this happen and what can be done to prevent it. Thanks!

--
View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19668.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

That is a very interesting example. That makes it a bit more understandable why things like this happen and what can be done to prevent it. Thanks! -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19668.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Wed, Dec 21, 2016 9:45 PM

Here is an experiment. I rendered the code:

$fn = 12;

difference(){
rotate_extrude()
translate([50,0,0])
circle(10);

translate([50,3-2e-5,-20])
cylinder(r=3,h=40);
}

and got this very near the point [50,0,10] :
http://forum.openscad.org/file/n19669/Before_meshlab.png
I generated a stl file and merged their closed vertices with Meshlab.
Importing the result back into OpenSCAD, it rendered as:
http://forum.openscad.org/file/n19669/After_meshlab.png
As you see the small triangles by the hole border vanished.

When we do a boolean operations these small triangles may well appear and
cause troubles because there is no clean up or it leaves holes or other
artifact. One workaround may be to shift the holes a little.

--
View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19669.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Here is an experiment. I rendered the code: > $fn = 12; > > difference(){ > rotate_extrude() > translate([50,0,0]) > circle(10); > > translate([50,3-2e-5,-20]) > cylinder(r=3,h=40); > } and got this very near the point [50,0,10] : <http://forum.openscad.org/file/n19669/Before_meshlab.png> I generated a stl file and merged their closed vertices with Meshlab. Importing the result back into OpenSCAD, it rendered as: <http://forum.openscad.org/file/n19669/After_meshlab.png> As you see the small triangles by the hole border vanished. When we do a boolean operations these small triangles may well appear and cause troubles because there is no clean up or it leaves holes or other artifact. One workaround may be to shift the holes a little. -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19669.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Wed, Dec 21, 2016 10:27 PM

Richard Urwin wrote

Has anyone ever written an idiots guide to Meshlab? There are loads of
options and I have no idea which ones are worth trying.

Richard Urwin wrote > Has anyone ever written an idiots guide to Meshlab? There are loads of > options and I have no idea which ones are worth trying. http://www.shapeways.com/tutorials/how_to_use_meshlab_and_netfabb <http://www.shapeways.com/tutorials/how_to_use_meshlab_and_netfabb> -- View this message in context: http://forum.openscad.org/a-pinhole-makes-object-nonplanar-tp19659p19671.html Sent from the OpenSCAD mailing list archive at Nabble.com.