LinearPathBuilder Class¶
-
class
NXOpen.Routing.
LinearPathBuilder
¶ Bases:
NXOpen.Builder
Builder for creating routing linear paths.
These paths can include constrained line segments, bend corners and elbows. This fuctionality can only be used with the Assemblies Positioning functionality. The work part must have been converted to use Assemblies Positioning using the Convert Mating Conditions tool.
To create a control point (and it’s associated segment) first create a preview control point, then define the control point using either a smart point (
Routing.LinearPathBuilder.SetControlPointDefiningPoint()
), or some other object (Routing.LinearPathBuilder.SetControlPointDefiningObject()
).To create a new instance of this class, use
NXOpen.Routing.RouteManager.CreateLinearPathBuilder()
Default values.
Property Value ElbowSnapSettings.AngleTolerance 5.0 ElbowSnapSettings.SnapToElbowAngles True LinearPathSettings.LockToSelectedObject True New in version NX5.0.0.
Properties¶
Property | Description |
---|---|
ElbowSnapSettings | Returns or sets the elbow snapping settings for determining location of control points as the user drags their mouse. |
LinearPathSettings | Returns or sets the settings that determine what constraints to apply to the new path. |
PathStockBuilder | Returns or sets the builder for assigning stock to the new path. |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
AddPreviewControlPoint | Add a new control point to the path. |
Commit | Commits any edits that have been applied to the builder. |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
GetLastControlPoint | Returns the last control point in the path. |
GetObject | Returns the object currently being edited by this builder. |
GetParentSegmentOfEccentricSegment | Parent segment @return |
RemoveLastNonPreviewControlPoint | Removes the last fully-defined control point in the path. |
SetControlPointDefiningObject | Fully defines a preview control point. |
SetControlPointDefiningPoint | Fully defines a preview control point using the given point. |
SetIsEccentricModeSelected | Set the boolean value specifies that Eccentric mode selected or not |
SetIsNewControlPointRequired | Set the boolean value specifies that new control point required or not |
SetParentSegmentOfEccentricSegment | |
SettingChanged | Notifies the builder that some routing preferences have changed, and that the builder (and it’s associated builders) must update their values to refelect those changes. |
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results. |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Property Detail¶
ElbowSnapSettings¶
-
LinearPathBuilder.
ElbowSnapSettings
¶ Returns or sets the elbow snapping settings for determining location of control points as the user drags their mouse.
Only useful in the UI.
-------------------------------------
Getter Method
Signature
ElbowSnapSettings()
Returns: Return type: NXOpen.Routing.ElbowSnapSettings
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
ElbowSnapSettings(snapSettings)
Parameters: snapSettings ( NXOpen.Routing.ElbowSnapSettings
) –New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
LinearPathSettings¶
-
LinearPathBuilder.
LinearPathSettings
¶ Returns or sets the settings that determine what constraints to apply to the new path.
-------------------------------------
Getter Method
Signature
LinearPathSettings()
Returns: Return type: NXOpen.Routing.LinearPathSettings
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
LinearPathSettings(settingsBuilder)
Parameters: settingsBuilder ( NXOpen.Routing.LinearPathSettings
) –New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
PathStockBuilder¶
-
LinearPathBuilder.
PathStockBuilder
¶ Returns or sets the builder for assigning stock to the new path.
-------------------------------------
Getter Method
Signature
PathStockBuilder()
Returns: Return type: NXOpen.Routing.PathStockBuilder
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
PathStockBuilder(stockBuilder)
Parameters: stockBuilder ( NXOpen.Routing.PathStockBuilder
) –New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
Method Detail¶
AddPreviewControlPoint¶
-
LinearPathBuilder.
AddPreviewControlPoint
¶ Add a new control point to the path.
This control point is considered to be a preview control point to show what the path will look like interactively. This control point will be deleted when the commit method is invoked unless the rcp has been fully defined.
Signature
AddPreviewControlPoint(location)
Parameters: location ( NXOpen.Point3d
) –Returns: Preview control point, will be None if there is already a control point at the given location. :rtype:
NXOpen.Routing.ControlPoint
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
GetLastControlPoint¶
-
LinearPathBuilder.
GetLastControlPoint
¶ Returns the last control point in the path.
Signature
GetLastControlPoint()
Returns: Return type: NXOpen.Routing.ControlPoint
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GetParentSegmentOfEccentricSegment¶
-
LinearPathBuilder.
GetParentSegmentOfEccentricSegment
¶ Parent segment
Signature
GetParentSegmentOfEccentricSegment()
Returns: Return type: NXOpen.Routing.ISegment
New in version NX8.0.0.
License requirements: routing_base (“Routing Basic”)
RemoveLastNonPreviewControlPoint¶
-
LinearPathBuilder.
RemoveLastNonPreviewControlPoint
¶ Removes the last fully-defined control point in the path.
Also removes any preview control points.
Signature
RemoveLastNonPreviewControlPoint()
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
SetControlPointDefiningObject¶
-
LinearPathBuilder.
SetControlPointDefiningObject
¶ Fully defines a preview control point.
The preview control point’s location is set to the given position, and the control point is constrained to the given object (depending on the linear path settings).
A control point may only be defined once.
Signature
SetControlPointDefiningObject(previewRcp, position, object)
Parameters: - previewRcp (
NXOpen.Routing.ControlPoint
) – Must be a control point created byRouting.LinearPathBuilder.AddPreviewControlPoint()
- position (
NXOpen.Point3d
) – - object (
NXOpen.NXObject
) – None allowed.
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
- previewRcp (
SetControlPointDefiningPoint¶
-
LinearPathBuilder.
SetControlPointDefiningPoint
¶ Fully defines a preview control point using the given point.
The control point is not made associative directly to the input point. The control point is made associative (depending on the linear path settings) to the objects that the input point is associative to.
A control point may only be defined once.
Signature
SetControlPointDefiningPoint(previewRcp, point)
Parameters: - previewRcp (
NXOpen.Routing.ControlPoint
) – Must be a control point created byRouting.LinearPathBuilder.AddPreviewControlPoint()
- point (
NXOpen.Point
) – None not allowed.
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
- previewRcp (
SetIsEccentricModeSelected¶
-
LinearPathBuilder.
SetIsEccentricModeSelected
¶ Set the boolean value specifies that Eccentric mode selected or not
Signature
SetIsEccentricModeSelected(isEccentricModeSelected)
Parameters: isEccentricModeSelected (bool) – New in version NX8.0.0.
License requirements: routing_base (“Routing Basic”)
SetIsNewControlPointRequired¶
-
LinearPathBuilder.
SetIsNewControlPointRequired
¶ Set the boolean value specifies that new control point required or not
Signature
SetIsNewControlPointRequired(isNewControlPointRequired)
Parameters: isNewControlPointRequired (bool) – New in version NX8.0.0.
License requirements: routing_base (“Routing Basic”)
SetParentSegmentOfEccentricSegment¶
-
LinearPathBuilder.
SetParentSegmentOfEccentricSegment
¶ Signature
SetParentSegmentOfEccentricSegment(parentSegment)
Parameters: parentSegment ( NXOpen.Routing.ISegment
) –New in version NX8.0.0.
License requirements: routing_base (“Routing Basic”)
SettingChanged¶
-
LinearPathBuilder.
SettingChanged
¶ Notifies the builder that some routing preferences have changed, and that the builder (and it’s associated builders) must update their values to refelect those changes.
Signature
SettingChanged()
New in version NX5.0.0.
License requirements: routing_base (“Routing Basic”)
Validate¶
-
LinearPathBuilder.
Validate
¶ Validate whether the inputs to the component are sufficient for commit to be called.
If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.
Signature
Validate()
Returns: Was self validation successful Return type: bool New in version NX3.0.1.
License requirements: None.