Closed 1939938853 closed 11 months ago
Hello This looks like a wrong thickness was computed for some points of your meshes, this can happen when the input meshes contains geometry artifacts like it is in your case.
Here is your input mesh Below is a zoom on the artifact at the bottom of previous image
You can see that there is two triangles with 360° angle between them, which makes of it a paradoxical surface. The wrong result is predictable:
If you fix that meshing artifact on your input mesh, your issue is solved
Thank you Jimy,
Below is the original mesh. Do you mean the triangle marked green has 360° angle with the triangle marked blue? How to judge this is 360° angle and not 0°? I googled the "paradoxical surface", but cannot find a definition. What it is really about? It is true after mesh.mergeclose()
, this part looks quite different.
Yes I meant the green and the blue triangles are overlapping with opposite outward directions.
In fact 0° is the same as 360° speaking of an orientation, in this case the vertex offset computed then tends to $\pm \infty$ because it cannot decide which side is interior and which is exterior.
I do not find a place defining what I called a paradoxical surface either, but let say that it is a surface going through itself, like a Klein bottle
Im looking closely to your mesh, and I realize I was wrong, this is not a 360° problem at the position I pointed but a winding consistency issue in your triangles ... how did you generated this mesh, this is not very common that 3d softwares export meshes without widing consistency ? If you flip the widing (the order of points in the triplet) of the blue triangle, then it is fine. Without this, the blue triangle is not overlapping with the green triangle, but yet has a normal opposite to the green one. We can see it by the blue triangle being darker than the green one.
recomputing winding consistency worked for the aforementioned position:
mesh = read('/tmp/mesh.stl')
mesh.mergeclose()
mesh.orient() # correct winding consistency of all triangles
result = thicken(mesh, 0.1)
But there is an other place in your mesh where the 360° angle arise
You can see that the triangles are indeed overlapping, it is not exactly 360° but close to it, so the vertex offset is not infinity but still huge:
This topic has been inactive for few months, and since I explained this was not an issue with the thicken function but with the input mesh, I'm gonna close this issue
Feel free to reopen if you have more questions
Hi,
I tried to do the
thicken()
operation with a free-form mesh stored in a stl file. It seems not working. Any suggestions?Thanks
Here is my code
Mesh before
thicken()
Mesh after
thicken()
The zipped stl mesh filemesh.zip