Personal tools
You are here: Home Forum Use Programmatically reorient clockwise oriented faces

Programmatically reorient clockwise oriented faces

Up to Use

Programmatically reorient clockwise oriented faces

Posted by Zoltan Csati at February 23. 2021

Hi,

 

I have a mesh, generated by the NETGEN plugin of the SMESH module. Some elements are oriented clockwise (see the image attached), as I checked by right-clicking on the mesh in the viewer, and selecting Properties. I can reorient selected elements from the GUI. I can also do that programmatically with the Python methods.

My question is: is it faster if I first detect the clockwise-oriented elements and reorient only them? If so, how can I detect the orientation of the elements using the Python API (I can't see this functionality among the filters)? Extra question: what is IsCoherentOrientation2D used for?

Related posts that did not solve my problem:

https://www.salome-platform.org/forum/forum_10/thread_1082

https://www.salome-platform.org/forum/forum_10/212777434

Attachments

Re: Programmatically reorient clockwise oriented faces

Posted by SMESH expert at February 24. 2021

Hi

IsCoherentOrientation2D is useful to detect the situation as in your image. There is no more optimal way than

mesh.Reorient2D(the2DObject, theDirection, theFaceOrPoint )

Best regards

Edward

Re: Programmatically reorient clockwise oriented faces

Posted by Zoltan Csati at February 24. 2021

Thank you for the clarification.

Powered by Ploneboard
Document Actions