I thought I'd add this observation
When adding a mesh in MashLab it offers the pre-checked option "Unify
Duplicated Verticies"
Without it checked the STL from above has these self intersects
http://forum.openscad.org/file/n16018/ML_non-unify.jpg
With it checked
http://forum.openscad.org/file/n16018/ML_unify.jpg
While it didn't fix everything, perhaps the code used to "unify" could be of
use in OpenSCAD?
Newly minted Admin - PM me if you need anything, or if I've done something stupid...
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. Obviously inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/dxf-and-stl-import-rendering-issue-tp15979p16018.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
On 02. feb. 2016 01:24, nop head wrote:
The example you gave of the crack is non-manifold if vertices 5 & 7 are
not distinct.
The example is manifold and the vertices 5 and 7 are distinct because I
told you they are, and it is plain to see. If you think not it is
because you are confusing geometry and topology.
STL can represent manifold meshes unambiguously and you
can then do boolean ops on them.
Now it is your turn to simply repeat something that has been
demonstrated to be incorrect.
As soon as you have topologically distinct vertices that are numerically
the same STL can't represent the topology,
I am forced to conclude you are unable to separate between the
definition of geometry and topology.
As long as you have the property that topologically distinct vertices
that are numerically distinct then you can convert a mesh to a list of
triangles and then reconstruct the mesh from those triangles. It will be
exactly the same.
I am afraid we are wasting time here. As long as you cannot understand
that topology is independent of geometry, we get nowhere.
You are saying it works only in some cases, although what you call
"topologically distinct vertices" isn't what you think, you are thinking
of geometrically distinct points, and that is not topology.
The weakness of STL is it relies on vertex values not being rounded or
truncated. They must be written and read with great care, especially in
ASCII.
You are still talking about geometry. There are no shared vertices in
STL, only within each and every triangle. My example yesterday
demonstrated that OpenSCAD fails on your criterion "They must be written
and read with great care", because when you re-import the result is not
the same as the original. Geometry-wise, this is because the coordinates
written by OpenSCAD are no better than single precision floats (6
significant digits).
Your multi-step problem is nothing to do with topology.
Please do not misrepresent what I said. I said very explicitly "On the
question of geometry: I did some simple tests on creating and importing
STL file".
Now you say it is nothing to do with topology. Right, I told you so. I
was demonstrating that the problem with STL is not limited to issues
with preserving topology, but it also has issues with preserving
geometry. It fails on both accounts. The .scad file demonstrates the
geometry problem.
When imported the results are differenced with the non-trucated versions
the result is very thin slivers and OpenScad seems to not be able to
handle them correctly.
Right, the geometry is not properly preserved on STL the way it is
implemented in OpenSCAD, it is destined to fail for such cases.
If you fail to handle both topology and geometry properly and
separately, there will be problems. The suggested ways to rectify these
problems have already been discussed, so I will not repeat.
Carsten Arnholm