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

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

Inheritance diagram for NXOpen::Positioning::Constraint:
NXOpen::NXObject NXOpen::TaggedObject NXOpen::INXObject NXOpen::Positioning::ComponentConstraint

List of all members.

Public Types

enum  Alignment { AlignmentInferAlign, AlignmentCoAlign, AlignmentContraAlign }
 Specifies alignment of directed geometries used in a constraint. More...
enum  SolverStatus {
  SolverStatusNewlyCreated, SolverStatusSuppressed, SolverStatusOutOfDate, SolverStatusOverConstrained,
  SolverStatusNotConsistentDims, SolverStatusNotConsistentOther, SolverStatusNotConsistentUnknown, SolverStatusBetweenFixed,
  SolverStatusNotSolved, SolverStatusSolved, SolverStatusCannotSolve, SolverStatusDelayed,
  SolverStatusIgnoredInArrangement, SolverStatusInternallyInconsistent, SolverStatusUnloadedGeometry, SolverStatusPendingConvertedMc
}
 Specifies the status of a constraint. More...
enum  SplineType { SplineTypeByPoles, SplineTypeByPoints, SplineTypeInvalid }
 Specifies how the spline points define the shape of the spline. More...
enum  Type {
  TypeUndefined, TypeTouch, TypeConcentric, TypeFix,
  TypeDistance, TypeParallel, TypePerpendicular, TypeCenter12,
  TypeCenter22, TypeAngle, TypeFit, TypeBond,
  TypeOrientAngle, TypeSplineData, TypeSplineLength, TypeLinearPattern,
  TypeCircularPattern, TypeLinear2dPattern, TypeRadiantPattern
}
 Specifies the type of a constraint. More...

Public Member Functions

bool Automatic ()
 Returns the flag marking the constraint as an "automatic" constraint.
NXOpen::Positioning::Constraint::Alignment ConstraintAlignment ()
 Returns the alignment behavior for the constraint.
NXOpen::Positioning::Constraint::Type ConstraintType ()
 Returns the constraint type.
NXOpen::Positioning::ConstraintReferenceCreateConstraintReference (NXOpen::NXObject *movableObject, NXOpen::NXObject *geometry, bool usesAxis, bool isIndirect)
 Adds geometry to a constraint and sets the movable object to be constrained.
NXOpen::Positioning::ConstraintReferenceCreateConstraintReference (NXOpen::NXObject *movableObject, NXOpen::NXObject *geometry, bool usesAxis, bool isIndirect, bool usePortRotate)
 Adds geometry to a constraint and sets the movable object to be constrained.
void DeleteConstraintReference (NXOpen::Positioning::ConstraintReference *constraintReference)
 Removes a Positioning::ConstraintReference from the constraint.
void EditConstraintReference (NXOpen::Positioning::ConstraintReference *constraintReference, NXOpen::NXObject *movableObject, NXOpen::NXObject *geometry, bool usesAxis, bool isIndirect, bool usePortRotate)
 Adds geometry to a constraint and sets the movable object to be constrained, replacing the properties of an existing reference of the constraint.
NXOpen::ExpressionExpression ()
 Returns the expression used for constraint.
void FlipAlignment ()
 Reverses the constraint alignment if this is possible.
void GenerateConversionReport (std::vector< NXString > &lines)
 Returns a textual conversion report this constraint from when it was converted from a Mating Constraint to an Assembly Constraint.
NXOpen::Positioning::Constraint::SolverStatus GetConstraintStatus ()
 Returns the solver status of a constraint.
NXOpen::Positioning::DisplayedConstraintGetDisplayedConstraint ()
 Gets the Positioning::DisplayedConstraint that is in the same part as that of the constraint.
std::vector
< NXOpen::Positioning::ConstraintReference * > 
GetReferences ()
 Gets all the Positioning::ConstraintReference s for the constraint.
bool Persistent ()
 Returns the persistent state of the constraint.
void ReverseDirection ()
 Reverses the constraint direction.
void SetAlignmentHint (NXOpen::Positioning::Constraint::Alignment alignment)
 Set a hint as to which alignment should be used by the solver for this constraint.
void SetAutomatic (bool isauto)
 Sets the flag marking the constraint as an "automatic" constraint.
void SetConstraintAlignment (NXOpen::Positioning::Constraint::Alignment alignment)
 Sets the alignment behavior for the constraint.
