NX Open C++ Reference Guide
|
Network for use in positioning objects in NX. More...
Public Types | |
enum | ObjectStatus { ObjectStatusUnknown, ObjectStatusFixed, ObjectStatusOverDefined, ObjectStatusNotConsistentDims, ObjectStatusNotConsistentOther, ObjectStatusNotConsistentUnknown, ObjectStatusNotChanged, ObjectStatusWellDefined, ObjectStatusUnderDefined } |
Specifies the solver status of a movable object. More... | |
Public Member Functions | |
void | AddConstraint (NXOpen::Positioning::Constraint *constraint) |
Add a Constraint to the network. | |
void | AddMovableObject (NXOpen::NXObject *movableObject) |
Add a movable object to the network. | |
void | ApplyToModel () |
Applies the current network state to the model. | |
void | BeginDrag () |
Notify the network that a sequence of drag operations is about to begin. | |
NXOpen::Assemblies::Component * | DisplayComponent () |
Returns the Assemblies::Component in which the display is changed by solving the network. | |
void | DragByRay (const NXOpen::Point3d &point, const NXOpen::Vector3d &direction) |
Move objects which have been added to the network using Positioning::Network::AddMovableObject . | |
void | DragByTransform (const NXOpen::Vector3d &translation, const NXOpen::Matrix3x3 &rotation) |
Move objects which have been added to the network using Positioning::Network::AddMovableObject . | |
void | DragByTranslation (const NXOpen::Vector3d &translation) |
Move objects which have been added to the network using Positioning::Network::AddMovableObject . | |
void | EmptyMovingGroup () |
Remove all elements from the moving_group. | |
void | EndDrag () |
Notify the network that a sequence of drag operations has ended. | |
NXOpen::Positioning::Network::ObjectStatus | GetMovableObjectStatus (NXOpen::NXObject *movableObject) |
Returns the solver status of a movable object. | |
bool | IsReferencedGeometryLoaded () |
Are the necessary objects loaded so that all connected constraints can be included during a drag or solve ? | |
void | LoadReferencedGeometry () |
Load the necessary objects so that all connected constraints can be included during a drag or solve. | |
bool | MoveObjectsState () |
Returns the move objects state for the network. | |
bool | NonMovingGroupGrounded () |
Returns the grounded state of non-moving_group objects. | |
void | RemoveAllConstraints () |
Remove all Constraint s which have been explcitly added to the network. | |
void | RemoveConstraint (NXOpen::Positioning::Constraint *constraint) |
Remove a Constraint from the network. | |
void | RemoveMovableObject (NXOpen::NXObject *movableObject) |
Remove a movable object from the network. | |
void | ResetDisplay () |
Returns the display objects to their model positions. | |
void | SetDisplayComponent (NXOpen::Assemblies::Component *displayComponent) |
Sets the Assemblies::Component in which the display is changed by solving the network. | |
void | SetMoveObjectsState (bool moveObjectsState) |
Sets the move objects state for the network. | |
void | SetMovingGroup (const std::vector< NXOpen::NXObject * > &movableObjects) |
Set the elements of the moving_group. | |
void | SetNonMovingGroupGrounded (bool ground) |
Sets the grounded state of non-moving_group objects. | |
void | Solve () |
Solves the constraint network. |
Network for use in positioning objects in NX.
A network consists of explicitly added constraints and movable objects together with others implicitly added because they are connected by to those in the network.
Use Positioning::Positioner::EstablishNetwork to create an instance of this class.
Created in NX4.0.0.
Specifies the solver status of a movable object.
void NXOpen::Positioning::Network::AddConstraint | ( | NXOpen::Positioning::Constraint * | constraint | ) |
Add a Constraint to the network.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
constraint | The Constraint to be added |
void NXOpen::Positioning::Network::AddMovableObject | ( | NXOpen::NXObject * | movableObject | ) |
Add a movable object to the network.
An object explicitly added by this method will be directly moved by calls to Positioning::Network::DragByRay , Positioning::Network::DragByTransform and Positioning::Network::DragByTranslation .
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
movableObject | An NXObject to be moved |
Applies the current network state to the model.
This may change the position of movable objects and the status of constraints in the model. Does not do a solve or an update.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
Notify the network that a sequence of drag operations is about to begin.
This must be called before a series of calls to Positioning::Network::DragByRay , Positioning::Network::DragByTransform or Positioning::Network::DragByTranslation . Following a drag, and before any other changes to a network are made, Positioning::Network::EndDrag should be called.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
Returns the Assemblies::Component in which the display is changed by solving the network.
The display component can be NULL if display changes are made in the part of the network. The prototype of the display component should be the part containing the network.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
void NXOpen::Positioning::Network::DragByRay | ( | const NXOpen::Point3d & | point, |
const NXOpen::Vector3d & | direction | ||
) |
Move objects which have been added to the network using Positioning::Network::AddMovableObject .
Constraints are honored during the drag so that other objects may also move as a result of this call. On the first call to this method, a notional point is added to each of the objects to be dragged. On subsequent calls, this notional point, and hence the dragged object, is kept as close as possible to the ray determined by point and direction. If there are no constraints then the point will stay on the ray.
A series of calls to this method can be made between calls to Positioning::Network::BeginDrag and Positioning::Network::EndDrag .
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
point | A point on the ray |
direction | The direction of the ray |
void NXOpen::Positioning::Network::DragByTransform | ( | const NXOpen::Vector3d & | translation, |
const NXOpen::Matrix3x3 & | rotation | ||
) |
Move objects which have been added to the network using Positioning::Network::AddMovableObject .
Constraints are honored during the drag so that other objects may also move as a result of this call. The rotation is applied first, then the translation.
A series of calls to this method can be made between calls to Positioning::Network::BeginDrag and Positioning::Network::EndDrag .
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
translation | The translation to be applied |
rotation | The rotation to be applied |
void NXOpen::Positioning::Network::DragByTranslation | ( | const NXOpen::Vector3d & | translation | ) |
Move objects which have been added to the network using Positioning::Network::AddMovableObject .
Constraints are honored during the drag so that other objects may also move as a result of this call.
Unlike Positioning::Network::DragByTransform there is no rotational element passed in. This can improve the behavior of the constraint solver.
A series of calls to this method can be made between calls to Positioning::Network::BeginDrag and Positioning::Network::EndDrag .
Created in NX6.0.4.
License requirements : assemblies ("ASSEMBLIES MODULE")
translation | The translation to be applied |
Remove all elements from the moving_group.
See Positioning::Network::SetMovingGroup .
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
Notify the network that a sequence of drag operations has ended.
This must be called after a series of calls to Positioning::Network::DragByRay , Positioning::Network::DragByTransform or Positioning::Network::DragByTranslation .
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::Positioning::Network::ObjectStatus NXOpen::Positioning::Network::GetMovableObjectStatus | ( | NXOpen::NXObject * | movableObject | ) |
Returns the solver status of a movable object.
movableObject | An NXObject positioned by the network |
Are the necessary objects loaded so that all connected constraints can be included during a drag or solve ?
Load the necessary objects so that all connected constraints can be included during a drag or solve.
If an object is not loaded then the part containing it will be fully loaded by this call.
Created in NX5.0.1.
License requirements : assemblies ("ASSEMBLIES MODULE")
Returns the move objects state for the network.
When set the display positions of objects are immediately updated upon constraint creation or edit.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
Returns the grounded state of non-moving_group objects.
When set all objects outside the moving_group are fixed and will not move during a solve or drag.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
Remove all Constraint s which have been explcitly added to the network.
Those constraints connected to explcicitly added movable objects will still be include in a network solve.
Created in NX6.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
void NXOpen::Positioning::Network::RemoveConstraint | ( | NXOpen::Positioning::Constraint * | constraint | ) |
Remove a Constraint from the network.
A constraint explicitly removed by this method may still included in a network solve if connected to another constraint or movable object which has been explicitly added.
Created in NX6.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
constraint | The Constraint to be removed |
void NXOpen::Positioning::Network::RemoveMovableObject | ( | NXOpen::NXObject * | movableObject | ) |
Remove a movable object from the network.
An object explicitly removed by this method will not be directly moved by calls to Positioning::Network::DragByRay , Positioning::Network::DragByTransform and Positioning::Network::DragByTranslation , though it may still be moved indirectly if constrained to other movable objects.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
movableObject | An NXObject to be removed from the network |
Returns the display objects to their model positions.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
void NXOpen::Positioning::Network::SetDisplayComponent | ( | NXOpen::Assemblies::Component * | displayComponent | ) |
Sets the Assemblies::Component in which the display is changed by solving the network.
The display component can be NULL if display changes are made in the part of the network. The prototype of the display component should be the part containing the network.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
displayComponent | The component in which the constraints are displayed. Can be NULL. |
void NXOpen::Positioning::Network::SetMoveObjectsState | ( | bool | moveObjectsState | ) |
Sets the move objects state for the network.
When set the display positions of objects are immediately updated upon constraint creation or edit.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
moveObjectsState | move objects state |
void NXOpen::Positioning::Network::SetMovingGroup | ( | const std::vector< NXOpen::NXObject * > & | movableObjects | ) |
Set the elements of the moving_group.
The elements of the moving_group will move as a rigid body during a solve or drag operation. Objects outside the moving group can all be prevented from moving by setting Positioning::Network::NonMovingGroupGrounded and Positioning::Network::SetNonMovingGroupGrounded
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
movableObjects | The NXObject s to be moved |
void NXOpen::Positioning::Network::SetNonMovingGroupGrounded | ( | bool | ground | ) |
Sets the grounded state of non-moving_group objects.
When set all objects outside the moving_group are fixed and will not move during a solve or drag.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
ground | ground |
void NXOpen::Positioning::Network::Solve | ( | ) |
Solves the constraint network.
Does apply the results to the model but does not do an update.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")