Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i have created python script for flange holder for grve flange and stuck in tringle or gusset plate,
please find below script for the same and attached image snap.
import aqa.math
import math
from varmain.primitiv import *
from varmain.var_basic import *
from varmain.custom import *
@activate(
Group="support",
Ports="1",
TooltipShort="Flange Holder",
TooltipLong="Flange holder with dimensional graphics",
LengthUnit="mm",
)
@param(D=LENGTH, TooltipShort="Diameter of pipe", TooltipLong="Diameter of pipe",)
@param(L=LENGTH, TooltipShort="Length of the base plate", TooltipLong="Length of the base plate")
@param(W=LENGTH, TooltipShort="Width of the Base plate", TooltipLong="Width of the Base plate")
@param(T=LENGTH, TooltipShort="Thickness of base plate", TooltipLong="Thickenss Of base plate")
@param(L1=LENGTH, TooltipShort="Length of Gusset plate", ToolyipLong="Length of Gusset plate")
@param(W1=LENGTH, TooltipShort="Width Of Gusset plate", TooltipLong="Width of Gusset plate")
@param(T1=LENGTH, TooltipShort="Thickness of Gusset plate", TooltipLong="Thickness of Gusset plate")
@param(L2=LENGTH, TooltipShort="Length of Rib plate", TooltipLong="Length of Rib plate")
@param(W2=LENGTH, TooltipShort="Width of Rib Plate", TooltipLong="Width of Rib plate")
@param(T2=LENGTH, TooltipShort="Thickness of Rib plate", TooltipLong="Thickness of Rib plate")
@param(L3=LENGTH, TooltipShort="Thickness of Flange", TooltipLong="Thickness of Flange Face to Flange End")
@param(H=LENGTH, TooltipLong="Height of Flange Center To Base plate bottom")
@enum(1, "align X")
@enum(2, "align Y")
@enum(3, "align Z")
def FlangeHolder(s, D=213.15, L=400, W=150, T=16, L1=10, W1=119.91, T1=119.91, L2=400, W2=16, T2=184, L3=79.25, H=325, ID="FlangeHolder", **kw😞
# Calculation
R1 = D / 2.0
A = (T2/2.0 + T/2.0)
B = (T1/2.0 + T/2.0)
C = (T1/2.0+T/2.0) - math.sqrt(W1*W1 + T1*T1)
E = W1 / 2.0
# Create Base Plate
o1 = BOX(s, L=L, W=W, H=T).translate((0, 0, 0))
o2 = BOX(s, L=L2, W=W2, H=T2).translate((-A, 0, -(W/2 - W2/2.0)))
o3 = BOX(s, L=L1, W=W1, H=T1).translate((-B, 0, 0))
# Create right-angled triangle
o5 = BOX(s, L=L1, W=W1, H=T1).translate((-B, 0, 0))
# Unite all the parts
o1.uniteWith(o2)
o2.erase()
o1.uniteWith(o3)
o3.erase()
# Rotate
o1.rotateY(90)
# Connection Points
# Main pipe ports
s.setPoint((-L3, 0, 0), (0, 0, 0)) # Port at Center of the main pipe
# Optional: Linear dimensions
s.setLinearDimension("H", (0, 0, 0), (0, 0, H))
Solved! Go to Solution.