this is from my last script that seemed to be working but i ran into a model with a face in +z and in -z.
Im not really sure if what im trying to do here is right at all.
this is run on a few footprint polygons facing +z. i want this to select them all and reverse them and if there are polys already facing -z, leave them alone
i was thinking the k == 1 meant the polys that are facing +z would be selected and reversed
def findHiddenPolys ( db, parent, rec , counter):
type = mgGetCode (rec)
if ( type == fltPolygon ):
outs = mgGetAttList (rec, fltPolyHidden)
if (outs == 1):
counter.count = counter.count + 1
for rec in counter.match_list:
b,i,j,k = mgGetPolyNormal(rec)
if k == 1:
mgWalk(db,findHiddenPolys, None, counter, MWALK_NEXT)
sorry, this posted twice, i had a page show up saying something went wrong and someone was notified???