Hi Everyone
Becuase we encountered a problem where almost every Symbold that has been modelled in Vectorworks has chaotic Facenormal directions.
This turns into a problem once you use CAD Data in realtime such as VR & AR where we have only enough drawcall time for one face side to be drawn.
I made a little script that will help us fix Normals on Faces, however this works only if we completely ungroup Symbols, but we can't do that because we lose all our Database connections.
This is the script that works only on a ungrouped mesh:
import vs
def uniform_surface_normals():
# Get the handle to the first selected object on the active layer
h = vs.FSActLayer()
# Check if an object is selected
if h is None:
vs.AlrtDialog('No object selected!')
return
num_faces = vs.GetNumFaces(h)
for i in range(i, num_face + 1):
normalX, normalY, normalZ = vs.GetPolyFaceNormal(h, 1)
vs.GetPolyFaceNormal(h, i, 0, 0, 1)
vs.ReDraw()
# Run the function
uniform_surface_normals()
it Would be amazing if you could help me doing this on selected Symbols, i was unable to get into the symbols with phyton.
best regards
Pascal