Line | |
---|
1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | from pyvolution.load_mesh.loadASCII import reduce_pts |
---|
6 | from pmesh.mesh import importMeshFromFile |
---|
7 | |
---|
8 | thin_points_file = 'thinned_cross_sections.pts' |
---|
9 | alpha_outline_file = 'alpha_outline.msh' |
---|
10 | mesh_file = 'swan_mesh.msh' |
---|
11 | |
---|
12 | reduce_pts('cross_sections.pts', thin_points_file, |
---|
13 | 10000, verbose = True) # max # of points = 10000 |
---|
14 | |
---|
15 | m = importMeshFromFile(thin_points_file) |
---|
16 | m.autoSegment( remove_holes=True, |
---|
17 | smooth_indents=True, |
---|
18 | expand_pinch=True) |
---|
19 | m.exportASCIIsegmentoutlinefile(alpha_outline_file) |
---|
20 | |
---|
21 | |
---|
22 | m_outline = importMeshFromFile(alpha_outline_file) |
---|
23 | #m_outline.generateMesh(maxArea = 1000) #191291 triangles |
---|
24 | m_outline.generateMesh(maxArea = 1000) |
---|
25 | m_outline.export_mesh_file(mesh_file) |
---|
Note: See
TracBrowser
for help on using the repository browser.