General Information
This opening ID is invoked when you create or edit a pipe/tube with the
alternate paths option.
This opening ID is used to customize the angles of the different paths.
The table below provides you with information related to the definition
of the Opening ID.
PLM Opening ID:
|
PipComputeOrthogonalRoutingAngle
|
Customization intent:
|
Computation
|
Execution context:
|
Client
|
Input Objects
Input objects must be of the following types:
ThisObject
: product occurrence of rigid pipe/tube
Parameters
corresponds to the context object.
Context Object Parameters
Parameter Name
|
Type
|
Read/Write
|
Comments
|
GetAttributeObject
|
List
|
Read
|
EndVector
|
GetAttributeObject
|
List
|
Read
|
StartVector
|
GetAttributeObject
|
List
|
Read
|
ReferenceAxis_X
|
GetAttributeObject
|
List
|
Read
|
ReferenceAxis_Y
|
GetAttributeObject
|
List
|
Read
|
ReferenceAxis_Z
|
GetAttributeReal
|
Real
|
Read
|
Length
|
GetAttributeReal
|
Real
|
Read
|
Width
|
GetAttributeReal
|
Real
|
Read
|
Height
|
SetAttributeReal
|
Real
|
Write
|
Angle_1_XY
|
SetAttributeReal
|
Real
|
Write
|
Angle_1_ZX
|
SetAttributeReal
|
Real
|
Write
|
Angle_1_YZ
|
SetAttributeReal
|
Real
|
Write
|
Angle_2_XY
|
SetAttributeReal
|
Real
|
Write
|
Angle_2_YZ
|
SetAttributeReal
|
Real
|
Write
|
Angle_2_ZX
|
SetAttributeBoolean
|
Boolean
|
Write
|
PositionOption1
|
SetAttributeBoolean
|
Boolean
|
Write
|
PositionOption2
|
SetAttributeBoolean
|
Boolean
|
Write
|
PositionOption3
|
SetAttributeBoolean
|
Boolean
|
Write
|
PositionOption4
|
SetAttributeBoolean
|
Boolean
|
Write
|
PositionOption5
|
SetAttributeBoolean
|
Boolean
|
Write
|
PositionOption6
|
Sample
/* 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)