Python Parameterization Exercise 2
Here is my parameterization of an I-beam with unequal flanges.
1) Create a simple I-beam with following dimensions
tf=20
tw=10
w1=150
w2=350
h=500
L=1000
2) Go to "Dump Study"
3) Open the file and write new dimensions for the flange
tf=10
tw=5
w1=30
w2=50
h=40
L=100
Box_1 = geompy.MakeBoxDXDYDZ(w1, L, tf)
Box_2 = geompy.MakeBoxDXDYDZ(tf, L, h)
geompy.TranslateDXDYDZ(Box_2, w1/2-tf/2, 0, tf)
Box_3 = geompy.MakeBoxDXDYDZ(w2, L, tf)
geompy.TranslateDXDYDZ(Box_3, -10, 0, tf+h)
4) Save and "Load Study" in Salome.
Result: the flange will have different dimensions based on the values you entered in the script.
1) Create a simple I-beam with following dimensions
tf=20
tw=10
w1=150
w2=350
h=500
L=1000
2) Go to "Dump Study"
3) Open the file and write new dimensions for the flange
tf=10
tw=5
w1=30
w2=50
h=40
L=100
Box_1 = geompy.MakeBoxDXDYDZ(w1, L, tf)
Box_2 = geompy.MakeBoxDXDYDZ(tf, L, h)
geompy.TranslateDXDYDZ(Box_2, w1/2-tf/2, 0, tf)
Box_3 = geompy.MakeBoxDXDYDZ(w2, L, tf)
geompy.TranslateDXDYDZ(Box_3, -10, 0, tf+h)
4) Save and "Load Study" in Salome.
Result: the flange will have different dimensions based on the values you entered in the script.

Comments
Post a Comment