extensive googling doesn’t find a good solution. Writing a python script from scratch actually takes much less time.
""" To read a STL file and plot in mayavi First created by Junwei Huang @ Toronto, Feb 26, 2013 """ from numpy import * from mayavi import mlab STLfile="test.stl" f=open(STLfile,'r') x= y= z= for line in f: strarray=line.split() if strarray=='vertex': x=append(x,double(strarray)) y=append(y,double(strarray)) z=append(z,double(strarray)) triangles=[(i, i+1, i+2) for i in range(0, len(x),3)] mlab.triangular_mesh(x, y, z, triangles) mlab.show()
Q: What about DXF file?
A: Convert DXF to STL file first before using this script:)