[request] Polygon count plugin
-
Hi there Masters of Plugins,
Does anyone know if there is a plugin that shows me the polygon count (quad and triangle faces) when clicking on the model? If not, could someone please write it for me?
Thank you very much,
_KN
-
I'm sure there is one somewhere...
If not it's relatively easy to iterate all of the model.definitions.entities faces [*definition.instances.length] and all of the model's faces - using eachface.vertices.length-vertices-2
...
-
Doesn't MeshLab provide this info? If you've the ability to export to it's supported file types?
Where Pilou when you need him?
-
@tig said:
I'm sure there is one somewhere...
If not it's relatively easy to iterate all of the model.definitions.entities faces [*definition.instances.length] and all of the model's faces - using eachface.vertices.length-vertices-2
...
haha.. i love when the coders talk to the plebs.. 'ah, it's simple' etc.. that sentence above might as well look like this to me:
@unknownuser said:
If not it's relatively easy to ้ๆญทๆๆ็ๆจกๅๅฎ็พฉๅฏฆ้ซๆ้ข่จ็ๅฎ็พฉๅฏฆไพ็้ทๅบฆๅๆๆๆจกๅ็่ - ็จๆฏๅ้ข้ ้ป้ทๅบฆ้ ้ป -2
-
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