Logic to reorient all faces.

Feel free to ask any question here
Post Reply
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Logic to reorient all faces.

Post by Sha11 »

I have an mesh file (.off) , faces are not oriented corehently ( i mean some triangles have cyan color while other have "green" ). Is there any way to reorient them ( i mean all triangles shows in "green' color. )

These are below two test cases (.off).

https://justpaste.it/62ajc

https://justpaste.it/5gf7j
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Logic to reorient all faces.

Post by daniel »

Maybe Meshlab has some built-in functions to do that?
Daniel, CloudCompare admin
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Re: Logic to reorient all faces.

Post by Sha11 »

Hmm , I know that , but I want some logic to to this.
Do you know about any open source project that solve this type of problem...

Or any logic..???
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Logic to reorient all faces.

Post by daniel »

Meshlab is open source ;)

Otherwise if you have the mesh topology, you can 'propagate' the direction of a normal from one triangle to its neighbors (with a kind of Minimum Spanning Tree structure for instance) or other front propagation methods.
Daniel, CloudCompare admin
Sha11
Posts: 18
Joined: Mon Jun 10, 2019 2:34 pm

Re: Logic to reorient all faces.

Post by Sha11 »

Ok I will try this..
Post Reply