SplinePathBuilder Class¶
-
class
NXOpen.Routing.
SplinePathBuilder
¶ Bases:
NXOpen.Builder
Builder for creating a D-Cubed constrained spline.
The builder allows for the creation of splines, editing of splines, adding extensions, adding stock offset points, adding stock, locking length, adding slack, and locking to objects.
To create a new instance of this class, use
NXOpen.Routing.RouteManager.CreateSplinePathBuilder()
New in version NX6.0.0.
Properties¶
Property | Description |
---|---|
MinimumCheckingAllowableRatio | Returns the minimum ratio allowed for this spline |
MinimumCheckingAllowableValue | Returns the minimum radius allowed for this spline. |
MinimumCheckingMethod | Returns or sets the minimum checking method for this spline. |
ShowSplineMinimumRadius | Returns or sets whether the spline minimum radius value should be displayed or not. |
Tag | Returns the Tag for this object. |
UseMinimumCheckingValue | Returns or sets whether the spline minimum radius value should be checked or not on this spline. |
Methods¶
Method | Description |
---|---|
AddDefiningPointAtAbsoluteCoords | Adds a defining point to the spline. |
AddDefiningPointToSpline | Adds a defining point to the current spline or creates the first point of the new spline. |
AddSlackToSpline | |
AskDefiningData | When a spline is selected for editing, the builder will anaylyze the spline and gather all of the defining data. |
AssignExtension | Assigns an extension to the point at pointIndex. |
AssignHealPathExtension | Assigns an extension to the point at pointIndex for Heal Path. |
BlankStockAndGetLargestDia | Blanks all the stocks on the current segment and returns the stock with the largest diameter @return The stock with the largest diameter |
Commit | Commits any edits that have been applied to the builder. |
CommitDrag | Clears the current drag network |
DeleteDefiningPointAtIndex | Deletes a defining point from the spline. |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
DetachPoint | Detaches the point at the selected index from all objects its attached to using a Touch constraint. |
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
GetDefiningPointPositions | Gets the positions of the defining points. |
GetExtensionDataForPointAtIndex | Get the extension expressions at the given index. |
GetLockedSplineMinimumLength | Returns the minimum length of the spline. |
GetObject | Returns the object currently being edited by this builder. |
GetOffsetData | Returns the Stock Offset data associated with a given point. |
GetRouteSegment | Gets the routing segment managed by the builder, if it exists. |
GetSplineLength | Gets the current length of the spline. |
GetSplineLengthNoShaping | Gets the current length of the spline without shaping applied. |
GetStartAndEndRcp | Gets the RCPs managed by the builder, if they exist. |
InitializeDrag | Initialize the D-Cubed dragging functionality for the point at index. |
IsLengthLocked | |
IsSplineSlacked | |
LockSplineLengthNoShaping | Locks the length of the current spline. |
LockSplineLengthWithShaping | Locks the length of the current spline. |
RemoveAllShaping | Removes all shaping applied to the spline (Lock length, slacking). |
SetAddPointsOnSubdivideFlag | Sets whether or not additional points will be added to a spline which is created as the result of a subdivide. |
SetCreateTangencyFlag | Sets whether or not additional the newly created spline will be made tangent to connecting splines. |
SetLockToSelectedFlag | Sets whether the spline will attempt to lock points to selected object. |
SetSplineMethod | Sets the splines method to points or poles. |
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results. |
UnblankStocks | Unblanks stocks which were blanked by calling BlankStockAndGetLargestDia |
UpdateDefiningPointPositionAtIndex | Updates the position of a point on the spline. |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Enumerations¶
SplinePathBuilderSplinePathAttributeOptions Enumeration | Describes user attribute methods options These value are used to set minimum checking method. |
SplinePathBuilderSplinePathSlackType Enumeration | Describes the method the spline is defined as. |
Property Detail¶
MinimumCheckingAllowableRatio¶
-
SplinePathBuilder.
MinimumCheckingAllowableRatio
¶ Returns the minimum ratio allowed for this spline
-------------------------------------
Getter Method
Signature
MinimumCheckingAllowableRatio()
Returns: Return type: NXOpen.Expression
New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
MinimumCheckingAllowableValue¶
-
SplinePathBuilder.
MinimumCheckingAllowableValue
¶ Returns the minimum radius allowed for this spline.
-------------------------------------
Getter Method
Signature
MinimumCheckingAllowableValue()
Returns: Return type: NXOpen.Expression
New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
MinimumCheckingMethod¶
-
SplinePathBuilder.
MinimumCheckingMethod
¶ Returns or sets the minimum checking method for this spline.
See
NXOpen.Routing.SplinePathBuilderSplinePathAttributeOptions
for valid options-------------------------------------
Getter Method
Signature
MinimumCheckingMethod()
Returns: Return type: NXOpen.Routing.SplinePathBuilderSplinePathAttributeOptions
New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
MinimumCheckingMethod(routeCheckingMethod)
Parameters: routeCheckingMethod ( NXOpen.Routing.SplinePathBuilderSplinePathAttributeOptions
) –New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
ShowSplineMinimumRadius¶
-
SplinePathBuilder.
ShowSplineMinimumRadius
¶ Returns or sets whether the spline minimum radius value should be displayed or not.
-------------------------------------
Getter Method
Signature
ShowSplineMinimumRadius()
Returns: Return type: bool New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
ShowSplineMinimumRadius(allowDisplay)
Parameters: allowDisplay (bool) – New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
UseMinimumCheckingValue¶
-
SplinePathBuilder.
UseMinimumCheckingValue
¶ Returns or sets whether the spline minimum radius value should be checked or not on this spline.
-------------------------------------
Getter Method
Signature
UseMinimumCheckingValue()
Returns: Return type: bool New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
UseMinimumCheckingValue(useMinRadius)
Parameters: useMinRadius (bool) – New in version NX9.1.0.
License requirements: routing_base (“Routing Basic”)
Method Detail¶
AddDefiningPointAtAbsoluteCoords¶
-
SplinePathBuilder.
AddDefiningPointAtAbsoluteCoords
¶ Adds a defining point to the spline.
The new point will be the new endpoint of the spline.
Signature
AddDefiningPointAtAbsoluteCoords(point)
Parameters: point ( NXOpen.Point3d
) – Point to add.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
AddDefiningPointToSpline¶
-
SplinePathBuilder.
AddDefiningPointToSpline
¶ Adds a defining point to the current spline or creates the first point of the new spline.
Signature
AddDefiningPointToSpline(point, createNewPoint)
Parameters: - point (
NXOpen.Point
) – Point to add. - createNewPoint (bool) – Should the builder create a new point based on the one provided.
Returns: Returns the index the point was added along the spline.
For example, if 3 points exist on the spline and the new point was added between points 0 and 1 this variable would be set to 1. :rtype: int
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
- point (
AddSlackToSpline¶
-
SplinePathBuilder.
AddSlackToSpline
¶ Signature
AddSlackToSpline(slackType, slackValue, downDir)
Parameters: - slackType (
NXOpen.Routing.SplinePathBuilderSplinePathSlackType
) – - slackValue (
NXOpen.Expression
) – - downDir (
NXOpen.Direction
) –
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
- slackType (
AskDefiningData¶
-
SplinePathBuilder.
AskDefiningData
¶ When a spline is selected for editing, the builder will anaylyze the spline and gather all of the defining data.
The dialog will use this function to retrieve the defining data from the builder to populate its fields.
Signature
AskDefiningData()
Returns: Defining points of the spline. Return type: list of NXOpen.Point
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
AssignExtension¶
-
SplinePathBuilder.
AssignExtension
¶ Assigns an extension to the point at pointIndex.
Signature
AssignExtension(pointIndex, direction, forwardExtVal, backExtVal)
Parameters: - pointIndex (int) – Index of the point to assing extensions to.
- direction (
NXOpen.Direction
) – Direction of the extension. - forwardExtVal (
NXOpen.Expression
) – Length of the forward extension. - backExtVal (
NXOpen.Expression
) – Length of the backward extension.
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
AssignHealPathExtension¶
-
SplinePathBuilder.
AssignHealPathExtension
¶ Assigns an extension to the point at pointIndex for Heal Path.
Signature
AssignHealPathExtension(pointIndex, direction, forwardExtVal, backExtVal)
Parameters: - pointIndex (int) – Index of the point to assing extensions to.
- direction (
NXOpen.Direction
) – Direction of the extension. - forwardExtVal (
NXOpen.Expression
) – Length of the forward extension. - backExtVal (
NXOpen.Expression
) – Length of the backward extension.
New in version NX6.0.1.
License requirements: routing_base (“Routing Basic”)
BlankStockAndGetLargestDia¶
-
SplinePathBuilder.
BlankStockAndGetLargestDia
¶ Blanks all the stocks on the current segment and returns the stock with the largest diameter
Signature
BlankStockAndGetLargestDia()
Returns: The stock with the largest diameter Return type: NXOpen.Routing.Stock
New in version NX7.5.1.
License requirements: routing_base (“Routing Basic”)
CommitDrag¶
-
SplinePathBuilder.
CommitDrag
¶ Clears the current drag network
Signature
CommitDrag(definingPoint)
Parameters: definingPoint ( NXOpen.Point
) – Optional of UI point defining the position of the spline point.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
DeleteDefiningPointAtIndex¶
-
SplinePathBuilder.
DeleteDefiningPointAtIndex
¶ Deletes a defining point from the spline.
Signature
DeleteDefiningPointAtIndex(index)
Parameters: index (int) – Index of the point to delete. New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
DetachPoint¶
-
SplinePathBuilder.
DetachPoint
¶ Detaches the point at the selected index from all objects its attached to using a Touch constraint.
Signature
DetachPoint(index)
Parameters: index (int) – Index of point to detach. New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GetDefiningPointPositions¶
-
SplinePathBuilder.
GetDefiningPointPositions
¶ Gets the positions of the defining points.
Signature
GetDefiningPointPositions()
Returns: array of doubles representing the defining points. Return type: list of float New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GetExtensionDataForPointAtIndex¶
-
SplinePathBuilder.
GetExtensionDataForPointAtIndex
¶ Get the extension expressions at the given index.
Signature
GetExtensionDataForPointAtIndex(index)
Parameters: index (int) – Index of hte point to anaylze Returns: a tuple Return type: A tuple consisting of (forwardVal, backwardVal, extDir). forwardVal is a NXOpen.Expression
. Forward Extension Length. backwardVal is aNXOpen.Expression
. Backward Extension Length. extDir is aNXOpen.Vector3d
. Extension direction.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GetLockedSplineMinimumLength¶
-
SplinePathBuilder.
GetLockedSplineMinimumLength
¶ Returns the minimum length of the spline.
The minimum length is the straight line distance between all defining points, including extensions.
Signature
GetLockedSplineMinimumLength()
Returns: The minimum length of the spline Return type: float New in version NX7.5.4.
License requirements: routing_base (“Routing Basic”)
GetOffsetData¶
-
SplinePathBuilder.
GetOffsetData
¶ Returns the Stock Offset data associated with a given point.
Output can be NULL if the associated point is not a stock offset point.
Signature
GetOffsetData(index)
Parameters: index (int) – Index of point to detach. Returns: a tuple Return type: A tuple consisting of (method, basePoint, offDir, exp). method is a int. The type of offset object. 0 = Not Offset, 1 = Stock Offset Point, 2 = Stock Offset Surface basePoint is a NXOpen.Point
. The base point frim the offset object. offDir is aNXOpen.Direction
. The offset direction exp is a str. The expression defining the offset distance.New in version NX6.0.1.
License requirements: routing_base (“Routing Basic”)
GetRouteSegment¶
-
SplinePathBuilder.
GetRouteSegment
¶ Gets the routing segment managed by the builder, if it exists.
Signature
GetRouteSegment()
Returns: Visible Routing BCurve Segment Return type: NXOpen.Curve
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GetSplineLength¶
-
SplinePathBuilder.
GetSplineLength
¶ Gets the current length of the spline.
Signature
GetSplineLength()
Returns: The length of the current spline. Return type: float New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GetSplineLengthNoShaping¶
-
SplinePathBuilder.
GetSplineLengthNoShaping
¶ Gets the current length of the spline without shaping applied.
Signature
GetSplineLengthNoShaping()
Returns: The length of the current spline without shaping. Return type: float New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GetStartAndEndRcp¶
-
SplinePathBuilder.
GetStartAndEndRcp
¶ Gets the RCPs managed by the builder, if they exist.
Signature
GetStartAndEndRcp()
Returns: a tuple Return type: A tuple consisting of (endRcp, startRcp). endRcp is a NXOpen.Routing.ControlPoint
. startRcp is aNXOpen.Routing.ControlPoint
. Segment Start Rcp.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
InitializeDrag¶
-
SplinePathBuilder.
InitializeDrag
¶ Initialize the D-Cubed dragging functionality for the point at index.
Signature
InitializeDrag(index)
Parameters: index (int) – Index of the point to drag New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
IsLengthLocked¶
-
SplinePathBuilder.
IsLengthLocked
¶ Signature
IsLengthLocked()
Returns: a tuple Return type: A tuple consisting of (lockedLengthVal, isLocked, downDir). lockedLengthVal is a NXOpen.Expression
. isLocked is a bool. downDir is aNXOpen.Direction
.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
IsSplineSlacked¶
-
SplinePathBuilder.
IsSplineSlacked
¶ Signature
IsSplineSlacked()
Returns: a tuple Return type: A tuple consisting of (slacked, slackType, slackValue, downDir). slacked is a bool. slackType is a NXOpen.Routing.SplinePathBuilderSplinePathSlackType
. slackValue is aNXOpen.Expression
. downDir is aNXOpen.Direction
.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
LockSplineLengthNoShaping¶
-
SplinePathBuilder.
LockSplineLengthNoShaping
¶ Locks the length of the current spline.
Signature
LockSplineLengthNoShaping(length)
Parameters: length ( NXOpen.Expression
) – Expression containing the desired length.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
LockSplineLengthWithShaping¶
-
SplinePathBuilder.
LockSplineLengthWithShaping
¶ Locks the length of the current spline.
Signature
LockSplineLengthWithShaping(length, downDirection)
Parameters: - length (
NXOpen.Expression
) – The length to lock the spline to. - downDirection (
NXOpen.Direction
) –
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
- length (
RemoveAllShaping¶
-
SplinePathBuilder.
RemoveAllShaping
¶ Removes all shaping applied to the spline (Lock length, slacking).
Signature
RemoveAllShaping()
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
SetAddPointsOnSubdivideFlag¶
-
SplinePathBuilder.
SetAddPointsOnSubdivideFlag
¶ Sets whether or not additional points will be added to a spline which is created as the result of a subdivide.
If true, new points will be added to maintain a shape similar to the original curve.
Signature
SetAddPointsOnSubdivideFlag(addPoints)
Parameters: addPoints (bool) – True to add points to subdivided splines. New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
SetCreateTangencyFlag¶
-
SplinePathBuilder.
SetCreateTangencyFlag
¶ Sets whether or not additional the newly created spline will be made tangent to connecting splines.
Signature
SetCreateTangencyFlag(createTangency)
Parameters: createTangency (bool) – True to add tangency. New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
SetLockToSelectedFlag¶
-
SplinePathBuilder.
SetLockToSelectedFlag
¶ Sets whether the spline will attempt to lock points to selected object.
This flag is only checked when adding a point to a spline by passing in a smart point to derive a new dumb spline point from. If the smart point is derived from a port, rcp, or other routing object the new spline defining point will lock to that object. This flag is also checked during commit, where endpoint associativity is applied.
Signature
SetLockToSelectedFlag(lockSelected)
Parameters: lockSelected (bool) – True to lock to selected objects. New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
SetSplineMethod¶
-
SplinePathBuilder.
SetSplineMethod
¶ Sets the splines method to points or poles.
Signature
SetSplineMethod(sMethod)
Parameters: sMethod ( NXOpen.Positioning.ConstraintSplineType
) – Set the defining method of the spline.New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
UnblankStocks¶
-
SplinePathBuilder.
UnblankStocks
¶ Unblanks stocks which were blanked by calling BlankStockAndGetLargestDia
Signature
UnblankStocks()
New in version NX7.5.1.
License requirements: routing_base (“Routing Basic”)
UpdateDefiningPointPositionAtIndex¶
-
SplinePathBuilder.
UpdateDefiningPointPositionAtIndex
¶ Updates the position of a point on the spline.
Signature
UpdateDefiningPointPositionAtIndex(index, point, inDrag)
Parameters: - index (int) – The index in the list of defining spline points to move.
- point (
NXOpen.Point
) – Point representing the new position. - inDrag (bool) – True if the point is currently being dragged.
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
Validate¶
-
SplinePathBuilder.
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.