Getting normals from stl

Technical discussions
Post Reply
Gori Jagrati
Posts: 4
Joined: Mon Aug 31, 2020 6:52 am

Getting normals from stl

Post by Gori Jagrati »

hello,

I'm currently reading an stl file with:
m_kernelCAD.ModelPath = strPath;

In my each face is described by points and a normal:

facet normal 0.000000e+00 -0.000000e+00 -1.000000e+00
outer loop
vertex 1.238308e-03 4.185656e-02 -9.566067e-02
vertex 1.238923e-03 3.156301e-02 -9.566067e-02
vertex 1.237746e-03 3.232011e-02 -9.486067e-02
endloop
endfacet

How can I access the normals of each triangle also?

Mike Gershon
Posts: 4
Joined: Thu Nov 28, 2013 8:06 am

Re: Getting normals from stl

Post by Mike Gershon »

Once the mesh is loaded you can get face normals via ISimplex.GetFacetNormal(). See Morph sample for accessing the mesh and simplexes
Cheers

Post Reply