AutoCAD Plant 3D — 全平面板式平焊法蘭(NLFLGE_PLFF_300.py)

from varmain.primitiv import *
from varmain.custom import *
@activate(Group="Flange", FirstPortEndtypes="FL", Ports=2, TooltipShort="NING.", LengthUnit="mm")
@group("MainDimensions")
@param(D=LENGTH, TooltipLong="NING.")
@param(B1=LENGTH, TooltipLong="NING.")
@param(C=LENGTH, TooltipLong="NING.")
@param(hf=LENGTH, TooltipLong="NING.")
def NLFLGE_PLFF_300(s, D=115.0, B1=33.0, C=16.0, hf=0.0, **kw):
????s1=CYLINDER(s, R=D/2, H=C, O=0.0)
????s2=CYLINDER(s, R=B1/2, H=C, O=0.0)
????s1.subtractFrom(s2)
????s2.erase()
????s1.rotateY(90)
????s.setPoint((0.0, 0.0, 0.0), (-1.0, 0.0, 0.0))
????s.setPoint((hf, 0.0, 0.0), (1.0, 0.0, 0.0))
標(biāo)簽: