Cheetah3D User Forum  


Reply
 
Thread Tools Search this Thread Display Modes
Old
  (#1)
kraus (Offline)
Neuer Benutzer
 
Posts: 5
Join Date: 02.03.2007
Default Flatten Polygon - 06.03.2007, 17:55

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
   
Reply With Quote
Old
  (#2)
xbob (Offline)
Neuer Benutzer
 
Posts: 16
Join Date: 28.01.2007
Daumen hoch wow - 06.03.2007, 21:44

what a great idea! i've thought about a script like this many times...well done and thank you
   
Reply With Quote
Old
  (#3)
tg_jp (Offline)
Erfahrener Benutzer
 
Posts: 1,053
Join Date: 09.04.2005
Default 07.03.2007, 00:00

Hi, so nice!

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

regards.

tg_jp, Hiroto.
   
Reply With Quote
Old
  (#4)
kraus (Offline)
Neuer Benutzer
 
Posts: 5
Join Date: 02.03.2007
Default 07.03.2007, 09:43

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
   
Reply With Quote
Old
  (#5)
Martin (Offline)
Erfahrener Benutzer
Site Admin
 
Martin's Avatar
 
Posts: 8,925
Join Date: 13.03.2005
Default 07.03.2007, 13:24

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

Bye,
Martin

P.S. Good luck for your exams.
   
Reply With Quote
Old
  (#6)
frank beckmann (Offline)
Erfahrener Benutzer
 
frank beckmann's Avatar
 
Posts: 14,766
Join Date: 12.07.2005
Default 03.04.2010, 12:45

I tried to get this to run again and finally it works
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.

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.
Attached Images
  
Attached Files
File Type: zip flattened4U.js.zip (1.6 KB, 329 views)

Last edited by frank beckmann : 21.02.2014 at 10:24.
   
Reply With Quote
Old
  (#7)
SurfingAlien (Offline)
Erfahrener Benutzer
 
SurfingAlien's Avatar
 
Posts: 2,458
Join Date: 13.03.2009
Location: Italy
Default 03.04.2010, 13:48

very cool, thank you Frank!

Happy Easter you too
A
   
Reply With Quote
Old
  (#8)
Targos (Offline)
Erfahrener Benutzer
 
Posts: 811
Join Date: 18.11.2006
Default 31.03.2014, 05:59

Picking up an error here:

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

C3D Version 5.8

Thanks
AaronC
   
Reply With Quote
Old
  (#9)
frank beckmann (Offline)
Erfahrener Benutzer
 
frank beckmann's Avatar
 
Posts: 14,766
Join Date: 12.07.2005
Default 31.03.2014, 06:15

So you havenīt try the modified script from my reply N°6 - which still works.

Cheers
Frank

Last edited by frank beckmann : 31.03.2014 at 06:52.
   
Reply With Quote
Old
  (#10)
Targos (Offline)
Erfahrener Benutzer
 
Posts: 811
Join Date: 18.11.2006
Default 31.03.2014, 06:39

Ah thanks, I missed that. Cheers!
   
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com