void SetConstraintType (NXOpen::Positioning::Constraint::Type constraintType)
 Sets the constraint type.
void SetExpression (const NXString &expression)
 The expression used for constraint - only for distance or angle
Created in NX4.0.0.
void SetPersistent (bool persistent)
 Sets the persistent state of the constraint.
void SetSplinePointsType (NXOpen::Positioning::Constraint::SplineType splineType)
 Sets the type of the spline.
void SetSuppressed (bool suppressed)
 Sets the suppression state for the constraint.
NXOpen::Positioning::Constraint::SplineType SplinePointsType ()
 Returns the type of the spline.
bool Suppressed ()
 Returns the suppression state for the constraint.

Detailed Description

Constraint for use in positioning objects in NX.

For constraints between components, the subclass Positioning::ComponentConstraint should be used by preference.
To create a new instance of this class, use Positioning::Positioner::CreateConstraint

Created in NX4.0.0.


Member Enumeration Documentation

Specifies alignment of directed geometries used in a constraint.

Enumerator:
AlignmentInferAlign 

Allow the solver to decide the alignment.

AlignmentCoAlign 

Directions are the same.

AlignmentContraAlign 

Directions are opposite.

Specifies the status of a constraint.

Enumerator:
SolverStatusNewlyCreated 

Not evaluated or suppressed since creation.

SolverStatusSuppressed 

Constraint is suppressed.

SolverStatusOutOfDate 

Needs evaluation.

SolverStatusOverConstrained 

Conflicts with other constraints.

SolverStatusNotConsistentDims 

Cannot solve with current dimension values.

Model fully defined

SolverStatusNotConsistentOther 

Cannot find a solution.

Model underdefined

SolverStatusNotConsistentUnknown 

Cannot find a solution.

SolverStatusBetweenFixed 

Attempt to put constraint between two fixed objects.

SolverStatusNotSolved 

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

SolverStatusSolved 

The constraint is solved and satisfied.

SolverStatusCannotSolve 

The constraint has invalid geometry and could not be passed to the solver.

SolverStatusDelayed 

The constraint is delayed and will not solve.

SolverStatusIgnoredInArrangement 

The current arrangement ignores all constraints and they will not solve.

SolverStatusInternallyInconsistent 

The constraint references invalid geometry for this constraint type.

SolverStatusUnloadedGeometry 

The constraint could not solve as some geometry is unloaded.

SolverStatusPendingConvertedMc 

The constraint has been converted from a mating condition and has not solved since conversion.

Specifies how the spline points define the shape of the spline.

Enumerator:
SplineTypeByPoles 

Spline points define control points.

SplineTypeByPoints 

Spline points define interpolation/through points.

SplineTypeInvalid 

Not a valid spline constraint.

Specifies the type of a constraint.

Enumerator:
TypeUndefined 

No type.

TypeTouch 

Two geometries touch.

TypeConcentric 

Two geometries share a center and plane.

TypeFix 

One movable object fixed.

TypeDistance 

Two geometries have a specified distance between them.

TypeParallel 

Two geometries are parallel.

TypePerpendicular 

Two geometries are perpendicular.

TypeCenter12 

One geometry is positioned mid-way between two others.

TypeCenter22 

An implicit plane between two geometries of one movable object is positioned mid-way between two others.

TypeAngle 

Two geometries have a specified angle between them.

TypeFit 

Two geometries are coincident.

TypeBond 

A number of movable objects form a rigid group.

TypeOrientAngle 

Two geometries have a specified angle between them about an axis.

TypeSplineData 

A spline and its defining points.

TypeSplineLength 

Constrains the curve length of a spline.

TypeLinearPattern 

For internal use only.

TypeCircularPattern 

For internal use only.

TypeLinear2dPattern 

For internal use only.

TypeRadiantPattern 

For internal use only.


Member Function Documentation

Returns the flag marking the constraint as an "automatic" constraint.

Automatic constraints are constraints created by the system, but are visible and editable by the user. Automatic constraints are automatically deleted when one of the referenced objects are deleted by update.
Created in NX5.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Returns the alignment behavior for the constraint.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Returns the constraint type.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Adds geometry to a constraint and sets the movable object to be constrained.

