Introduction
Usage : For Pipes, duct, tray, rigid
Allows to decide what are the angles for the diagonals of the Orthogonal routing box
Datasetup Resource Set :
- Piping/Tubing Specification Resources
- HVAC Specification Resources
- Raceway Specification Resources
Datasetup Resource : Compute angles for rigid pipe orthogonal routing
Rule Example
The angle can be different for box face
For the same face , the angle can be different according Height / width ratio
/* ThisObject: ProductOccurrence */ /* Declaration of Input Parameter */ Let Length_attr = "Length" Let Length_val (Real) Let Width_attr = "Width" Let Width_val (Real) Let Height_attr = "Height" Let Height_val (Real) Let ReferenceAxis_X_attr = "ReferenceAxis_X" /*List of Axis-1stDirection Coord */ Let ReferenceAxis_X_val (List) Let ReferenceAxis_Y_attr = "ReferenceAxis_Y" /*List of Axis-2ndDirection Coord */ Let ReferenceAxis_Y_val (List) Let ReferenceAxis_Z_attr = "ReferenceAxis_Z" /*List of Axis-3rdDirection Coord */ Let ReferenceAxis_Z_val (List) let StartVector_attr = "StartVector" /*List of StartVector Coord */ let StartVector_val (List) let Startvecx (Real) let Startvecy (Real) let Startvecz (Real) let EndVector_attr = "EndVector" /*List of EndVector Coord */ let EndVector_val (List) let EndVecx (Real) let EndVecy (Real) let EndVecz (Real) /* Declaration of Output Parameter */ let Angle_1_ZX_attr = "Angle_1_ZX" let Angle_1_ZX_val (Real) let PositionOption1_attr = "PositionOption1" let PositionOption1_val (Boolean) let Angle_1_XY_attr = "Angle_1_XY" let Angle_1_XY_val (Real) let PositionOption2_attr = "PositionOption2" let PositionOption2_val (Boolean) let Angle_1_YZ_attr = "Angle_1_YZ" let Angle_1_YZ_val (Real) let PositionOption3_attr = "PositionOption3" let PositionOption3_val (Boolean) let Angle_2_ZX_attr = "Angle_2_ZX" let Angle_2_ZX_val (Real) let PositionOption4_attr = "PositionOption4" let PositionOption4_val (Boolean) let Angle_2_XY_attr = "Angle_2_XY" let Angle_2_XY_val (Real) let PositionOption5_attr = "PositionOption5" let PositionOption5_val (Boolean) let Angle_2_YZ_attr = "Angle_2_YZ" let Angle_2_YZ_val (Real) let PositionOption6_attr = "PositionOption6" let PositionOption6_val (Boolean) /* Retreive Inputs */ set EndVector_val = Parameters -> GetAttributeObject (EndVector_attr) EndVecx = EndVector_val.GetItem(1) EndVecy = EndVector_val.GetItem(2) EndVecz = EndVector_val.GetItem(3) set StartVector_val = Parameters -> GetAttributeObject (StartVector_attr) Startvecx = StartVector_val.GetItem(1) Startvecy = StartVector_val.GetItem(2) Startvecz = StartVector_val.GetItem(3) Length_val = Parameters -> GetAttributeReal ( Length_attr ) Width_val = Parameters -> GetAttributeReal ( Width_attr ) Height_val = Parameters -> GetAttributeReal ( Height_attr ) set ReferenceAxis_X_val = Parameters -> GetAttributeObject ( ReferenceAxis_X_attr ) set ReferenceAxis_Y_val = Parameters -> GetAttributeObject ( ReferenceAxis_Y_attr ) set ReferenceAxis_Z_val = Parameters -> GetAttributeObject ( ReferenceAxis_Z_attr ) /* Compute Ouput */ PositionOption1_val=True Angle_1_XY_val =45 PositionOption2_val=True if(Width_val > Height_val) Angle_1_YZ_val =60 else if(Width_val == Height_val) Angle_1_YZ_val =45 else Angle_1_YZ_val =30 PositionOption3_val =True if(Height_val > Length_val) Angle_1_ZX_val =60 else if(Height_val == Length_val) Angle_1_ZX_val =45 else Angle_1_ZX_val = 30 PositionOption4_val =True Angle_2_XY_val=45 PositionOption5_val =True if(Width_val > Height_val) Angle_2_YZ_val =60 else if(Width_val == Height_val) Angle_2_YZ_val =45 else Angle_2_YZ_val =30 PositionOption6_val =True if(Height_val > Length_val) Angle_2_ZX_val =60 else if(Height_val == Length_val) Angle_2_ZX_val =45 else Angle_2_ZX_val =30 /* Set Ouput */ Parameters -> SetAttributeReal(Angle_1_XY_attr,Angle_1_XY_val) Parameters -> SetAttributeReal(Angle_1_ZX_attr,Angle_1_ZX_val ) Parameters -> SetAttributeReal(Angle_1_YZ_attr,Angle_1_YZ_val) Parameters -> SetAttributeReal(Angle_2_XY_attr,Angle_2_XY_val) Parameters -> SetAttributeReal(Angle_2_YZ_attr, Angle_2_YZ_val) Parameters -> SetAttributeReal(Angle_2_ZX_attr,Angle_2_ZX_val) Parameters -> SetAttributeBoolean(PositionOption1_attr,PositionOption1_val) Parameters -> SetAttributeBoolean(PositionOption2_attr, PositionOption2_val) Parameters -> SetAttributeBoolean(PositionOption3_attr, PositionOption3_val) Parameters -> SetAttributeBoolean(PositionOption4_attr, PositionOption4_val) Parameters -> SetAttributeBoolean(PositionOption5_attr, PositionOption5_val) Parameters -> SetAttributeBoolean(PositionOption6_attr, PositionOption6_val)