Flatten Polygon

kraus

New member
Flatten Polygon

I've created a small script that flattens a polygon. It will make sure that all the vertices are on the same plane. Put in into your macro folder and enjoy!

Flatten.js

Cheeers
marco
 

xbob

New member
wow

what a great idea! i've thought about a script like this many times...well done and thank you
 

tg_jp

Active member
Hi, so nice!

so, multi-selection version by adding some codes might be better.;)

regards.

tg_jp, Hiroto.
 

kraus

New member
Thank you for the replies. tg_jb modified the script to support the selection of more than one poly. You can find it here:

Flatten.js

There's a caveat with this version, though: If the selected polygons share edges or points, updating one polygon might affect already flattened polys. One would need to isolate these points and constrain their movement. I'll have a look at this problem when I find the time. ATM, I'm learning for my exams, so there's not much time left for coding and other fun stuff :(


Cheers
 

Martin

Moderator
Hi,
very nice script. It's great to see another scripter. The more script writers the better. :smile:

Bye,
Martin

P.S. Good luck for your exams.:icon_thumbup:
 

frank beckmann

Well-known member
I tried to get this to run again and finally it works:cool: :D
If you have a load of polygons and the feeling it´s not really plane call the script a second time.
Put it in the Macro Scripts folder.
FlatEgg.jpg

ScaleAlongNormals.png

Happy flat Easter Egg Holidays.

Cheers
Frank

PS: Aunt Edith says you can scale a bunch of geometry now along it´s normals or any direction with the gadget mode: second image.
 

Attachments

  • flattened4U.js.zip
    1.6 KB · Views: 820
Last edited:

Targos

Member
Picking up an error here:

line: 63
error: Can't find variable: printVec3D

C3D Version 5.8

Thanks
AaronC
 

frank beckmann

Well-known member
So you haven´t try the modified script from my reply N°6 - which still works.

Cheers
Frank
 
Last edited:
Top