QuickPathBuilder Class

class NXOpen.Routing.QuickPathBuilder

Bases: NXOpen.Builder

Builder for creating a collision free path between points.

This builder takes a list of points and a stock and builds a collision-free path through those points. The built path is created as linear segments with bend corners (or elbows) depending on the settings chosen by the user (NXOpen.Routing.LinearPathSettings)).

After invoking the commit method, invoke the NXOpen.Routing.QuickPathBuilder.PathErrors method to find out which sections between points contained errors.

To create a new instance of this class, use NXOpen.Routing.RouteManager.CreateQuickPathBuilder

Default values.

Property Value
Clearance.Value 0.0 (millimeters part), 0.0 (inches part)
MaximumNumberOfBends 10
MinimumStraightLength.Value 0.0 (millimeters part), 0.0 (inches part)
PathSettings.LockToSelectedObject True

New in version NX6.0.0.

Properties

Property Description
Clearance Returns the obstacle clearance value.
MaximumNumberOfBends Returns or sets the maximum number of bends in a path.
MinimumStraightLength Returns the minimum straight length value.
PathErrors Returns the errors associated with this path.
PathSettings Returns or sets the linear path settings for this path.
PointList Returns the list of goal path points.
Seed Returns or sets the seed number to use for the random number generator.
StockSettings Returns or sets the stock settings for this path.
Tag Returns the Tag for this object.

Methods

Method Description
AssignExtension Assigns a direction as well as a forward and backward distance to the given point.
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.
GetObject Returns the object currently being edited by this builder.
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

Clearance

QuickPathBuilder.Clearance

Returns the obstacle clearance value.

This value specifies the desired minimum distance between the path and obstacles in the assembly. This is a soft constraint so it is possible that the returned path will have sections that violate the clearance value.

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

Getter Method

Signature Clearance()

Returns:
Return type:NXOpen.Expression

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

MaximumNumberOfBends

QuickPathBuilder.MaximumNumberOfBends

Returns or sets the maximum number of bends in a path.

This value specifies the desired maximum number of bends. This is a soft constraint so it is possible that the returned path may have more than this number of bends. The number must be <ja_gt>= 0.

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

Getter Method

Signature MaximumNumberOfBends()

Returns:
Return type:int

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

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

Setter Method

Signature MaximumNumberOfBends(maximumNumberOfBends)

Parameters:maximumNumberOfBends (int) –

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

MinimumStraightLength

QuickPathBuilder.MinimumStraightLength

Returns the minimum straight length value.

This value specifies the desired minimum value between bend corner points. This is a soft constraint so it is possible that the returned path will have sections that violate the minimum straight length.

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

Getter Method

Signature MinimumStraightLength()

Returns:
Return type:NXOpen.Expression

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

PathErrors

QuickPathBuilder.PathErrors

Returns the errors associated with this path.

The list will be None if the commit method has not been invoked yet.

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

Getter Method

Signature PathErrors()

Returns:The list of errors.
Return type:NXOpen.ErrorList

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

PathSettings

QuickPathBuilder.PathSettings

Returns or sets the linear path settings for this path.

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

Getter Method

Signature PathSettings()

Returns:
Return type:NXOpen.Routing.LinearPathSettings

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

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

Setter Method

Signature PathSettings(pathSettings)

Parameters:pathSettings (NXOpen.Routing.LinearPathSettings) –

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

PointList

QuickPathBuilder.PointList

Returns the list of goal path points.

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

Getter Method

Signature PointList()

Returns:
Return type:NXOpen.PointList

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

Seed

QuickPathBuilder.Seed

Returns or sets the seed number to use for the random number generator.

Quick Path uses the random number generator for finding random sample points in space.

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

Getter Method

Signature Seed()

Returns:
Return type:int

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

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

Setter Method

Signature Seed(seed)

Parameters:seed (int) –

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

StockSettings

QuickPathBuilder.StockSettings

Returns or sets the stock settings for this path.

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

Getter Method

Signature StockSettings()

Returns:
Return type:NXOpen.Routing.PathStockBuilder

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

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

Setter Method

Signature StockSettings(stockBuilder)

Parameters:stockBuilder (NXOpen.Routing.PathStockBuilder) –

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

Method Detail

AssignExtension

QuickPathBuilder.AssignExtension

Assigns a direction as well as a forward and backward distance to the given point.

Quick Path will treat this as a collision-free reserved space and will ensure there is a segment going through the point along the given direction. The forward and backward values define the minimimum starting and ending locations, the path will include those locations but may extend past those locations.

Signature AssignExtension(point, direction, backValue, fwdValue)

Parameters:

New in version NX6.0.0.

License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

Validate

QuickPathBuilder.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.