CADlalala
Aerospace
- Apr 3, 2014
- 43
Hi,
I am trying to write an script to remove cells in a part if the cell volume is smaller than a given value.
Is there a simple command to delete a cell?
This is what I have tried:
def sliverVolumes(modelName, pInterName):
#Class to keep only cells bigger than a certain minimum value 'paramVol': paramVol=volCell/part_volume_r
allCells = pInterName.cells
mask_r = pInter.cells.getMask();
cellobj_sequence_r = pInter.cells.getSequenceFromMask(mask=mask_r);
part_volume_r = pInterName.getVolume(cells=cellobj_sequence_r);
# get faces
for i in range(0, len(allCells)):
volCell = allCells.getSize()
paramVol = volCell / part_volume_r
print 'paramVol= '+str(paramVol)
if paramVol < 0.01:
print 'Sliver Volume'
#HOW CAN I DELETE THE CELL HERE???
else:
print 'Not a sliver Volume'
Thanks!
I am trying to write an script to remove cells in a part if the cell volume is smaller than a given value.
Is there a simple command to delete a cell?
This is what I have tried:
def sliverVolumes(modelName, pInterName):
#Class to keep only cells bigger than a certain minimum value 'paramVol': paramVol=volCell/part_volume_r
allCells = pInterName.cells
mask_r = pInter.cells.getMask();
cellobj_sequence_r = pInter.cells.getSequenceFromMask(mask=mask_r);
part_volume_r = pInterName.getVolume(cells=cellobj_sequence_r);
# get faces
for i in range(0, len(allCells)):
volCell = allCells.getSize()
paramVol = volCell / part_volume_r
print 'paramVol= '+str(paramVol)
if paramVol < 0.01:
print 'Sliver Volume'
#HOW CAN I DELETE THE CELL HERE???
else:
print 'Not a sliver Volume'
Thanks!