General InformationThis opening ID is invoked at the end of the arranging junctions process. For more information, see Electrical Manufacturing Preparation User's Guide: Preparing the Layout: Arranging Junctions. This opening ID is used to customize the relative angle between segments at a junction. Note:
If the business rule is not implemented, the default rule is: Umbrella between
-90° and 90°, and the angle between the branches is equal to 180° /
(number of segment -1).
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 an arrangement of segments when arranging junctions. /* CATRule signature (do not edit) : (ThisObject : #In Segment, Parameters : #In RuleContext) : #Void */
// variables declaration
let ListOfSeg(LIST)
let ListOfNewAngles(LIST)
let ListOfOriginalAngles(LIST)
let index(INTEGER)
let NbSegToArrange(INTEGER)
let Angle(REAL)
// variables initialization
set ListOfSeg= Parameters->GetAttributeObject("ListOfSegment")
set ListOfOriginalAngles= Parameters->GetAttributeObject("ListOfOriginalAngle")
set NbSegToArrange = ListOfSeg->Size()
// parametrization of the angle
// NOTE: the angle is with respect to the reference segment (biggest diameter or longest one)
Angle = (PI)/(NbSegToArrange+1)
index = 1
// set angle value for each segment of the junction to arrange
for index while index <= NbSegToArrange
{
ListOfNewAngles->SetItem((PI/2)+(Angle*index),index)
}
// return the list of angles to the Prepare Layout app
set ListOfNewAngles = Parameters->SetAttributeObject("ListOfNewAngle", ListOfNewAngles) | |||||||||||||||||||||