Fix: fillet radius

This commit is contained in:
L-Nafaryus 2021-04-05 15:18:51 +05:00
parent 0ade0b0621
commit 517145446b
3 changed files with 23 additions and 9 deletions

View File

@ -151,13 +151,13 @@ def bodyCenteredCubic(alpha):
grains = geompy.MakeFuseList(grains, False, False)
R = r0 / (1 - alpha)
C1 = 0.6
C2 = 0.4
C1 = 0.8
C2 = 0.01
alpha1 = 0.01
alpha2 = 0.13
alpha2 = 0.18
Cf = C1 + (C2 - C1) / (alpha2 - alpha1) * (alpha - alpha1)
R_fillet = Cf * (r0 * math.sqrt(2) - R)
R_fillet = Cf * (R - r0)
#grains = geompy.MakeFilletAll(grains, R_fillet)
#geometry1 = geompy.MakeCutList(Pore_1a, [grains], True)
@ -179,5 +179,9 @@ def bodyCenteredCubic(alpha):
geometry1 = geompy.MakeScaleTransform(geometry1, O, 1 / scale)
geometry2 = geompy.MakeScaleTransform(geometry2, O, 1 / scale)
#
geompy.addToStudy(grains, "grains")
geompy.addToStudy(geometry1, "geometry1")
geompy.addToStudy(geometry2, "geometry2")
return grains, Pore_1a, Pore_3c

View File

@ -147,13 +147,13 @@ def faceCenteredCubic(alpha):
R = r0 / (1 - alpha)
C1 = 0.8
C2 = 0.4
C2 = 0.01
alpha1 = 0.01
alpha2 = 0.18
alpha2 = 0.13
Cf = C1 + (C2 - C1) / (alpha2 - alpha1) * (alpha - alpha1)
R_fillet = Cf * (r0 * math.sqrt(2) - R)
R_fillet = Cf * (R - r0)
print(R_fillet)
#grains = geompy.MakeFilletAll(grains, R_fillet)
#geometry1 = geompy.MakeCutList(Common, [grains], True)
#geometry2 = geompy.MakeCutList(Cut_8, [grains], True)
@ -174,4 +174,9 @@ def faceCenteredCubic(alpha):
geometry1 = geompy.MakeScaleTransform(geometry1, O, 1 / scale)
geometry2 = geompy.MakeScaleTransform(geometry2, O, 1 / scale)
#
geompy.addToStudy(grains, "grains")
geompy.addToStudy(geometry1, "geometry1")
geompy.addToStudy(geometry2, "geometry2")
return grains, geometry1, geometry2

View File

@ -121,7 +121,7 @@ def simpleCubic(alpha):
alpha2 = 0.28
Cf = C1 + (C2 - C1) / (alpha2 - alpha1) * (alpha - alpha1)
R_fillet = Cf * (r0 * math.sqrt(2) - R)
R_fillet = Cf * (R - r0)
# Scaling up
scale = 100
@ -139,4 +139,9 @@ def simpleCubic(alpha):
geometry1 = geompy.MakeScaleTransform(geometry1, O, 1 / scale)
geometry2 = geompy.MakeScaleTransform(geometry2, O, 1 / scale)
#
geompy.addToStudy(grains, "grains")
geompy.addToStudy(geometry1, "geometry1")
geompy.addToStudy(geometry2, "geometry2")
return grains, geometry1, geometry2