Hi
I'm trying to place a Riser Clamp in OPSE version 08.11.11.235
The Python script in the below:
def DZD105(name, param): uom = BESParamReader.RealUOM ( param, "OD" ) pipeOD = BESParamReader.RealValue(param,"OD",0.0,uom) sizeD = BESParamReader.RealValue(param, "D", 0.0, uom) sizeB = BESParamReader.RealValue(param, "B", 0.0, uom) sizeH = BESParamReader.RealValue(param, "H", 0.0, uom) sizeC = BESParamReader.RealValue(param, "C", 0.0, uom) sizeL = BESParamReader.RealValue(param, "L", 0.0, uom) Message( str( param ) ) tubeD = pipeOD stockW = sizeB stockT = sizeD c_cLen = sizeC strapGap = stockT * 1.5 boltD = sizeD boltL = strapGap + stockT * 2 boltTopEdge = sizeH boltSideEdge = 0.5 * (sizeL - sizeC) numBolt = 6 lugHgt = BESParamReader.FixedRealValue( "50_MM", uom ) lugThk = stockT lugMidHgt = lugHgt lugUpWid = stockT * 2.0 lugLowWid = lugUpWid lugCount = 4 createReinforcement = False brcH = 0.0 brcL = 0.0 if ( tubeD >= 325.0 ): brcH = tubeD * 0.25 brcL = sizeL * 0.1 return BasicShapes.RClampShearLugs( name, uom, tubeD, stockW, stockT, \ c_cLen, strapGap, boltD, boltL, boltTopEdge, boltSideEdge, numBolt, \ lugHgt, lugMidHgt, lugThk, lugUpWid, lugLowWid, lugCount, brcH, brcL )
And the Dimensions of the component is:
ND=80_MM OD=89_MM D=12_MM H=20_MM B=90_MM H1=60_MM K=6_MM N=4_MM C=650_MM L=700_MM
The Component after placement is upside down, and the Rotation Yaw or Pitch is read-only
What I actually need shown in the image below
How to modify the python script ? Thanks for your help
First create a BESSpace element and add your part to it. And then try to use the AstroLCS method to rotate your assembly as per your requirement.
e.g.
if ( tubeD >= 325.0 ): brcH = tubeD * 0.25 brcL = sizeL * 0.1
myPart = BESSpace("Mypart")
riserClamp = BasicShapes.RClampShearLugs( name, uom, tubeD, stockW, stockT, \ c_cLen, strapGap, boltD, boltL, boltTopEdge, boltSideEdge, numBolt, \ lugHgt, lugMidHgt, lugThk, lugUpWid, lugLowWid, lugCount, brcH, brcL )
myPart.AddBESPiece(riserClamp)
# I am not sure which angle should be set to 180 so try shuffling last 3 arguments for X, Y Z axis rotation.
myPart.AstroLCS(0, 0, 0, uom, 0, 0, 180)
return myPart
Regardless of the rotation angle, the lifting lugs are always on the left.
The problem maybe in Lugs
Is it Possible to provide detailed source code for the class("BasicShapes.RClampShearLugs")?
I faced the same issue in the past and i created my own lugs using the Box method and pipeRClamps method separately.
Please give it a try and let me know if you can achieve what you want. In the meantime i will ask internally if i can share the code of the method RClampShearLugs
Thanks,