The following example illustrates how the network path of a routed conductor can
be analyzed.
In this example, the network path and the ends of the conductor are retrieved. The
EKL exposition allows to:
- Retrieve the elements at the conductor's ends: device, cavities, and
backshells
- Compute the length of the network path
- Analyze the path of the conductor's route by:
- Retrieving information on the conductor's arcs
- Retrieving information on the conductor's nodes
- Retrieving information on the supports belonging to the conductor's
route.
Sample
Notify ( " wire : ",SelectedConductor.Name)
// --- Get conductor path and ends from routed conductor
let PathList(List)
let ConductorPath( Elec3DNetworkPath)
let ConductorEnd1(Elec3DConductorEnd)
let ConductorEnd2(Elec3DConductorEnd)
SelectedConductor->GetPath(PathList ,ConductorEnd1,ConductorEnd2)
if ( PathList.Size() <> 1 )
{
Notify ( " conductor not routed ")
exit
}
// --- retrieve the conductor route as network path
ConductorPath = PathList->GetItem(1)
//
let deviceId(String)
let cavityId(String)
let DeviceOcc(ProductOccurrence)
let DeviceCavity(Elec3DCavity)
// -- Retrieve conductor end 1 data
deviceId="not set"
cavityId="not set"
ConductorEnd1.GetDevice(DeviceOcc,DeviceCavity)
if ( DeviceOcc <> NULL ) deviceId=DeviceOcc.Name
if ( DeviceCavity <> NULL ) cavityId=DeviceCavity.V_FunctionalName
Notify ( " From : connector ",deviceId, " ",cavityId)
// -- Retrieve conductor end 2 data
deviceId="not set"
cavityId="not set"
DeviceOcc=NULL
DeviceCavity=NULL
ConductorEnd2.GetDevice(DeviceOcc,DeviceCavity)
if ( DeviceOcc <> NULL ) deviceId=DeviceOcc.Name
if ( DeviceCavity <> NULL ) cavityId=DeviceCavity.V_FunctionalName
Notify ( " To: connector ",deviceId, " ",cavityId)
// --- compute condutor end 1 length ( = length of cavity + backshell )
let LX1(LENGTH)
ConductorEnd1.ComputeLength(LX1)
// --- compute condutor end 2 ( To ) length ( = length of cavity )
let LX2(LENGTH)
ConductorEnd2.ComputeLength(LX2)
// compute path length
let PathLength(LENGTH)
ConductorPath.ComputeLength(PathLength)
// compute route length from End1 + End2 + Path lengths
let RouteLength(LENGTH)
RouteLength=LX1+LX2+PathLength
Notify (" Path length=",PathLength," End 1 extra length=",LX1, " End 2 extra length=",LX2)
// --- compute arc and node properties in network path
Notify (" Path analysis ")
let PathElemList(List)
ConductorPath.ListNetworkPathElement(PathElemList)
let PathElem(Feature)
let PathArc(Elec3DNetworkArc)
let arc_index (Integer)
arc_index=0
for PathElem inside PathElemList
{
set PathArc = PathElem
if ( PathArc <> NULL )
{
arc_index = arc_index+1
// retrier arc separation code
Notify ( " arc ",arc_index," sep code = ",PathArc.SegregationCode )
}
}
let PathNode(Elec3DNetworkNode)
let node_index (Integer)
node_index=0
let PathDeviceNode(Elec3DDeviceNode)
let PathProxyNode(Elec3DProxyNode)
let PathJunctionNode(Elec3DJunctionNode)
let PathSpliceNode(Elec3DSpliceNode)
for PathElem inside PathElemList
{
set PathNode = PathElem
if ( PathNode <> NULL )
{
node_index = node_index+1
set PathDeviceNode = PathElem
set PathProxyNode = PathElem
set PathJunctionNode = PathElem
set PathSpliceNode = PathElem
if ( NULL <> PathDeviceNode )
{
let DeviceNodeOcc(ProductOccurrence)
let Cavity(VPMPort)
let ListElem(List)
PathDeviceNode.GetComponents(DeviceNodeOcc,Cavity,ListElem)
Notify(" node ",node_index, " : device node "," [connected to device ",DeviceNodeOcc.Name,"]")
}
if ( NULL <> PathJunctionNode ) Notify(" node ",node_index, " : junction node ")
if ( NULL <> PathProxyNode ) Notify(" node ",node_index, " : proxy node ")
if ( NULL <> PathSpliceNode ) Notify(" node ",node_index, " : splice node ")
}
}
Notify (" Computed support positions on wire ( distance from conductor end 1 ) ")
// compute support positions on path
let ListSupport(List)
let ListEntrySupportPosition(List)
let ListExitSupportPosition(List)
ConductorPath.ListSupportWithPosition(ListSupport,ListEntrySupportPosition,ListExitSupportPosition)
// compute support positions on conductor
let nb_spt(Integer)
nb_spt=ListSupport.Size()
let i_spt(Integer)
let Support(SharedSupportPartOccurrence)
let entry_pos(LENGTH)
let exit_pos(LENGTH)
i_spt=1
for i_spt while i_spt <=nb_spt
{
set Support = ListSupport->GetItem(i_spt)
set entry_pos=ListEntrySupportPosition->GetItem(i_spt) // position of support on segment network path ( entry )
set exit_pos=ListExitSupportPosition->GetItem(i_spt) // position of support on segment network path ( exit )
// add conductor end 1 extra length to compute length from conductor extremity
entry_pos=entry_pos+LX1
exit_pos=exit_pos+LX1
Notify (" support ",Support.Name, " in=",entry_pos, " out=",exit_pos )
}