Start a new topic

Export Vertex Locations

Is there any code around that will export the vertices of a polygon into a csv or something similar?
1 Comment

Here is a code snippet in OpenFlight Script (Python) to print the coordinates of a polygon's vertices to CSV. This may not be probably all you really want but it should get you started.

def PrintPolyVertsCSV(poly):
	print "poly",mgGetName(poly)
	vtx = mgGetChild(poly)
	while (vtx):
		b,x,y,z = mgGetVtxCoord(vtx)
		print x,",",y,",",z
		vtx = mgGetNext(vtx)



Login to post a comment