-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_creatgrids.py
More file actions
executable file
·28 lines (21 loc) · 1.09 KB
/
test_creatgrids.py
File metadata and controls
executable file
·28 lines (21 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from vedo import mesh
from mesh2grid import Mesh2Grid
# targetmesh.cutWithBox([-78, 308, -71, 65, -1000, 1000], invert=False)
targetCut = mesh.Mesh("mesh_ausgerichtet/mesh_ausgerichtet2.stl")
# targetCut.cutWithBox([-78, 308, -65, 63, -1000, 1000], invert=False)
# targetCut.cutWithCylinder([175, 382, 0], r=335, axis='z', invert=True)
# targetCut.cutWithCylinder([148, -318, 0], r=260, axis='z', invert=True)
# targetCut.cutWithBox([170, 320, 47, 75, -1000, 1000], invert=True)
# targetCut.cutWithBox([155, 310, -75, -58, -1000, 1000], invert=True)
targetCut.cutWithBox([-78, 308, -65, 63, -1000, 1000], invert=False)
targetCut.cutWithCylinder([175, 382, 0], r=335, axis='z', invert=True)
targetCut.cutWithCylinder([148, -316, 0], r=260, axis='z', invert=True)
targetCut.cutWithBox([170, 320, 45, 75, -1000, 1000], invert=True)
targetCut.cutWithBox([155, 310, -75, -56, -1000, 1000], invert=True)
# msh = mesh.Mesh("test/Blechhalter.stl")
#
# targetCut.cutWithMesh(msh)
targetCut.fillHoles()
targetCut.show(axes=1)
mesh2gridtarget = Mesh2Grid(targetCut, 3, 5)
mesh2gridtarget.creategrid(5, "test_gridpoints2")