SegmentManager Class¶
-
class
NXOpen.Routing.SegmentManager¶ Bases:
objectContains 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.PartNew 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
SegmentsNew in version NX7.5.1.
Returns: Return type: NXOpen.Routing.ISegmentCollection
LineSegments¶
-
SegmentManager.LineSegments¶ Line Segment collection
Signature
LineSegmentsNew in version NX3.0.0.
Returns: Return type: NXOpen.Routing.LineSegmentCollection
ArcSegments¶
-
SegmentManager.ArcSegments¶ Arc Segment collection
Signature
ArcSegmentsNew in version NX3.0.0.
Returns: Return type: NXOpen.Routing.ArcSegmentCollection
SplineSegments¶
-
SegmentManager.SplineSegments¶ Spline Segment collection
Signature
SplineSegmentsNew in version NX3.0.0.
Returns: Return type: NXOpen.Routing.SplineSegmentCollection
Method Detail¶
CreateConstrainedSegment¶
-
SegmentManager.CreateConstrainedSegment¶ Creates a constrained line
NXOpen.Routing.ISegmentobject with inputNXOpen.Routing.ControlPointas ends.Only use this method when building segments in a part that use
NXOpen.Positioning.Constraintobjects to constraint components and geometry. This is a new method for creating segments in NX5 and should be used instead ofNXOpen.Routing.SegmentManager.CreateSegment()for all line segments.Signature
CreateConstrainedSegment(startRcp, endRcp)Parameters: - startRcp (
NXOpen.Routing.ControlPoint) – StartNXOpen.Routing.ControlPointof the segment - endRcp (
NXOpen.Routing.ControlPoint) – EndNXOpen.Routing.ControlPointof the segment
Returns: Created segment
Return type: New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
- startRcp (
CreateHealPath¶
-
SegmentManager.CreateHealPath¶ Creates a new empty
NXOpen.Routing.HealPathobject that can be used as an input toNXOpen.Routing.SegmentManager.CreateHealSpline().Signature
CreateHealPath()Returns: Return type: NXOpen.Routing.HealPathNew in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
CreateHealSpline¶
-
SegmentManager.CreateHealSpline¶ Creates a spline
NXOpen.Routing.ISegmentobject with inputNXOpen.Routing.ControlPointas ends.Signature
CreateHealSpline(startObject, endObject, healPath)Parameters: - startObject (
NXOpen.DisplayableObject) – StartNXOpen.DisplayableObjectof the segment, ideally it should beNXOpen.Routing.Port - endObject (
NXOpen.DisplayableObject) – EndNXOpen.DisplayableObjectof the segment, ideally it should beNXOpen.Routing.Port - healPath (
NXOpen.Routing.HealPath) –
Returns: Created segment
Return type: New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
- startObject (
CreateSegment¶
-
SegmentManager.CreateSegment¶ Overloaded method CreateSegment
CreateSegment(followCurve, startRcp, endRcp, userDefined)CreateSegment(startRcp, endRcp)
-------------------------------------Creates a
NXOpen.Routing.ISegmentobject following a curve.Signature
CreateSegment(followCurve, startRcp, endRcp, userDefined)Parameters: - followCurve (
NXOpen.Curve) – Curve to follow - startRcp (
NXOpen.Routing.ControlPoint) – StartNXOpen.Routing.ControlPointof the segment - endRcp (
NXOpen.Routing.ControlPoint) – EndNXOpen.Routing.ControlPointof the segment - userDefined (
NXOpen.Routing.UserDefined) – Is segment user defined?
Returns: Created segment
Return type: New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Creates a line
NXOpen.Routing.ISegmentobject with inputNXOpen.Routing.ControlPointas ends.Signature
CreateSegment(startRcp, endRcp)Parameters: - startRcp (
NXOpen.Routing.ControlPoint) – StartNXOpen.Routing.ControlPointof the segment - endRcp (
NXOpen.Routing.ControlPoint) – EndNXOpen.Routing.ControlPointof the segment
Returns: Created segment
Return type: New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
GetShortestPathBetweenControlPoints¶
-
SegmentManager.GetShortestPathBetweenControlPoints¶ Returns the shortest connected segments (i.
- the path) linking the two :py:class:`NXOpen.Routing.ControlPoint`s, if any.
Signature
GetShortestPathBetweenControlPoints(controlPoint1, controlPoint2)Parameters: - controlPoint1 (
NXOpen.Routing.ControlPoint) – - controlPoint2 (
NXOpen.Routing.ControlPoint) –
Returns: Return type: list of
NXOpen.Routing.ISegmentNew 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”)
- multiPort (
ProcessBuiltInPaths¶
-
SegmentManager.ProcessBuiltInPaths¶ Create segments of
NXOpen.Routing.BuiltInPathobjects present in thisNXOpen.Assemblies.Componentobject.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: - segment (
NXOpen.Routing.ISegment) – Segment to set follow curve on - followCurve (
NXOpen.Curve) – Follow curve of segment
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.ISegmentNew in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
- segment (
SimplifySegments¶
-
SegmentManager.SimplifySegments¶ Combine segments that are collinear and whose intermediate RCPs do not branch
Signature
SimplifySegments(segments, doUpdate)Parameters: - segments (list of
NXOpen.Routing.ISegment) – segments to combine - doUpdate (bool) – Fires update if True
Returns: resulting segments
Return type: list of
NXOpen.Routing.ISegmentNew in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
- segments (list of
Subdivide¶
-
SegmentManager.Subdivide¶ Subdivide a routing path segment
Signature
Subdivide(segment, subdivideOption)Parameters: - segment (
NXOpen.Routing.ISegment) – Segment to subdivide - subdivideOption (
NXOpen.Routing.SegmentManagerSubdivideOption_Struct) –
Returns: resulting segments
Return type: list of
NXOpen.Routing.ISegmentNew in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
- segment (
UnmodelTerminals¶
-
SegmentManager.UnmodelTerminals¶ Un-model terminals and update connection list routes for specified terminal ports.
Signature
UnmodelTerminals(multiPort, terminalPorts)Parameters: - multiPort (
NXOpen.Routing.Port) – MultiPort whose terminals being un-modeled - terminalPorts (list of
NXOpen.Routing.Port) – Terminal ports being modeled
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
- multiPort (