Arrange Junction Business Rule (EHFLiveManipulator_ComputationAngleofArrangeFunction)

An opening ID is an entry point used to customize business logic. The Arrange junction business rule opening ID enables to define the angle between each segment of a junction and a fixed segment. By default, the fixed segment is the longest segment or the segment with the largest diameter.

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 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.

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

Input Objects

Input objects must be of the following types:

  • ThisObject: Segment (fixed on the junction when the Arrange Junctions commands are called.)
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
ListOfNewAngleAngle Write-

Sample

The 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)