polygon edge position in maxscript -


i want polygon edge positions 3ds max maxscript. have tried following:

tmesh = snapshotasmesh selection[1] out_name = ((getdir #export)+"/testmesh.dat") out_file = createfile out_name num_verts = tmesh.numverts num_faces = tmesh.numfaces  format "% % %\n" num_verts num_faces to:out_file  v = 1 num_verts (  vert = getvert tmesh v  format "%," vert to:out_file )  format "\n" to:out_file  f = 1 num_faces (  face = getface tmesh f  format "%," face to:out_file )  close out_file delete tmesh edit out_name 

output needs obj file format, want have edge connections showed in wire frame.

sample output:

[0,0,0],[1,0,0],[0,1,0],[1,1,0] [1,2],[2,3],[3,4],[4,1] 

edit: find invisible edges via code.

for f = 1 num_faces (    face = getface tmesh f       edge1 = getedgevis tmesh f 1    edge2 = getedgevis tmesh f 2    edge3 = getedgevis tmesh f 3    format "%,[%,%,%]" face edge1 edge2 edge3 to:out_file    format "\n" to:out_file ) 

you can vertices edge using meshop.getvertsusingedge this:

tmesh = snapshotasmesh selection[1]  allverts = #()  v = 1 num_verts (     vert = getvert tmesh v     append allverts vert ) print allverts  format "\n" --to:out_file  edges = tmesh.edges ed in edges (     print ed     edverts = meshop.getvertsusingedge tmesh ed     print "ed verts: "     v in edverts (         print allverts[v]     )     print "\n" )  delete tmesh 

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -