NX Open C++ Reference Guide
Public Types | Public Member Functions
NXOpen::Positioning::Network Class Reference

Network for use in positioning objects in NX. More...

Inheritance diagram for NXOpen::Positioning::Network:
NXOpen::NXObject NXOpen::TaggedObject NXOpen::INXObject NXOpen::Positioning::ComponentNetwork

List of all members.

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::ComponentDisplayComponent ()
 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.

Detailed Description

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.


Member Enumeration Documentation

Specifies the solver status of a movable object.

Enumerator:
ObjectStatusUnknown 

Not yet evaluated.

ObjectStatusFixed 

Attempt to put constraint between two fixed objects.

ObjectStatusOverDefined 

Conflicts with other constraints.

ObjectStatusNotConsistentDims 

Cannot solve with current dimension values.

Model fully defined.

ObjectStatusNotConsistentOther 

Cannot find a solution.

Model underdefined.

ObjectStatusNotConsistentUnknown 

One movable object fixed.

ObjectStatusNotChanged 

Not evaluated because other parts of the model are over defined or inconsistent.

ObjectStatusWellDefined 

The constraint is solved and satisfied.

ObjectStatusUnderDefined 

The constraint is solved and satisfied.


Member Function Documentation

Add a Constraint to the network.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
constraintThe Constraint to be added

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")

Parameters:
movableObjectAn 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")

Parameters:
pointA point on the ray
directionThe 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")

Parameters:
translationThe translation to be applied
rotationThe rotation to be applied

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")

Parameters:
translationThe 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")

Returns the solver status of a movable object.

Returns:
The solver status of the movable object
Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")
Parameters:
movableObjectAn NXObject positioned by the network

Are the necessary objects loaded so that all connected constraints can be included during a drag or solve ?

Returns:

Created in NX5.0.1.

License requirements : assemblies ("ASSEMBLIES MODULE")

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")

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")

Parameters:
constraintThe Constraint to be removed

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")

Parameters:
movableObjectAn 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")

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")

Parameters:
displayComponentThe 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")

Parameters:
moveObjectsStatemove 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")

Parameters:
movableObjectsThe NXObject s to be moved

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")

Parameters:
groundground

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")


The documentation for this class was generated from the following file:
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.