Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/usr/bin/freecadcmd
  2. import os, sys
  3. import Part
  4. import Mesh
  5.  
  6. infile = sys.argv[2]
  7. # make it .stl.step now, so it's real clear that this is not really much of a step file
  8. outfile = infile + '.step'
  9.  
  10. print outfile + ': loading mesh ' + infile
  11.  
  12. mesh = Mesh.Mesh(infile)
  13.  
  14. print outfile + ': making mesh'
  15. shape = Part.Shape()
  16. shape.makeShapeFromMesh(mesh.Topology, 0.05)
  17.  
  18. print outfile + ': solidifying'
  19. solid = Part.makeSolid(shape)
  20.  
  21. print outfile + ': exporting'
  22. solid.exportStep(outfile)
  23.  
  24. print outfile + ': done'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement