Fix: strips works now
This commit is contained in:
parent
8547d026ba
commit
c7678a2f0d
@ -27,7 +27,7 @@ directions = [
|
||||
[0, 0, 1],
|
||||
[1, 1, 1]
|
||||
]
|
||||
fillet = false
|
||||
fillet = true
|
||||
|
||||
[simple.mesh]
|
||||
fineness = 3
|
||||
@ -66,7 +66,7 @@ directions = [
|
||||
[0, 0, 1],
|
||||
[1, 1, 1]
|
||||
]
|
||||
fillet = false
|
||||
fillet = true
|
||||
|
||||
[bodyCentered.mesh]
|
||||
fineness = 3
|
||||
@ -104,7 +104,7 @@ directions = [
|
||||
[0, 0, 1],
|
||||
[1, 1, 1]
|
||||
]
|
||||
fillet = false
|
||||
fillet = true
|
||||
|
||||
[faceCentered.mesh]
|
||||
fineness = 3
|
||||
|
@ -148,6 +148,21 @@ patches
|
||||
constructFrom patches;
|
||||
patches (symetry5_);
|
||||
}
|
||||
|
||||
{
|
||||
name strips;
|
||||
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
inGroups (wall);
|
||||
}
|
||||
|
||||
constructFrom patches;
|
||||
patches (strips_);
|
||||
}
|
||||
|
||||
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -109,7 +109,7 @@ def bodyCenteredCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
grainsOrigin = None
|
||||
|
||||
if fillet:
|
||||
grainsOrigin = grains
|
||||
grainsOrigin = geompy.MakeScaleTransform(grains, oo, 1 / scale)
|
||||
grains = geompy.MakeFilletAll(grains, filletradius * scale)
|
||||
|
||||
###
|
||||
@ -117,28 +117,11 @@ def bodyCenteredCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
##
|
||||
shape = geompy.MakeCutList(cubic, [grains])
|
||||
shape = geompy.MakeScaleTransform(shape, oo, 1 / scale, theName = "bodyCenteredCubic")
|
||||
stripsShape = None
|
||||
|
||||
if fillet:
|
||||
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)
|
||||
|
||||
|
||||
sall = geompy.CreateGroup(shape, geompy.ShapeType["FACE"])
|
||||
geompy.UnionIDs(sall,
|
||||
geompy.SubShapeAllIDs(shape, geompy.ShapeType["FACE"]))
|
||||
|
||||
strips = None
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
geompy.UnionList(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)
|
||||
@ -166,6 +149,11 @@ def bodyCenteredCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
groups.extend(symetry)
|
||||
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
shapeShell = geompy.ExtractShapes(shape, geompy.ShapeType["SHELL"], True)
|
||||
stripsShape = geompy.MakeCutList(shapeShell[0], groups + [grainsOrigin])
|
||||
geompy.UnionList(strips, geompy.SubShapeAll(
|
||||
geompy.GetInPlace(shape, stripsShape, True), geompy.ShapeType["FACE"]))
|
||||
groups.append(strips)
|
||||
|
||||
wall = geompy.CutListOfGroups([sall], groups, theName = "wall")
|
||||
@ -265,7 +253,7 @@ def bodyCenteredHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1,
|
||||
grainsOrigin = None
|
||||
|
||||
if fillet:
|
||||
grainsOrigin = grains
|
||||
grainsOrigin = geompy.MakeScaleTransform(grains, oo, 1 / scale)
|
||||
grains = geompy.MakeFilletAll(grains, filletradius * scale)
|
||||
|
||||
###
|
||||
@ -273,29 +261,11 @@ def bodyCenteredHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1,
|
||||
##
|
||||
shape = geompy.MakeCutList(hexagonPrism, [grains])
|
||||
shape = geompy.MakeScaleTransform(shape, oo, 1 / scale, theName = "bodyCenteredCubic")
|
||||
stripsShape = None
|
||||
|
||||
if fillet:
|
||||
shapeOrigin = geompy.MakeCutList(hexagonPrism, [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)
|
||||
|
||||
|
||||
sall = geompy.CreateGroup(shape, geompy.ShapeType["FACE"])
|
||||
geompy.UnionIDs(sall,
|
||||
geompy.SubShapeAllIDs(shape, geompy.ShapeType["FACE"]))
|
||||
|
||||
strips = None
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
geompy.UnionList(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)
|
||||
@ -323,9 +293,13 @@ def bodyCenteredHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1,
|
||||
groups.extend(symetry)
|
||||
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
shapeShell = geompy.ExtractShapes(shape, geompy.ShapeType["SHELL"], True)
|
||||
stripsShape = geompy.MakeCutList(shapeShell[0], groups + [grainsOrigin])
|
||||
geompy.UnionList(strips, geompy.SubShapeAll(
|
||||
geompy.GetInPlace(shape, stripsShape, True), geompy.ShapeType["FACE"]))
|
||||
groups.append(strips)
|
||||
|
||||
|
||||
wall = geompy.CutListOfGroups([sall], groups, theName = "wall")
|
||||
groups.append(wall)
|
||||
|
||||
|
@ -108,7 +108,7 @@ def faceCenteredCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
grainsOrigin = None
|
||||
|
||||
if fillet:
|
||||
grainsOrigin = grains
|
||||
grainsOrigin = geompy.MakeScaleTransform(grains, oo, 1 / scale)
|
||||
grains = geompy.MakeFilletAll(grains, filletradius * scale)
|
||||
|
||||
###
|
||||
@ -116,29 +116,11 @@ def faceCenteredCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
##
|
||||
shape = geompy.MakeCutList(cubic, [grains])
|
||||
shape = geompy.MakeScaleTransform(shape, oo, 1 / scale, theName = "faceCenteredCubic")
|
||||
stripsShape = None
|
||||
|
||||
if fillet:
|
||||
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)
|
||||
|
||||
|
||||
sall = geompy.CreateGroup(shape, geompy.ShapeType["FACE"])
|
||||
geompy.UnionIDs(sall,
|
||||
geompy.SubShapeAllIDs(shape, geompy.ShapeType["FACE"]))
|
||||
|
||||
strips = None
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
geompy.UnionList(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)
|
||||
@ -166,6 +148,11 @@ def faceCenteredCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
groups.extend(symetry)
|
||||
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
shapeShell = geompy.ExtractShapes(shape, geompy.ShapeType["SHELL"], True)
|
||||
stripsShape = geompy.MakeCutList(shapeShell[0], groups + [grainsOrigin])
|
||||
geompy.UnionList(strips, geompy.SubShapeAll(
|
||||
geompy.GetInPlace(shape, stripsShape, True), geompy.ShapeType["FACE"]))
|
||||
groups.append(strips)
|
||||
|
||||
wall = geompy.CutListOfGroups([sall], groups, theName = "wall")
|
||||
@ -263,7 +250,7 @@ def faceCenteredHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1,
|
||||
grainsOrigin = None
|
||||
|
||||
if fillet:
|
||||
grainsOrigin = grains
|
||||
grainsOrigin = geompy.MakeScaleTransform(grains, oo, 1 / scale)
|
||||
grains = geompy.MakeFilletAll(grains, filletradius * scale)
|
||||
|
||||
###
|
||||
@ -271,29 +258,11 @@ def faceCenteredHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1,
|
||||
##
|
||||
shape = geompy.MakeCutList(hexagonPrism, [grains])
|
||||
shape = geompy.MakeScaleTransform(shape, oo, 1 / scale, theName = "faceCenteredCubic")
|
||||
stripsShape = None
|
||||
|
||||
if fillet:
|
||||
shapeOrigin = geompy.MakeCutList(hexagonPrism, [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)
|
||||
|
||||
|
||||
sall = geompy.CreateGroup(shape, geompy.ShapeType["FACE"])
|
||||
geompy.UnionIDs(sall,
|
||||
geompy.SubShapeAllIDs(shape, geompy.ShapeType["FACE"]))
|
||||
|
||||
strips = None
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
geompy.UnionList(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)
|
||||
@ -321,6 +290,11 @@ def faceCenteredHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1,
|
||||
groups.extend(symetry)
|
||||
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
shapeShell = geompy.ExtractShapes(shape, geompy.ShapeType["SHELL"], True)
|
||||
stripsShape = geompy.MakeCutList(shapeShell[0], groups + [grainsOrigin])
|
||||
geompy.UnionList(strips, geompy.SubShapeAll(
|
||||
geompy.GetInPlace(shape, stripsShape, True), geompy.ShapeType["FACE"]))
|
||||
groups.append(strips)
|
||||
|
||||
wall = geompy.CutListOfGroups([sall], groups, theName = "wall")
|
||||
|
@ -97,7 +97,7 @@ def simpleCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
grainsOrigin = None
|
||||
|
||||
if fillet:
|
||||
grainsOrigin = grains
|
||||
grainsOrigin = geompy.MakeScaleTransform(grains, oo, 1 / scale)
|
||||
grains = geompy.MakeFilletAll(grains, filletradius * scale)
|
||||
|
||||
###
|
||||
@ -105,28 +105,11 @@ 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 fillet:
|
||||
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)
|
||||
|
||||
|
||||
sall = geompy.CreateGroup(shape, geompy.ShapeType["FACE"])
|
||||
geompy.UnionIDs(sall,
|
||||
geompy.SubShapeAllIDs(shape, geompy.ShapeType["FACE"]))
|
||||
|
||||
strips = None
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
geompy.UnionList(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)
|
||||
@ -154,6 +137,11 @@ def simpleCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
||||
groups.extend(symetry)
|
||||
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
shapeShell = geompy.ExtractShapes(shape, geompy.ShapeType["SHELL"], True)
|
||||
stripsShape = geompy.MakeCutList(shapeShell[0], groups + [grainsOrigin])
|
||||
geompy.UnionList(strips, geompy.SubShapeAll(
|
||||
geompy.GetInPlace(shape, stripsShape, True), geompy.ShapeType["FACE"]))
|
||||
groups.append(strips)
|
||||
|
||||
wall = geompy.CutListOfGroups([sall], groups, theName = "wall")
|
||||
@ -242,7 +230,7 @@ def simpleHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1, 1]):
|
||||
grainsOrigin = None
|
||||
|
||||
if fillet:
|
||||
grainsOrigin = grains
|
||||
grainsOrigin = geompy.MakeScaleTransform(grains, oo, 1 / scale)
|
||||
grains = geompy.MakeFilletAll(grains, filletradius * scale)
|
||||
|
||||
###
|
||||
@ -250,28 +238,11 @@ def simpleHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1, 1]):
|
||||
##
|
||||
shape = geompy.MakeCutList(hexagonPrism, [grains])
|
||||
shape = geompy.MakeScaleTransform(shape, oo, 1 / scale, theName = "simpleCubic")
|
||||
stripsShape = None
|
||||
|
||||
if fillet:
|
||||
shapeOrigin = geompy.MakeCutList(hexagonPrism, [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)
|
||||
|
||||
|
||||
sall = geompy.CreateGroup(shape, geompy.ShapeType["FACE"])
|
||||
geompy.UnionIDs(sall,
|
||||
geompy.SubShapeAllIDs(shape, geompy.ShapeType["FACE"]))
|
||||
|
||||
strips = None
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
geompy.UnionList(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)
|
||||
@ -299,6 +270,11 @@ def simpleHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1, 1]):
|
||||
groups.extend(symetry)
|
||||
|
||||
if fillet:
|
||||
strips = geompy.CreateGroup(shape, geompy.ShapeType["FACE"], theName = "strips")
|
||||
shapeShell = geompy.ExtractShapes(shape, geompy.ShapeType["SHELL"], True)
|
||||
stripsShape = geompy.MakeCutList(shapeShell[0], groups + [grainsOrigin])
|
||||
geompy.UnionList(strips, geompy.SubShapeAll(
|
||||
geompy.GetInPlace(shape, stripsShape, True), geompy.ShapeType["FACE"]))
|
||||
groups.append(strips)
|
||||
|
||||
wall = geompy.CutListOfGroups([sall], groups, theName = "wall")
|
||||
|
Loading…
Reference in New Issue
Block a user