Mod: strips part (error while creating)

This commit is contained in:
L-Nafaryus 2021-06-17 22:59:20 +05:00
parent ca1712e1d1
commit 7e1d16091a
No known key found for this signature in database
GPG Key ID: C76D8DCD2727DBB7

View File

@ -94,8 +94,10 @@ def simpleCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
grains = geompy.MakeFuseList(grains, False, False)
grains = geompy.MakeScaleTransform(grains, oo, scale)
grainsOrigin = None
if fillet:
grainsOrigin = grains
grains = geompy.MakeFilletAll(grains, filletradius * scale)
###
@ -103,11 +105,29 @@ def simpleCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
##
shape = geompy.MakeCutList(cubic, [grains])
shape = geompy.MakeScaleTransform(shape, oo, 1 / scale, theName = "simpleCubic")
stripsShape = None
if grainsOrigin:
shapeOrigin = geompy.MakeCutList(cubic, [grainsOrigin])
shapeOrigin = geompy.MakeScaleTransform(shapeOrigin, oo, 1 / scale)
shapeShell = geompy.ExtractShapes(shape, geompy.ShapeType["SHELL"], True)
shapeOriginShell = geompy.ExtractShapes(shapeOrigin, geompy.ShapeType["SHELL"], True)
stripsShape = geompy.MakeCutList(shapeShell[0], shapeOriginShell)
print(stripsShape)
sall = geompy.CreateGroup(shape, geompy.ShapeType["FACE"])
geompy.UnionIDs(sall,
geompy.SubShapeAllIDs(shape, geompy.ShapeType["FACE"]))
strips = None
if stripsShape:
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
geompy.UnionIDs(strips, geompy.SubShapeAll(
geompy.GetInPlace(shape, stripsShape, True), geompy.ShapeType["FACE"]))
inlet = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "inlet")
inletshape = geompy.MakeCutList(inletface, [grains])
inletshape = geompy.MakeScaleTransform(inletshape, oo, 1 / scale)
@ -133,6 +153,10 @@ def simpleCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
groups.append(inlet)
groups.append(outlet)
groups.extend(symetry)
if strips:
groups.append(strips)
wall = geompy.CutListOfGroups([sall], groups, theName = "wall")
groups.append(wall)