NX Open C++ Reference Guide
|
ConstraintReference for use in positioning objects in NX. More...
Public Member Functions | |
NXOpen::Positioning::ConstraintReference::HalfSpace | ConstraintReferenceHalfSpace () |
返回约束引用的半空间值. | |
NXOpen::NXObject * | GetGeometry () |
返回约束引用的几何图形. | |
bool | GetHasPerpendicularVector () |
获取指示约束引用是否保持与主几何垂直的方向的标志. | |
NXOpen::NXObject * | GetMovableObject () |
返回约束引用的可移动对象. | |
NXOpen::NXObject * | GetPrototypeGeometry () |
返回约束引用的原型几何体. | |
NXOpen::Vector3d | GetPrototypePerpendicularVector () |
得到垂直向量的值,对于大多数的约束它将是(0,0,0)Positioning::Constraint::TypeAlignLock . | |
bool | GetUsePortRotate () |
在求解约束系统时,获取被引用路由的旋转向量的使用Routing::Port 端口对象而不是对齐向量。 . | |
bool | GetUsesGeometryAxis () |
如果约束引用应该使用几何轴(例如一个圆筒形的面)而不是表面,则返回. | |
NXOpen::Point3d | HelpPoint () |
返回约束引用的帮助点. | |
NXOpen::Positioning::ConstraintReference::ConstraintOrder | Order () |
在约束中返回约束引用的顺序. | |
void | SetConstraintReferenceHalfSpace (NXOpen::Positioning::ConstraintReference::HalfSpace halfSpace) |
设置约束引用的半空间值. | |
void | SetFixHint (bool set) |
向求解器设置一个提示,以修复与此约束引用相关联的移动对象. | |
void | SetFixHintForUpdate (bool set) |
向求解器设置一个提示,以修复与此约束引用相关联的移动对象. | |
void | SetHelpPoint (const NXOpen::Point3d &helpPoint) |
设置约束引用的帮助点. | |
void | SetPrototypePerpendicularVector (const NXOpen::Vector3d &perpendicularVector) |
设置垂直向量的值. | |
void | SetUsePortRotateFlag (bool useRotate) |
设置标记,强制使用被引用路由的旋转向量Routing::Port 在求解约束系统时,而不是对齐向量. | |
NXOpen::Positioning::ConstraintReference::GeometryType | SolverGeometryType () |
返回在解决过程中使用的约束引用的几何类型. | |
bool | UsePortRotateFlag () |
返回强制使用引用的旋转向量的标志Routing::Port 约束系统求解时的对象代替对齐向量. | |
![]() | |
void | DeleteAllAttributesByType (NXOpen::NXObject::AttributeType type) |
Deletes all attributes of a specific type. | |
void | DeleteAllAttributesByType (NXOpen::NXObject::AttributeType type, NXOpen::Update::Option option) |
Deletes all attributes of a specific type with the option to update or not. | |
void | DeleteAttributeByTypeAndTitle (NXOpen::NXObject::AttributeType type, const NXString &title) |
Deletes an attribute by type and title. | |
void | DeleteAttributeByTypeAndTitle (NXOpen::NXObject::AttributeType type, const char *title) |
Deletes an attribute by type and title. | |
void | DeleteAttributeByTypeAndTitle (NXOpen::NXObject::AttributeType type, const NXString &title, NXOpen::Update::Option option) |
Deletes an attribute by type and title with the option to update or not. | |
void | DeleteAttributeByTypeAndTitle (NXOpen::NXObject::AttributeType type, const char *title, NXOpen::Update::Option option) |
Deletes an attribute by type and title with the option to update or not. | |
void | DeleteUserAttribute (NXOpen::NXObject::AttributeType type, const NXString &title, bool deleteEntireArray, NXOpen::Update::Option option) |
Deletes the first attribute encountered with the given Type, Title and Index. | |
void | DeleteUserAttribute (NXOpen::NXObject::AttributeType type, const char *title, bool deleteEntireArray, NXOpen::Update::Option option) |
Deletes the first attribute encountered with the given Type, Title and Index. | |
void | DeleteUserAttributes (NXOpen::NXObject::AttributeType type, NXOpen::Update::Option option) |
Deletes the attributes encountered with the given Type with option to update or not. | |
virtual NXOpen::INXObject * | FindObject (const NXString &journalIdentifier) |
Finds the NXObject with the given identifier as recorded in a journal. | |
NXOpen::INXObject * | FindObject (const char *journalIdentifier) |
Finds the NXObject with the given identifier as recorded in a journal. | |
std::vector < NXOpen::NXObject::AttributeInformation > | GetAttributeTitlesByType (NXOpen::NXObject::AttributeType type) |
Gets all the attribute titles of a specific type. | |
bool | GetBooleanUserAttribute (const NXString &title, int index) |
Gets a boolean attribute by Title and array Index. | |
bool | GetBooleanUserAttribute (const char *title, int index) |
Gets a boolean attribute by Title and array Index. | |
NXOpen::NXObject::ComputationalTime | GetComputationalTimeUserAttribute (const NXString &title, int index) |
Gets a time attribute by Title and array Index. | |
NXOpen::NXObject::ComputationalTime | GetComputationalTimeUserAttribute (const char *title, int index) |
Gets a time attribute by Title and array Index. | |
int | GetIntegerAttribute (const NXString &title) |
Gets an integer attribute by title. | |
int | GetIntegerAttribute (const char *title) |
Gets an integer attribute by title. | |
int | GetIntegerUserAttribute (const NXString &title, int index) |
Gets an integer attribute by Title and array Index. | |
int | GetIntegerUserAttribute (const char *title, int index) |
Gets an integer attribute by Title and array Index. | |
double | GetRealAttribute (const NXString &title) |
Gets a real attribute by title. | |
double | GetRealAttribute (const char *title) |
Gets a real attribute by title. | |
double | GetRealUserAttribute (const NXString &title, int index) |
Gets a real attribute by Title and array Index. | |
double | GetRealUserAttribute (const char *title, int index) |
Gets a real attribute by Title and array Index. | |
NXString | GetReferenceAttribute (const NXString &title) |
Gets the reference string (not the calculated value) of a string attribute that uses a reference string. | |
NXString | GetReferenceAttribute (const char *title) |
Gets the reference string (not the calculated value) of a string attribute that uses a reference string. | |
NXString | GetStringAttribute (const NXString &title) |
Gets a string attribute value by title. | |
NXString | GetStringAttribute (const char *title) |
Gets a string attribute value by title. | |
NXString | GetStringUserAttribute (const NXString &title, int index) |
Gets a string attribute by Title and array Index. | |
NXString | GetStringUserAttribute (const char *title, int index) |
Gets a string attribute by Title and array Index. | |
NXString | GetTimeAttribute (NXOpen::NXObject::DateAndTimeFormat format, const NXString &title) |
Gets a time attribute by title. | |
NXString | GetTimeAttribute (NXOpen::NXObject::DateAndTimeFormat format, const char *title) |
Gets a time attribute by title. | |
NXString | GetTimeUserAttribute (const NXString &title, int index) |
Gets a time attribute by Title and array Index. | |
NXString | GetTimeUserAttribute (const char *title, int index) |
Gets a time attribute by Title and array Index. | |
NXOpen::NXObject::AttributeInformation | GetUserAttribute (const NXString &title, NXOpen::NXObject::AttributeType type, int index) |
Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index. | |
NXOpen::NXObject::AttributeInformation | GetUserAttribute (const char *title, NXOpen::NXObject::AttributeType type, int index) |
Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index. | |
NXString | GetUserAttributeAsString (const NXString &title, NXOpen::NXObject::AttributeType type, int index) |
Gets the first attribute encountered on the object, if any, with a given title, type and array index. | |
NXString | GetUserAttributeAsString (const char *title, NXOpen::NXObject::AttributeType type, int index) |
Gets the first attribute encountered on the object, if any, with a given title, type and array index. | |
bool | GetUserAttributeLock (const NXString &title, NXOpen::NXObject::AttributeType type) |
Determine the lock of the given attribute. | |
bool | GetUserAttributeLock (const char *title, NXOpen::NXObject::AttributeType type) |
Determine the lock of the given attribute. | |
std::vector < NXOpen::NXObject::AttributeInformation > | GetUserAttributes () |
Gets all the attributes that have been set on the given object. | |
std::vector < NXOpen::NXObject::AttributeInformation > | GetUserAttributes (bool includeUnset) |
Gets all the attributes that have been set on the given object. | |
std::vector < NXOpen::NXObject::AttributeInformation > | GetUserAttributes (bool includeUnset, bool addStringValues) |
Gets all the attributes that have been set on the given object. | |
std::vector< NXString > | GetUserAttributesAsStrings () |
Gets all the attributes that have been set on the given object. | |
std::vector< NXOpen::NXObject * > | GetUserAttributeSourceObjects () |
Returns an array of objects from which this object presents attributes. | |
bool | HasUserAttribute (const NXString &title, NXOpen::NXObject::AttributeType type, int index) |
Determines if an attribute with the given Title, Type and array Index is present on the object If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). | |
bool | HasUserAttribute (const char *title, NXOpen::NXObject::AttributeType type, int index) |
Determines if an attribute with the given Title, Type and array Index is present on the object If the attribute is not an array, the Index is ignored (if this is known beforehand, we recommend setting the Index to -1 to save time). | |
virtual bool | IsOccurrence () |
Returns whether this object is an occurrence or not. | |
virtual NXString | JournalIdentifier () |
Returns the identifier that would be recorded in a journal for this object. | |
virtual NXString | Name () |
Returns the custom name of the object. | |
virtual NXOpen::Assemblies::Component * | OwningComponent () |
Returns the owning component, if this object is an occurrence. | |
virtual NXOpen::BasePart * | OwningPart () |
Returns the owning part of this object Created in NX3.0.0. | |
virtual void | Print () |
Prints a representation of this object to the system log file. | |
virtual NXOpen::INXObject * | Prototype () |
Returns the prototype of this object if it is an occurrence. | |
void | SetAttribute (const NXString &title, int value) |
Creates or modifies an integer attribute. | |
void | SetAttribute (const char *title, int value) |
Creates or modifies an integer attribute. | |
void | SetAttribute (const NXString &title, int value, NXOpen::Update::Option option) |
Creates or modifies an integer attribute with the option to update or not. | |
void | SetAttribute (const char *title, int value, NXOpen::Update::Option option) |
Creates or modifies an integer attribute with the option to update or not. | |
void | SetAttribute (const NXString &title, double value) |
Creates or modifies a real attribute. | |
void | SetAttribute (const char *title, double value) |
Creates or modifies a real attribute. | |
void | SetAttribute (const NXString &title, double value, NXOpen::Update::Option option) |
Creates or modifies a real attribute with the option to update or not. | |
void | SetAttribute (const char *title, double value, NXOpen::Update::Option option) |
Creates or modifies a real attribute with the option to update or not. | |
void | SetAttribute (const NXString &title, const NXString &value) |
Creates or modifies a string attribute. | |
void | SetAttribute (const char *title, const char *value) |
Creates or modifies a string attribute. | |
void | SetAttribute (const NXString &title, const NXString &value, NXOpen::Update::Option option) |
Creates or modifies a string attribute with the option to update or not. | |
void | SetAttribute (const char *title, const char *value, NXOpen::Update::Option option) |
Creates or modifies a string attribute with the option to update or not. | |
void | SetAttribute (const NXString &title) |
Creates or modifies a null attribute which is an attribute with a title and no value. | |
void | SetAttribute (const char *title) |
Creates or modifies a null attribute which is an attribute with a title and no value. | |
void | SetAttribute (const NXString &title, NXOpen::Update::Option option) |
Creates or modifies a null attribute with the option to update or not. | |
void | SetAttribute (const char *title, NXOpen::Update::Option option) |
Creates or modifies a null attribute with the option to update or not. | |
void | SetBooleanUserAttribute (const NXString &title, int index, bool value, NXOpen::Update::Option option) |
Creates or modifies a boolean attribute with the option to update or not. | |
void | SetBooleanUserAttribute (const char *title, int index, bool value, NXOpen::Update::Option option) |
Creates or modifies a boolean attribute with the option to update or not. | |
virtual void | SetName (const NXString &name) |
Sets the custom name of the object. | |
void | SetName (const char *name) |
Sets the custom name of the object. | |
void | SetReferenceAttribute (const NXString &title, const NXString &value) |
Creates or modifies a string attribute which uses a reference string. | |
void | SetReferenceAttribute (const char *title, const char *value) |
Creates or modifies a string attribute which uses a reference string. | |
void | SetReferenceAttribute (const NXString &title, const NXString &value, NXOpen::Update::Option option) |
Creates or modifies a string attribute which uses a reference string, with the option to update or not. | |
void | SetReferenceAttribute (const char *title, const char *value, NXOpen::Update::Option option) |
Creates or modifies a string attribute which uses a reference string, with the option to update or not. | |
void | SetTimeAttribute (const NXString &title, const NXString &value) |
Creates or modifies a time attribute. | |
void | SetTimeAttribute (const char *title, const char *value) |
Creates or modifies a time attribute. | |
void | SetTimeAttribute (const NXString &title, const NXString &value, NXOpen::Update::Option option) |
Creates or modifies a time attribute with the option to update or not. | |
void | SetTimeAttribute (const char *title, const char *value, NXOpen::Update::Option option) |
Creates or modifies a time attribute with the option to update or not. | |
void | SetTimeUserAttribute (const NXString &title, int index, const NXString &value, NXOpen::Update::Option option) |
Creates or modifies a time attribute with the option to update or not. | |
void | SetTimeUserAttribute (const char *title, int index, const char *value, NXOpen::Update::Option option) |
Creates or modifies a time attribute with the option to update or not. | |
void | SetTimeUserAttribute (const NXString &title, int index, const NXOpen::NXObject::ComputationalTime &value, NXOpen::Update::Option option) |
Creates or modifies a time attribute with the option to update or not. | |
void | SetTimeUserAttribute (const char *title, int index, const NXOpen::NXObject::ComputationalTime &value, NXOpen::Update::Option option) |
Creates or modifies a time attribute with the option to update or not. | |
void | SetUserAttribute (const NXOpen::NXObject::AttributeInformation &info, NXOpen::Update::Option option) |
Creates or modifies an attribute with the option to update or not. | |
void | SetUserAttribute (const NXString &title, int index, int value, NXOpen::Update::Option option) |
Creates or modifies an integer attribute with the option to update or not. | |
void | SetUserAttribute (const char *title, int index, int value, NXOpen::Update::Option option) |
Creates or modifies an integer attribute with the option to update or not. | |
void | SetUserAttribute (const NXString &title, int index, double value, NXOpen::Update::Option option) |
Creates or modifies a real attribute with the option to update or not. | |
void | SetUserAttribute (const char *title, int index, double value, NXOpen::Update::Option option) |
Creates or modifies a real attribute with the option to update or not. | |
void | SetUserAttribute (const NXString &title, int index, const NXString &value, NXOpen::Update::Option option) |
Creates or modifies a string attribute with the option to update or not. | |
void | SetUserAttribute (const char *title, int index, const char *value, NXOpen::Update::Option option) |
Creates or modifies a string attribute with the option to update or not. | |
void | SetUserAttribute (const NXString &title, int index, NXOpen::Update::Option option) |
Creates or modifies a null attribute with the option to update or not. | |
void | SetUserAttribute (const char *title, int index, NXOpen::Update::Option option) |
Creates or modifies a null attribute with the option to update or not. | |
void | SetUserAttributeLock (const NXString &title, NXOpen::NXObject::AttributeType type, bool lock) |
Lock or unlock the given attribute. | |
void | SetUserAttributeLock (const char *title, NXOpen::NXObject::AttributeType type, bool lock) |
Lock or unlock the given attribute. | |
![]() | |
tag_t | GetTag () const |
<b>Deprecated</b>:<br> Use Tag instead. | |
tag_t | Tag () const |
Returns the tag of this object. | |
![]() |
ConstraintReference for use in positioning objects in NX.
A ConstraintReference is used by a Constraint to determine the movable object to be positioned by the constraint and the geometry used to define the constraint.
To create an instance of this class, use NXOpen::Positioning::Constraint::CreateConstraintReference .
Created in NX4.0.0.
Specifies the order of the constraint reference used in a Positioning::Constraint .
Typically the order is set during creation, where the first constraint reference added is "outside" and the second "outside". For Bond constraints, the order is set to be "unknown" at creation.
Specifies the type of the geometry used in a Positioning::ConstraintReference .
The type reflects that used in a Positioning::Constraint while it is being solved and may be different from that inferred directly from NXOpen::Positioning::ConstraintReference::GetGeometry . For example we may use Positioning::ConstraintReference::GeometryTypeLine as an axis when given a cylindrical face as the geometry.
GeometryTypePoint | |
GeometryTypeLine |
Straight line. |
GeometryTypeCircle |
Circle. |
GeometryTypePlane | |
GeometryTypeCylinder |
Cylinder. |
GeometryTypeSphere |
Sphere. |
GeometryTypeSweepSurface |
Swept surface. |
GeometryTypeParametricSurface |
Parametric surface. |
GeometryTypeParametricCurve |
Parametric curve. |
GeometryTypeSplineCurve |
Spline curve. |
GeometryTypeTorus |
Torus. |
GeometryTypeCone |
Cone. |
GeometryTypeEllipse | |
GeometryTypeSplineSurface |
Spline surface. |
Specifies the half space value of one geometry used in a distance constraint.
This is only used for surface geometries, and it determines which side of the surface the distance constraint is measured from.
NXOpen::Positioning::ConstraintReference::HalfSpace NXOpen::Positioning::ConstraintReference::ConstraintReferenceHalfSpace | ( | ) |
Returns the half_space value for the constraint reference.
This is only used for distance constraints.
Created in NX5.0.1.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::NXObject* NXOpen::Positioning::ConstraintReference::GetGeometry | ( | ) |
Returns the geometry of the constraint reference.
This is the geometry used in any Positioning::Constraint using this constraint reference.
bool NXOpen::Positioning::ConstraintReference::GetHasPerpendicularVector | ( | ) |
Get the flag indicating whether the constraint reference is one that maintains a direction perpendicular to the primary geometry.
This is only applicable to @link Positioning::Constraint::Type Positioning::Constraint::Type@endlink @link Positioning::Constraint::TypeAlignLock Positioning::Constraint::TypeAlignLock@endlink . @return Whether the constraint has a perpendicular vector
Created in NX9.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::NXObject* NXOpen::Positioning::ConstraintReference::GetMovableObject | ( | ) |
Returns the movable object of the constraint reference.
The movable object determines the object to be positioned by any @link Positioning::Constraint Positioning::Constraint@endlink using this constraint reference. @return The object positioned by the constraint
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::NXObject* NXOpen::Positioning::ConstraintReference::GetPrototypeGeometry | ( | ) |
Returns the prototype geometry of the constraint reference.
This is never an occurrence. @return The prototype geometry referenced by the constraint
Created in NX9.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::Vector3d NXOpen::Positioning::ConstraintReference::GetPrototypePerpendicularVector | ( | ) |
Get the value of the perpendicular vector, which will be (0,0,0) for most constraints apart from Positioning::Constraint::TypeAlignLock .
@return The value of the perpendicular vector
Created in NX9.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
bool NXOpen::Positioning::ConstraintReference::GetUsePortRotate | ( | ) |
Get the flag forcing the use of the rotation vector of the referenced Routing::Port object instead of the alignment vector when solving the constraint system.
Only effective when the referenced geometry is a @link Routing::Port Routing::Port@endlink object. @return
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
bool NXOpen::Positioning::ConstraintReference::GetUsesGeometryAxis | ( | ) |
Returns if the constraint reference should use the axis of the geometry (for example a cylindrical face) rather than the surface.
@return If this reference is using the axis of the geometry
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::Point3d NXOpen::Positioning::ConstraintReference::HelpPoint | ( | ) |
Returns the help point of the constraint reference.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::Positioning::ConstraintReference::ConstraintOrder NXOpen::Positioning::ConstraintReference::Order | ( | ) |
Returns the order of the constraint reference within its constraint.
Note that this order is not associated with the geometry or with the alignment of the constraint. It is based on the idea that the constraint has a direction from "outside" to "inside". It does not affect the result of a solve.
Created in NX5.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
void NXOpen::Positioning::ConstraintReference::SetConstraintReferenceHalfSpace | ( | NXOpen::Positioning::ConstraintReference::HalfSpace | halfSpace | ) |
Sets the half_space value for the constraint reference.
This is only used for distance constraints.
Created in NX5.0.1.
License requirements : assemblies ("ASSEMBLIES MODULE")
halfSpace | Half space for constraint reference |
void NXOpen::Positioning::ConstraintReference::SetFixHint | ( | bool | set | ) |
Set a hint to the solver to fix the movable object associated with this constraint reference.
The hint is unset when "set" is false. The hint can only have an effect when the constraint owning this constraint reference has been explicitly added to a @link Network Network@endlink . The hint is forgotten after an update.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
set | Set or unset the hint |
void NXOpen::Positioning::ConstraintReference::SetFixHintForUpdate | ( | bool | set | ) |
Set a hint to the solver to fix the movable object associated with this constraint reference.
The hint is unset when "set" is false. The hint is forgotten after an update. Ensures that the constraint that owns this reference will solve during the next call to @link Update::DoUpdate Update::DoUpdate@endlink .
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
set | Set or unset the hint |
void NXOpen::Positioning::ConstraintReference::SetHelpPoint | ( | const NXOpen::Point3d & | helpPoint | ) |
Sets the help point of the constraint reference.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
helpPoint | Coordinates of point in part of constraint |
void NXOpen::Positioning::ConstraintReference::SetPrototypePerpendicularVector | ( | const NXOpen::Vector3d & | perpendicularVector | ) |
Set the value of the perpendicular vector.
The value must be a unit vector given in the coordinates of the part containing the referenced geometry.
The perpendicular vector must be set to (0,0,0) for most constraints apart from Positioning::Constraint::TypeAlignLock which must have a value. An error is raised if this is not the case.
Whenever the constraint is solved, the value of the perpendicular vector may be modified, to ensure that the vector is perpendicular to the referenced geometry.
Created in NX9.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
perpendicularVector | The value of the perpendicular vector |
void NXOpen::Positioning::ConstraintReference::SetUsePortRotateFlag | ( | bool | useRotate | ) |
Sets the flag forcing the use of the rotation vector of the referenced Routing::Port object instead of the alignment vector when solving the constraint system.
Only effective when the referenced geometry is a @link Routing::Port Routing::Port@endlink object.
Created in NX5.0.1.
License requirements : assemblies ("ASSEMBLIES MODULE")
useRotate | use rotate |
NXOpen::Positioning::ConstraintReference::GeometryType NXOpen::Positioning::ConstraintReference::SolverGeometryType | ( | ) |
Returns the geometry type of the constraint reference used during a solve.
Created in NX5.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
bool NXOpen::Positioning::ConstraintReference::UsePortRotateFlag | ( | ) |
Returns the flag forcing the use of the rotation vector of the referenced Routing::Port object instead of the alignment vector when solving the constraint system.
Only effective when the referenced geometry is a @link Routing::Port Routing::Port@endlink object.
Created in NX5.0.1.
License requirements : assemblies ("ASSEMBLIES MODULE")