[request] Polygon count plugin
-
Hello guys,
@ TIG: What the hell are you talking about??? LOL
@ Rich: I want to see the polygon count right in Sketchup so I don't have to export back and forth between 2 programs.
@ Jeff: I agree with you. LOL
Thanks,
_KN
-
Currently you can get a full face and edge count. But you want a little more than that, is that what your asking? You would like too see specifically tri faces and quad faces only? What about faces that are mor than quad faces?
-
@chris fullmer said:
Currently you can get a full face and edge count. But you want a little more than that, is that what your asking? You would like too see specifically tri faces and quad faces only? What about faces that are mor than quad faces?
Hi Chris,
Yes, something similar to this in Maya:
You said we currently are able to see a full face and edge count. How do you do it?
Thank you,
_KN
-
Copy+paste this into a file called
facecount.rb
in the Plugins folderdef facecount() num=0 model=Sketchup.active_model ss=model.selection if ss[0] ents=ss.to_a else ents=model.entities.to_a end#if defs=model.definitions ents.each{|e|num=num+(1)if e.class==Sketchup;;Face} defs.each{|d| d.entities.each{|e| n=d.instances.length num=num+(1*n)if e.class==Sketchup;;Face } } if ss[0] puts "Faces in Selection =" else puts "Faces in Model+Definitions =" end#if return num end#def
To run type
facecount
in the Ruby Console - it prints the count of faces.Copy+paste this into a file called
tricount.rb
in the Plugins folderdef tricount() num=0 model=Sketchup.active_model ss=model.selection if ss[0] ents=ss.to_a else ents=model.entities.to_a end#if defs=model.definitions ents.each{|e|num=num+(e.vertices.length-2)if e.class==Sketchup;;Face} defs.each{|d| d.entities.each{|e| n=d.instances.length num=num+((e.vertices.length-2)*n)if e.class==Sketchup;;Face } } if ss[0] puts "Potential Triangular-Faces in Selection =" else puts "Potential Triangular-Faces in Model+Definitions =" end#if return num end#def
To run type
tricount
in the Ruby Console -it prints the count of potential triangulated-faces [even if they currently have more vertices].
These count all faces in the model and in instances, groups and images...
-
You can open the Model Info dialog box and it shows edge and face count. Go to Window > Model Info and click on the "statistics" tab. Then make sure you have the statistics set to "Entire Model" and turn on the "Show Nested Components" checkbox. Then it will show you a good bit of info.
Chris
-
Thanks TIG and Chris.
Have a good weekend.
_KN
-
The Plugin Index is your friend: http://forums.sketchucation.com/viewtopic.php?f=323&t=28782
Counttriangles.rb by Eleandor
http://forums.sketchucation.com/viewtopic.php?t=16843 -
@thomthom said:
The Plugin Index is your friend: http://forums.sketchucation.com/viewtopic.php?f=323&t=28782
Counttriangles.rb by Eleandor
http://forums.sketchucation.com/viewtopic.php?t=16843Knew I'd see it somewhere!
-
Hi all,
on a similar topic, it would be great to be able to select a group or component and be able to see statistics just for this specific object.
I am working with heavy scenes and cooperating with other people, and sometimes I have to deal with garbage models within the scene
(it is not uncommon to have a flower pot in some obscure corner that takes up half of the scene's file size) -
Even more, it would be nice to have a plugin which helps in optimizing SU model by marking groups and components with colors according to their polygon count.
...
and than gives an option to reduce them (useful for making proxies also)
Advertisement