I am trying to create faces in an Editable_Poly, but have found that both the createFace and createPolygon commands seem to have weird performance issues and become slower the more often they’re used. Here’s an example:
curObj = editable_mesh name:"NewGeo" select:true convertToPoly curObj select $NewGeo setCommandPanelTaskMode #modify for loop=1 to 10 do ( t1 = timeStamp() cnv = curObj.createVertex cnf = curObj.createFace allNewVrtPos = for i=1 to 200 collect ( z = i * 0.1 ; #([1,(loop),z],[0,(1+loop),z],[0,(loop),z])) for posGrp in allNewVrtPos do ( newVrtIdx = for i=1 to 3 collect (cnv posGrp[i] pointInLocalCoords:false select:false) cnf newVrtIdx select:false ) format "maxscript\nresult:%\ntime:% ms\n" test (timeStamp() - t1) )
For me the first stack of polygons takes 21ms, and then each new one takes 20-40ms longer then the previous.
Could someone help me to understand what I’m doing wrong, or if there’s a completely different way I should be constructing faces in an editable poly?