Torsion Management Business Rule (EHFTorsionManagement_ComputationAngleofCriticalTorsionValue)

An opening ID is an entry point used to customize business logic. The Torsion management business rule opening ID allows you to specify the critical value (in degree/meter) for the torsion calculation.

This business rule can be applied on segments built with the Flex algorithm. For more information, see Electrical 3D Part Design User's Guide: About the Flex Algorithm.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when using the Analyze Torsion command.

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: EHFTorsionManagement_ComputationAngleofCriticalTorsionValue
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Segment.
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
AngleReal Contains the angle per unit length (deg/meter) which is critical torsion value.
SegmentProfileIntegerContains the flex segment profile type. The value should be between 0 to 5. (0 = circle, 1 = ellipse, 2 = rectangle, 3 = semicircle, 4 = semirectangle, 5 = noprofile)
SegmentFlexibilityRealContains the segment flexibility.
StartAbscissaRealContains the abscissa of the start point of the flex segment in mm.
EndAbscissaRealContains the abscissa of the end point of the flex segment in mm.
StartProfileDimension1RealContains the first profile dimension in mm of the start point of the flex segment.
StartProfileDimension2RealContains the second profile dimension in mm of the start point of the flex segment.
EndProfileDimension1RealContains the first profile dimension in mm of the end point of the flex segment.
EndProfileDimension2RealContains the second profile dimension in mm of the end point of the flex segment.

Sample

The following sample describes how to compute the critical torsion value during a torsion analysis.

// variables declaration
let CriticalTorsionAngle(ANGLE)
let Diameter(Real)
let StartAbscissa(Real)
let EndAbscissa(Real)
let SegmentLength(Real)
let ProfileType(Integer)

/* retrieve parameters values */
set ProfileType= Parameters.GetAttributeInteger("SegmentProfile")
set Diameter = Parameters.GetAttributeReal("StartProfileDimension1")
set StartAbscissa = Parameters.GetAttributeReal("StartAbscissa")
set EndAbscissa = Parameters.GetAttributeReal("EndAbscissa")

/* computation */
set CriticalTorsionAngle = 30deg /* default value */
set SegmentLength = EndAbscissa-StartAbscissa
if (SegmentLength<=100 and Diameter<=10)
	set CriticalTorsionAngle = 20deg
else if (SegmentLength<=100 and Diameter>10)
	set CriticalTorsionAngle = 20deg
else if (SegmentLength>100 and SegmentLength<=200 and Diameter<=10)
	set CriticalTorsionAngle = 70deg
else if (SegmentLength>100 and SegmentLength<=200 and Diameter>10)
	set CriticalTorsionAngle = 35deg
else if (SegmentLength>200 and Diameter<=10)
	set CriticalTorsionAngle = 180deg
else if (SegmentLength>200 and Diameter>10)
	set CriticalTorsionAngle = 70deg

/* Valuate the output */
Parameters.SetAttributeReal("Angle", CriticalTorsionAngle)