Sharp edges on a surface

Technical discussions
Post Reply
Warren
Posts: 7
Joined: Thu Mar 30, 2017 4:33 am

Sharp edges on a surface

Post by Warren »

Hi
If I display only a few simplexes on the tooth of my gear model, the problem is the representation on screen which shows a lot of sharp edges not actually there on the tooth.

Wondering if I used a Nurb, BRep, B-Spline (Diff Surface sample) ?

Best regards, Warren

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Sharp edges on a surface

Post by nickz »

Warren
Yes it is not good. It is relatively easy to fix with the IMeshMods.FixupNormals().

If you have exact geometry (equations) of the surface I would rather suggest doing it differently: It would be better to set the normals explicitly via: IMesh>IMeshEx>IMeshEx.GetVertex>IVertex>SetNormal() or IMeshMods.SetNormal() (the later one only for rank 0 (not on edge or corner) vertices)

This is because IMeshMods.FixupNormals() relies only on mesh (which is only an approximation) so the normal is an approximation too. It is better to set it to the exact one, if known

I am not sure is your mesh is water-tight. This means whether you share vertices on sharp curved edges between simplexes of the adjacent smooth pieces of surface. If they are ( better option) the shared vertices must have two normals stored in them (vertex rank =2). Adjacent simplexes refer to the relevant normal via normal indices set with ISimplex.SetNormalIndex(). The default is 0.

This is a very brief description of the mesh. See more at http://www.dynoinsight.com/Help/Geom/Mesh.aspx

Post Reply