Hi everyone, quick question.
Is there a way to mirror or flip a surface normal with a topologic node in dynamo.
I am now getting the surface out of the topologic graph and putting it back in later.
Kind regards,
Piet
Sadly in Dynamo there isn't a direct method to reverse a topologic face AFAIK. Instead here are the manual steps that are needed:
1. Get the Wire subtopology of the face (assuming a simple face with no holes for now) Face.Wire.
2. Get the vertices of the Wire (These will be ordered) Wire.Vertices
3. Reverse the list of vertices (Use Dynamo to reverse a list)
4. Re-build the wire from the reversed list of Vertices (I am hoping there is Wire.ByVertices. I don't remember. If not, do a loop to build Edges from consecutive vertices and then do a Wire.ByEdges.
5. Re-build the Face from the Wire (Face.ByExternalInternalBoundaries). It should now be pointing in the opposite direction
You could do all this in one custom python designscript code.
Comments
@topologic might know.
Sadly in Dynamo there isn't a direct method to reverse a topologic face AFAIK. Instead here are the manual steps that are needed:
1. Get the Wire subtopology of the face (assuming a simple face with no holes for now) Face.Wire.
2. Get the vertices of the Wire (These will be ordered) Wire.Vertices
3. Reverse the list of vertices (Use Dynamo to reverse a list)
4. Re-build the wire from the reversed list of Vertices (I am hoping there is Wire.ByVertices. I don't remember. If not, do a loop to build Edges from consecutive vertices and then do a Wire.ByEdges.
5. Re-build the Face from the Wire (Face.ByExternalInternalBoundaries). It should now be pointing in the opposite direction
You could do all this in one custom python designscript code.
Thank you for your response. I will try the solution above.
Kind regards.
I have added a Face.Invert method to topologicpy (but sadly, Topologic for Dynamo is now outdated). I encourage you to move to either integrate topologicpy in Dynamo or in Blender
https://topologic.app/topologicpy_doc/topologic_pdoc/Face.html#Face.Face.Invert