General InformationThis opening ID is invoked when you compute the length of a conductor. The computation can be based on:
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 explains how to use an opening ID to compute the length of a distant link. Let DDLPosX(Real)
Let DDLPosY(Real)
Let DDLPosZ(Real)
Let DistantLinkLen(Real)
Let DiffX(Real)
Let DiffY(Real)
Let DiffZ(Real)
Let DorCX(Real)
Let DorCY(Real)
Let DorCZ(Real)
/*Get the Distant link position on the Branch*/
Set DDLPosX = Parameters.GetAttributeReal("DistantLinkPositionX")
Set DDLPosY = Parameters.GetAttributeReal("DistantLinkPositionY")
Set DDLPosZ = Parameters.GetAttributeReal("DistantLinkPositionZ")
/*Get the position related to the Device*/
/*If Conductor is defined till device, this position is the Device Origin*/
/*If Conductor is defined till a cavity of the device, then this position is the position of the Cavity*/
Set DorCX = Parameters.GetAttributeReal("DevicePositionX")
Set DorCY = Parameters.GetAttributeReal("DevicePositionY")
Set DorCZ = Parameters.GetAttributeReal("DevicePositionZ")
/*Compute the linear distance between two points*/
Set DiffX = DDLPosX -DorCX
Set DiffY = DDLPosY -DorCY
Set DiffZ = DDLPosZ -DorCZ
Set DiffX = DiffX*DiffX
Set DiffY = DiffY*DiffY
Set DiffZ = DiffZ*DiffZ
Set DistantLinkLen = DiffX + DiffY + DiffZ
Set DistantLinkLen = sqrt(DistantLinkLen)
Set DistantLinkLen = DistantLinkLen/1000
/*Return the computed length*/
Parameters.SetAttributeReal("DistantLinkLength",DistantLinkLen) | ||||||||||||||||||||||||||||||||||||||||||||||