Notifications
Clear all

[Closed] Select polies with vertices > 4

Hello!
I need to select polies in a model, which have more than 4 vertices. After this I need to triangulate it, so in the end in a model should be only triangles and 4-sided polies.
I can’t export model into obj and import back (after it i will have what i need), because the model have some diffrent uv channels, and if i will export it will lose all uv-maps except first.
Also i have troubles with triangulation – i don’t know how it can be done – Tesselate inserts extra vertices in polygon, that is not desirable.
Please help me!

7 Replies

here is script from maxscript help that selects 4 sides polysmacroScript


SelectNonQuadPolys category:"HowTo"
 (
on isEnabled return 
 (selection.count == 1 and classOf selection[1].baseobject == Editable_Poly)
 
on execute do(
 
local face_selection = #{}
 local base_obj = $.baseobject
 local num_faces = polyop.getNumFaces base_obj
 
for f = 1 to num_faces do(
 local num_face_verts = polyop.getFaceDeg base_obj f
 if num_face_verts = 4 do face_selection[f] = true
 )--end f loop
 
 polyop.setFaceSelection base_obj face_selection
 max modify mode
 modPanel.setCurrentObject base_obj
 subobjectlevel = 4
 )--end on execute
 )--end script 
 

Thank you very much, spasibo! Btw, in help there is word macroscript before code. :))

Anyway is there any way to triangulate (not tesselate) selected polies? May be to apply on them TurnToMesh modifier with Use Invisible Edges checked off? Unfortunately if to simply use it, TurnToMesh is applying at the whole model not only selected polys.

Surely having a single = in an if statement can’t be right? I assume it has to be != or == otherwise this expression will always evaluate to ‘true’.

Rog.

Hi Sergey,

You can check out the source code of Pola X if you want to see how to implement various kind of SO selections.

Triangulation is pretty straightforward, simply select all vertices and use the connect vertices feature, like sel.buttonOp #connectVertices.

poka,
Light

yep Pola X is much better solution and you can easily change parameters you want

Thank to all! I don’t search how to implement – I simply can’t. Just asking what is it possible to use to solve it.
Light, smart tip about connection! Trudno bilo dogadatsya
I have received everything I was needed!

Or just add a turn to poly modifier with Limit Polygon Size set to 3 and collapse.

-Eric