Returns:
The new Positioning::ConstraintReference
Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")
Parameters:
movableObjectObject to be positioned by constraint
geometryGeometry used to define constraint
usesAxisUse axis of geometry
isIndirectGeometry is to be used indirectly to identify geometry in another part
NXOpen::Positioning::ConstraintReference* NXOpen::Positioning::Constraint::CreateConstraintReference ( NXOpen::NXObject movableObject,
NXOpen::NXObject geometry,
bool  usesAxis,
bool  isIndirect,
bool  usePortRotate 
)

Adds geometry to a constraint and sets the movable object to be constrained.

Returns:
The new Positioning::ConstraintReference
Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")
Parameters:
movableObjectObject to be positioned by constraint
geometryGeometry used to define constraint
usesAxisUse axis of geometry
isIndirectGeometry is to be used indirectly to identify geometry in another part
usePortRotateUse rotate vector of Routing::Port .

Removes a Positioning::ConstraintReference from the constraint.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
constraintReferenceThe constraint reference to remove. A list of references can be obtained via Positioning::Constraint::GetReferences .
void NXOpen::Positioning::Constraint::EditConstraintReference ( NXOpen::Positioning::ConstraintReference constraintReference,
NXOpen::NXObject movableObject,
NXOpen::NXObject geometry,
bool  usesAxis,
bool  isIndirect,
bool  usePortRotate 
)

Adds geometry to a constraint and sets the movable object to be constrained, replacing the properties of an existing reference of the constraint.


Created in NX5.0.1.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
constraintReferenceThe Positioning::ConstraintReference whose properties are to be changed
movableObjectObject to be positioned by constraint
geometryGeometry used to define constraint
usesAxisUse axis of geometry
isIndirectGeometry is to be used indirectly to identify geometry in another part
usePortRotateUse rotate vector of Routing::Port .

Returns the expression used for constraint.

The expression will be unused unless this constraint has type distance or angle.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Reverses the constraint alignment if this is possible.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Returns a textual conversion report this constraint from when it was converted from a Mating Constraint to an Assembly Constraint.

If this isn't a converted constraint or there were no problems converting this constraint, then an empty string is returned.


Created in NX5.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
linesThe text lines of the conversion report

Returns the solver status of a constraint.

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

License requirements : assemblies ("ASSEMBLIES MODULE")

Gets the Positioning::DisplayedConstraint that is in the same part as that of the constraint.

Note that this will be NULL if the part has not been the displayed part since the constraint was created.

Returns:

Created in NX7.5.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Gets all the Positioning::ConstraintReference s for the constraint.

Returns:
ConstraintReferences used by this constraint
Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Returns the persistent state of the constraint.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Reverses the constraint direction.

This operation reverses the Positioning::ConstraintReference::Order on each Positioning::ConstraintReference . So "Inside" becomes "Outside", "Outside" becomes "Inside" and "Unknown" remains as it is.


Created in NX5.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Set a hint as to which alignment should be used by the solver for this constraint.

If the constraint does not solve using this alignment then the hint will be ignored.

The hint can only have an effect when the alignment of [version_created("4")] the constraint, as returned by Positioning::Constraint::ConstraintAlignment , is Positioning::Constraint::AlignmentInferAlign .

The hint can only have an effect when the constraint has been explicitly added to a Positioning::Network .

Passing in Positioning::Constraint::AlignmentInferAlign as the alignment argument will have no effect.

The hint is forgotten after an update.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
alignmentThe alignment hint

Sets the flag marking the constraint as an "automatic" constraint.

Automatic constraints are constraints created by the system, but are visible and editable by the user. Automatic constraints are automatically deleted when one of the referenced objects are deleted by update.
Created in NX5.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
isautoThe automatic state

Sets the alignment behavior for the constraint.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
alignmentAlignment behavior for constraint

Sets the constraint type.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
constraintTypeconstraint type

The expression used for constraint - only for distance or angle
Created in NX4.0.0.



License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
expressionName of expression used in distance or angle constraint
NOTE: The full Unicode character set is not supported for this parameter.

Sets the persistent state of the constraint.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
persistentThe persistent state

Sets the type of the spline.

Only valid if the type of the constraint is set to Positioning::Constraint::TypeSplineData .
Created in NX6.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
splineTypespline type

Sets the suppression state for the constraint.


Created in NX4.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Parameters:
suppressedThe suppression state

Returns the type of the spline.

Only valid if the type of the constraint is set to Positioning::Constraint::TypeSplineData .
Created in NX6.0.0.

License requirements : assemblies ("ASSEMBLIES MODULE")

Returns the suppression state for the constraint.


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.