Edit_Poly triangulation

Hi everybody,

I'm facing a problem, in order to build an Edit_Poly triangulation script( without Edit_mesh or Patch conversion) I would like to access to the faces triangulation by script (the diagonals of a face I can see by clicking on "Edit triangulation" on one of the Editable_Poly Modify panel's roll out).

Can somebody learn it to me ?

Thanx by advance.

Sam

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

Try this

p = convertToPoly(Plane isselected:on)
polyop.setFaceSelection p #{6..7, 10..11}
max modify mode
subobjectlevel = 4
p.toggleCommandMode #EditTriangulation

bga

SamT's picture

Thank you for your fast

Thank you for your fast answer. In fact I don't want to toggle the edit mode by code but rather to obtain an array of indexes representing the vertices of diagonals. I continued to try some different solutions, but the only thing that worked is something like :

convertObjectToEditableMesh obj
if (classof obj == Editable_Mesh) do (
    print ( "Triangulating " + obj.name + " " + (classof obj) as string)
    if(obj.numverts > 0 ) do (
        local edges = meshop.getEdgesUsingVert obj  #{1..obj.numverts}
        meshop.autoEdge obj edges 0.0 type:#SetClear
    )
)
convertObjectToEditablePoly obj

But I would like not to convert my edit poly to edit_mesh then to convert it back to edit_poly

barigazy's picture

...

If you looking diagonal removal tool maybe this can look interesting to you
http://www.scriptspot.com/3ds-max/scripts/quadrifyall

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.