Validate Segment Arrangement in Support Section (EHI_ValidateSegmentArrangementInSupport)

An opening ID is an entry point used to customize business logic. The Validate segment arrangement in support section opening ID checks a segment U and V value modification during the arrangement of the segment in a support section. By default, all the changes are allowed.

This opening ID is available in the Electrical physical system design resources resource set.

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 Arrange Segments and Copy Arrangement commands. For more information, see Electrical 3D Part Design User's Guide: Arranging Segments.

The purpose of this opening ID is to:

  • Validate the arrangement of the segments inside the support section
  • Check that design rules are followed during the process

This opening ID can either:

  • Validate the U and/or V modification (severity=0)
  • Validate the U and/or V modification with warning (severity=1)
  • Reject the U and/or V modification with an error (severity=2)

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

PLM Opening ID: EHI_ValidateSegmentArrangementInSupport
Customization intent: Validation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Segment.
  • Parameters corresponds to the context object.
  • Validation: Variable with Boolean output to check the segment arrangement.
  • Severity messages:
    • Severity= 0: The treatment is to be continued (no message).
    • Severity= 1: The treatment is to be continued and only a warning is raised.
    • Severity= 2: The treatment is supposed to be undone.

Context Object Parameters

Parameter NameTypeRead/WriteComments
SupportInstance (input)VPMInstance Read Support instance in which the branch section is arranged.
SupportSection (input)IntegerRead Support section number.
ListOfSegments (input)ListRead List of already routed segments in the support section.
ListOfSegmentsU (input)ListRead List of already routed segments Position (U) with regards to support entry point and plane.
ListOfSegmentsV (input)ListRead List of already routed segments Position (V) with regards to support entry point and plane.
SegmentU (input)RealReadCurrent U value of “ThisObject” to be validated.
SegmentV (input)RealReadCurrent V value of “ThisObject” to be validated.

Sample

The following sample illustrates the business rule syntax.

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

Let SegmentU (Real)
Let SegmentV (Real)
Let SegmentDiameter (Real)
Let SptSectionRadius (Real)
Let NewDistanceFromCenter (Real)
Let SegDistanceFromSptSection (Real)

/* Parameters available in the business rule, which will not be taken into account for acceptance test scenario as given below */

set SptSectionRadius = 30.0 /* We know the section radius of the support */

set SegmentU = Parameters.GetAttributeReal("SegmentU")
set SegmentV = Parameters.GetAttributeReal("SegmentV")

set  SegmentDiameter = ThisObject.Elec_Diameter

/* This rule will validate that after modifying the segment U & V the  segment should not collapse in the support */
set NewDistanceFromCenter = sqrt( SegmentU*SegmentU  + SegmentV*SegmentV ) /* Center U and V = 0.0*/
set SegDistanceFromSptSection = NewDistanceFromCenter + SegmentDiameter - SptSectionRadius

if( SegDistanceFromSptSection > 0.0001) /* if this value is more than tolerance, the segment will clash with the support section so forbid the action */
{
	Parameters.Severity = 2
	Parameters.Message = "After this modification segment will clash with the support, hence business rule forbids this arrangement."
	Validation = false
}
else if( ( SegDistanceFromSptSection < 0.0001) and ( SegDistanceFromSptSection >= 0.01) )
{
	/* if this value is in the range tolerance to 0.01, the segment will be too close the the support, so allow this modification BUT with warning*/
	Parameters.Severity = 1
	Parameters.Message = "After this modification segment will be too close to the support, hence business rule allows this arrangement with warning."
	Validation = true
}
else
{
	/* This modification is OK*/
	Parameters.Severity = 0
	Parameters.Message = "This modification is OK."
	Validation = true
}