Coder Social home page Coder Social logo

Comments (3)

ahmedmetin avatar ahmedmetin commented on June 19, 2024

It happens when there duplicate vertices it seems.
facet normal nan nan nan
outer loop
vertex 0.000000e+00 0.000000e+00 -2.144183e+00
vertex 0.000000e+00 0.000000e+00 -2.144183e+00
vertex -5.000000e-01 8.660254e-01 -2.144183e+00
endloop
endfacet

which cause 0 normal vector.

Then there is
n = np.cross(v1 - v0, v2 - v0)
n /= np.linalg.norm(n)

in write_STL function, which causes the problem I think.
Is there a way to eliminate the duplicate vertices in meshmagick?

from meshmagick.

frongere avatar frongere commented on June 19, 2024

From what I can see on your last post, the triangle you show seems to be collapsed. Two of its vertices are at the same position so the triangle does not represent a plane but a line. You get NaN for the normal as it is undefined...
Maybe you could preprocess the mesh by using the -hm option to attempt to heal the mesh.

from meshmagick.

kmacolini avatar kmacolini commented on June 19, 2024

Hi @ahmedmetin
Did you resolve this issue? I am having the same problem currently. I tried to preprocess with heal_normals(), but I did not notice any changes in the resulting .stl file. I might be doing something wrong. Thank you. @frongere

from meshmagick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.