Page 1 of 1

Logic to reorient all faces.

Posted: Sat Jul 06, 2019 6:39 am
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

Re: Logic to reorient all faces.

Posted: Sat Jul 06, 2019 9:41 am
by daniel
Maybe Meshlab has some built-in functions to do that?

Re: Logic to reorient all faces.

Posted: Sun Jul 07, 2019 1:13 am
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..???

Re: Logic to reorient all faces.

Posted: Sun Jul 07, 2019 5:37 pm
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.

Re: Logic to reorient all faces.

Posted: Mon Jul 08, 2019 12:51 am
by Sha11
Ok I will try this..