source: production/swan_river_tin_2005/thin_generate_alpha.py @ 3215

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