Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

delete polygon using maxsccript

delete polygon using maxsccript

Anonymous
Not applicable
619 Views
1 Reply
Message 1 of 2

delete polygon using maxsccript

Anonymous
Not applicable

i create a polygon in max scrip by this way

vertices = #([0,0,0], [100,0,0], [100,100,0], [0,100,0])
obj = convertToPoly (mesh vertices:vertices faces:#())
polyOp.createPolygon obj #(4,3,2,1)

 

and need to delete it again as i draw it only  to get normal 

0 Likes
Accepted solutions (1)
620 Views
1 Reply
Reply (1)
Message 2 of 2

Swordslayer
Advisor
Advisor
Accepted solution

It would be better and faster to calculate the normal yourself, i.e. from your set of points:

 

p3 = [100,0,0]
p2 = [100,100,0]
p1 = [0,100,0]
faceNormal = normalize (cross (p3 - p2) (p1 - p2))

Cross product will give you a vector perpendicular to the vectors (from p3 to p2 and from p1 to p2 here) - this is the way normals are computed for meshes.

0 Likes