Rotate Business Rule (EHFLiveManipulator_AngleofRotate)

An opening ID is an entry point used to customize business logic. The Rotate business rule opening ID enables the computation of the minimum angle between two segments at the same junction. It is called one time for each couple of segments to get the minimum angle between them.

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 Rotate command and the Arrange Junctions commands.

When the minimum angle is reached, a symbol with an exclamation mark is displayed on the segment to indicate that this action is not recommended because the minimum angle is not respected. Even if the symbol appears, the rotation is possible, for it can be a temporary step. But the rotation or the Umbrella arranging is applied only if all the minimum angles between all the branches are respected. In addition, if you mouse over the symbol, a tooltip is displayed.

Note: If the business rule is not implemented, the default value is 5 degrees.

This opening ID is used to customize the angle versus the next segment detected.

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

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

Input Objects

Input objects must be of the following types:
  • ThisObject
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
AngleAngle Write-

Sample

The following sample describes how to compute the minimum allowable angle value when rotating segments.

/* CATRule signature (do not edit) : (ThisObject : #In Segment, Parameters : #In RuleContext) : #Void */

// variables declaration
let MinimumRotateAngle(ANGLE)
let ConsecutiveSegment(Segment)

let SegmentBranch(Branch)
let ThisSegment(Segment)
let ThisSegmentDiameter(LENGTH)
let NextSegmentDiameter(LENGTH)

// variables initialization
set MinimumRotateAngle = 20deg

// retrieve the consecutive segment to compare with the segment under rotation
ConsecutiveSegment = Parameters.GetAttributeObject("Segment2")

// retrieve the segment branch
set SegmentBranch = ConsecutiveSegment.Owner

// retrieve the diameter of the segment under rotation
set ThisSegment=ThisObject
ThisSegmentDiameter = ThisSegment.Elec_Diameter

// retrieve the diameter of the consecutive segment 
NextSegmentDiameter = ConsecutiveSegment.Elec_Diameter

// set minimum angle value as per the segment path and diameter
if ( NextSegmentDiameter<=ThisSegmentDiameter )
	Parameters.SetAttributeReal("Angle", MinimumRotateAngle)
else 
{
	set MinimumRotateAngle = 30deg
	Parameters.SetAttributeReal("Angle", MinimumRotateAngle)
	Notify("Diameter=#",NextSegmentDiameter)
}