Test script for multiple *.ts surfaces to block model (Lalor model)

This commit is contained in:
D Fournier
2016-01-18 17:10:31 -08:00
parent 6a7d72bf85
commit b2fc35ee75
11 changed files with 121607 additions and 65 deletions
+5 -8
View File
@@ -401,6 +401,10 @@ def read_GOCAD_ts(tsfile):
vrtx = np.asarray(vrtx)
# Skip lines to the triangles
while re.match('TRGL',line)==None:
line = fid.readline()
# Run down the list of triangles
trgl = []
@@ -486,13 +490,6 @@ def gocad2vtk(gcFile,mesh,bcflag,inflag):
insideGrid = extractImpDistRectGridFilt.GetOutput()
insideGrid = npsup.vtk_to_numpy(insideGrid.GetCellData().GetArray('Index'))
# Get index surface intersect
extractImpDistRectGridFilt.ExtractBoundaryCellsOn()
extractImpDistRectGridFilt.ExtractInsideOff()
extractImpDistRectGridFilt.Update()
bcGrid = extractImpDistRectGridFilt.GetOutput()
bcGrid = npsup.vtk_to_numpy(bcGrid.GetCellData().GetArray('Index'))
# Return the indexes inside
return insideGrid, bcGrid
return insideGrid