[Plugin] Counttriangles.rb by Eleandor

[Plugin] Counttriangles.rb by Eleandor

Postby Marian » Fri Feb 20, 2009 3:14 pm

the original post can be found here
http://www.infinity-universe.com/Infinity/index.php?option=com_smf&Itemid=75&topic=5875.80

I've written a very small and simple ruby script for Sketchup that gives a pretty accurate estimation of the trianglecount of the model. It can probably be useful to people using the free version of sketchup.

How to install the script:
1) Download the rubyscript here
2) Put the downloaded file (counttriangles.rb) in the Sketchup/Plugins folder
3) Restart sketchup and use the "Count triangles in model" option under "plugins".

You can also only count triangles of your current selection (useful if you have a lot of 'temporary' objects you don't wish to remove)

Early tests give a pretty good result, for example:

The Bellerophon (from ftp)
.3DS: 98 788 triangles
.kmz: 76 888 triangles (--> inaccurate)
The plugin: 96 132 triangles

Update: encapsulated the code in a module... Shouldn't cause conflicts with other plugins now.

BTW i asked permission before posting it here.
1
User avatar
Marian 
 

Re: [PLUGIN] Counttriangles.rb by Eleandor

Postby thomthom » Fri Feb 20, 2009 3:24 pm

That's interesting. I've never felt the Face Count very useful indicator to whether it's a heavy model or not, since graphic cards ultimately deals with triangles. A face can be any number of triangles.

Thanks for posting.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [PLUGIN] Counttriangles.rb by Eleandor

Postby Marian » Fri Feb 20, 2009 3:30 pm

It's not about a model being heavy or not, this might be more usefull to people that make models for games, where there is a a limit of how many traingles they can use.
0
User avatar
Marian 
 

Re: [PLUGIN] Counttriangles.rb by Eleandor

Postby ken28875 » Thu Mar 04, 2010 5:57 pm

Marian wrote:this might be more useful to people that make models for games, where there is a a limit of how many triangles they can use.


Thanks, Marian.

Very useful plugin indeed, since i work in the game industry and do all my conceptual models with Sketchup, before exporting into Maya or the game engine.

Take care,

_KN
0
Follow Your Dreams.
User avatar
ken28875 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: Jick, PRLau, Yahoo Bot and 10 guests

Visit our sponsors: