SegmentManager Class

class NXOpen.Routing.SegmentManager

Bases: object

Contains the type of the routing part as well as the Collection objects for creating/iterating over routing objects.

To obtain an instance of this class, refer to NXOpen.Part

New in version NX4.0.0.

Segments”, “All Segment types collection ” “LineSegments”, “Line Segment collection ” “ArcSegments”, “Arc Segment collection ” “SplineSegments”, “Spline Segment collection “

Methods

Method Description
CreateConstrainedSegment Creates a constrained line NXOpen.Routing.ISegment object with input NXOpen.Routing.ControlPoint as ends.
CreateHealPath Creates a new empty NXOpen.Routing.HealPath object that can be used as an input to NXOpen.Routing.SegmentManager.CreateHealSpline().
CreateHealSpline Creates a spline NXOpen.Routing.ISegment object with input NXOpen.Routing.ControlPoint as ends.
CreateSegment Creates a NXOpen.Routing.ISegment object following a curve.
GetShortestPathBetweenControlPoints Returns the shortest connected segments (i.
ModelTerminals Models spline paths to to specified terminals.
ProcessBuiltInPaths Create segments of NXOpen.Routing.BuiltInPath objects present in this NXOpen.Assemblies.Component object.
SetFollowCurve Set segment follow curve.
SimplifySegments Combine segments that are collinear and whose intermediate RCPs do not branch
Subdivide Subdivide a routing path segment
UnmodelTerminals Un-model terminals and update connection list routes for specified terminal ports.

Enumerations

SegmentManagerSubdivideSpacing Enumeration Specifies spacing option for subdivide segment.

Structs

SegmentManagerSubdivideOption_Struct Struct Contains subdivide segment method information.

Segments

SegmentManager.Segments

All Segment types collection

Signature Segments

New in version NX7.5.1.

Returns:
Return type:NXOpen.Routing.ISegmentCollection

LineSegments

SegmentManager.LineSegments

Line Segment collection

Signature LineSegments

New in version NX3.0.0.

Returns:
Return type:NXOpen.Routing.LineSegmentCollection

ArcSegments

SegmentManager.ArcSegments

Arc Segment collection

Signature ArcSegments

New in version NX3.0.0.

Returns:
Return type:NXOpen.Routing.ArcSegmentCollection

SplineSegments

SegmentManager.SplineSegments

Spline Segment collection

Signature SplineSegments

New in version NX3.0.0.

Returns:
Return type:NXOpen.Routing.SplineSegmentCollection

Method Detail

CreateConstrainedSegment

SegmentManager.CreateConstrainedSegment

Creates a constrained line NXOpen.Routing.ISegment object with input NXOpen.Routing.ControlPoint as ends.

Only use this method when building segments in a part that use NXOpen.Positioning.Constraint objects to constraint components and geometry. This is a new method for creating segments in NX5 and should be used instead of NXOpen.Routing.SegmentManager.CreateSegment() for all line segments.

Signature CreateConstrainedSegment(startRcp, endRcp)

Parameters:
Returns:

Created segment

Return type:

NXOpen.Routing.ISegment

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

CreateHealPath

SegmentManager.CreateHealPath

Creates a new empty NXOpen.Routing.HealPath object that can be used as an input to NXOpen.Routing.SegmentManager.CreateHealSpline().

Signature CreateHealPath()

Returns:
Return type:NXOpen.Routing.HealPath

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

CreateHealSpline

SegmentManager.CreateHealSpline

Creates a spline NXOpen.Routing.ISegment object with input NXOpen.Routing.ControlPoint as ends.

Signature CreateHealSpline(startObject, endObject, healPath)

Parameters:
Returns:

Created segment

Return type:

NXOpen.Routing.ISegment

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

CreateSegment

SegmentManager.CreateSegment

Overloaded method CreateSegment

  • CreateSegment(followCurve, startRcp, endRcp, userDefined)
  • CreateSegment(startRcp, endRcp)

-------------------------------------

Creates a NXOpen.Routing.ISegment object following a curve.

Signature CreateSegment(followCurve, startRcp, endRcp, userDefined)

Parameters:
Returns:

Created segment

Return type:

NXOpen.Routing.ISegment

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

Creates a line NXOpen.Routing.ISegment object with input NXOpen.Routing.ControlPoint as ends.

Signature CreateSegment(startRcp, endRcp)

Parameters:
Returns:

Created segment

Return type:

NXOpen.Routing.ISegment

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

GetShortestPathBetweenControlPoints

SegmentManager.GetShortestPathBetweenControlPoints

Returns the shortest connected segments (i.

  1. the path) linking the two :py:class:`NXOpen.Routing.ControlPoint`s, if any.

Signature GetShortestPathBetweenControlPoints(controlPoint1, controlPoint2)

Parameters:
Returns:

Return type:

list of NXOpen.Routing.ISegment

New in version NX11.0.1.

License requirements: routing_base (“Routing Basic”)

ModelTerminals

SegmentManager.ModelTerminals

Models spline paths to to specified terminals.

Updates connection list to reflect changes to wire lengths of referencing connections.

Signature ModelTerminals(multiPort, cutBackLength, extensionString, overrideCharx, terminalPorts)

Parameters:
  • multiPort (NXOpen.Routing.Port) – MultiPort whose terminals are modeled
  • cutBackLength (float) – Length of cut back path connected to multiport.
  • extensionString (str) – Length of terminal segments which extends parallel to terminal ports
  • overrideCharx (bool) – if TRUE: extension_string determines all terminal extensions
  • terminalPorts (list of NXOpen.Routing.Port) – Terminal ports from which terminals are modeled

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

ProcessBuiltInPaths

SegmentManager.ProcessBuiltInPaths

Create segments of NXOpen.Routing.BuiltInPath objects present in this NXOpen.Assemblies.Component object.

Signature ProcessBuiltInPaths(partOcc)

Parameters:partOcc (NXOpen.Assemblies.Component) –

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

SetFollowCurve

SegmentManager.SetFollowCurve

Set segment follow curve.

Segment can change type to mirror the type of the follow curve being set.

Signature SetFollowCurve(segment, followCurve)

Parameters:
Returns:

Segment can possibly change types.

Use the returned segment object pointer instead of any older pointers after calling this function. For example: A LineSegment can become a SplineSegment after calling this function if new follow curve is a spline. :rtype: NXOpen.Routing.ISegment

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)

SimplifySegments

SegmentManager.SimplifySegments

Combine segments that are collinear and whose intermediate RCPs do not branch

Signature SimplifySegments(segments, doUpdate)

Parameters:
Returns:

resulting segments

Return type:

list of NXOpen.Routing.ISegment

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

Subdivide

SegmentManager.Subdivide

Subdivide a routing path segment

Signature Subdivide(segment, subdivideOption)

Parameters:
Returns:

resulting segments

Return type:

list of NXOpen.Routing.ISegment

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

UnmodelTerminals

SegmentManager.UnmodelTerminals

Un-model terminals and update connection list routes for specified terminal ports.

Signature UnmodelTerminals(multiPort, terminalPorts)

Parameters:

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)