General InformationThis 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.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe 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)
} | |||||||||||||||||||||