trackpoint-app.py 462 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python3
  2. import numpy
  3. import stl
  4. from stl import mesh
  5. import pygmsh
  6. with pygmsh.geo.Geometry() as geom:
  7. circle = geom.add_circle([0.0, 0.0], 1.0, mesh_size=0.2)
  8. #geom.extrude(circle, [0.0, 0.3, 1.0], num_layers=5)
  9. cube = geom.generate_mesh()
  10. meshx = mesh.Mesh.from_file("../testdata/zPlate_0.stl")
  11. combi = mesh.Mesh(numpy.concatenate([
  12. meshx.data.copy(),
  13. cube.data.copy(),
  14. ]))
  15. combi.save("combi.stl", mode=stl.Mode.ASCII)