make planar for individual faces

i'm looking for a way to apply the edit poly "make planar" (not the X, Y Z Planar!) funktion to every polygon of a object individually. the funktion does not take individual faces into account and always just flattens out everything, even if objects have diffrent IDs or Smoothing groups.
I've been doing this manually till now but there must be a way to have a script going over every face and apply "make planar".

this would be a blessing for anything jewellery :-)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sergo's picture

How do you do it manually?

How do you do it manually? Doesn't every face-flattening damage adjacent faces?

secondplace's picture

just press the "make planar"

just press the "make planar" button in the "edit geometry" rollout. it will average the vertices to flatten the polygon. it will orient itself by the polygons local axis not world. if you go over each poly twice on an object it will be visually perfect.

sergo's picture

Now I see - 'twice', I think,

Now I see - 'twice', I think, is in best case.

Anyways, try this for editable poly objects:

for i=1 to (polyop.getNumFaces $) do (polyop.makeFacesPlanar $ #(i))

...or this for editable meshes (it is slightly incorrect, but works in simple cases):

for i=1 to ($.numfaces) do (meshop.makeFacesPlanar $ (meshop.getPolysUsingFace $ #(i))); update $

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.