public interface Constraint extends NXObject
ComponentConstraint
should be used by preference.
Positioner.createConstraint(boolean)
Modifier and Type | Interface and Description |
---|---|
static class |
Constraint.Alignment
Specifies alignment of directed geometries used in a constraint.
|
static class |
Constraint.SolverStatus
Specifies the status of a constraint.
|
static class |
Constraint.SplineType
Specifies how the spline points define the shape of the spline.
|
static class |
Constraint.Type
Specifies the type of a constraint.
|
NXObject.AttributeInformation, NXObject.AttributeType, NXObject.ComputationalTime, NXObject.DateAndTimeFormat
Modifier and Type | Method and Description |
---|---|
boolean |
automatic()
Returns the flag marking the constraint as an "automatic" constraint.
|
Constraint.Alignment |
constraintAlignment()
Returns
the alignment behavior for the constraint.
|
Constraint.Type |
constraintType()
Returns
the constraint type.
|
ConstraintReference |
createConstraintReference(NXObject movableObject,
NXObject geometry,
boolean usesAxis,
boolean isIndirect)
Adds geometry to a constraint and sets the movable object
to be constrained.
|
ConstraintReference |
createConstraintReference(NXObject movableObject,
NXObject geometry,
boolean usesAxis,
boolean isIndirect,
boolean usePortRotate)
Adds geometry to a constraint and sets the movable object
to be constrained.
|
void |
deleteConstraintReference(ConstraintReference constraintReference)
Removes a
ConstraintReference from the constraint. |
void |
editConstraintReference(ConstraintReference constraintReference,
NXObject movableObject,
NXObject geometry,
boolean usesAxis,
boolean isIndirect,
boolean usePortRotate)
Adds geometry to a constraint and sets the movable object
to be constrained, replacing the properties of an existing
reference of the constraint.
|
Expression |
expression()
Returns
the expression used for constraint.
|
void |
flipAlignment()
Reverses the constraint alignment if this is possible.
|
String[] |
generateConversionReport()
Returns a textual conversion report this constraint from when it was converted from a
Mating Constraint to an Assembly Constraint.
|
Constraint.SolverStatus |
getConstraintStatus()
Returns the solver status of a constraint.
|
DisplayedConstraint |
getDisplayedConstraint()
Gets the
DisplayedConstraint that is in the same part as that of the constraint. |
ConstraintReference[] |
getReferences()
Gets all the
ConstraintReference s for the
constraint. |
boolean |
persistent()
Returns
the persistent state of the constraint.
|
void |
reverseDirection()
Reverses the constraint direction.
|
void |
setAlignmentHint(Constraint.Alignment alignment)
Set a hint as to which alignment should be used by the
solver for this constraint.
|
void |
setAutomatic(boolean isauto)
Sets the flag marking the constraint as an "automatic" constraint.
|
void |
setConstraintAlignment(Constraint.Alignment alignment)
License requirements: assemblies ("ASSEMBLIES MODULE") . |
void |
setConstraintType(Constraint.Type constraintType)
License requirements: assemblies ("ASSEMBLIES MODULE") . |
void |
setExpression(String expression)
The expression used for constraint - only for distance or angle
License requirements: assemblies ("ASSEMBLIES MODULE") . |
void |
setPersistent(boolean persistent)
License requirements: assemblies ("ASSEMBLIES MODULE") . |
void |
setSplinePointsType(Constraint.SplineType splineType)
Sets the type of the spline.
|
void |
setSuppressed(boolean suppressed)
License requirements: assemblies ("ASSEMBLIES MODULE") . |
Constraint.SplineType |
splinePointsType()
Returns the type of the spline.
|
boolean |
suppressed()
Returns
the suppression state for the constraint.
|
deleteAllAttributesByType, deleteAllAttributesByType, deleteAttributeByTypeAndTitle, deleteAttributeByTypeAndTitle, deleteUserAttribute, deleteUserAttributes, getAttributeTitlesByType, getBooleanUserAttribute, getComputationalTimeUserAttribute, getIntegerAttribute, getIntegerUserAttribute, getRealAttribute, getRealUserAttribute, getReferenceAttribute, getStringAttribute, getStringUserAttribute, getTimeAttribute, getTimeUserAttribute, getUserAttribute, getUserAttribute, getUserAttributeAsString, getUserAttributeCount, getUserAttributeCount, getUserAttributeLock, getUserAttributes, getUserAttributes, getUserAttributes, getUserAttributesAsStrings, getUserAttributeSize, getUserAttributeSourceObjects, hasUserAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setBooleanUserAttribute, setReferenceAttribute, setReferenceAttribute, setTimeAttribute, setTimeAttribute, setTimeUserAttribute, setTimeUserAttribute, setUserAttribute, setUserAttribute, setUserAttribute, setUserAttribute, setUserAttribute, setUserAttributeLock
printTestData, printTestData, tag, tagValue
findObject, isOccurrence, journalIdentifier, name, owningComponent, owningPart, print, prototype, setName
ConstraintReference[] getReferences() throws NXException, RemoteException
ConstraintReference
s for the
constraint.
NXException
RemoteException
void deleteConstraintReference(ConstraintReference constraintReference) throws NXException, RemoteException
ConstraintReference
from the constraint.
constraintReference
- The constraint reference to remove. A list
of references can be obtained via
getReferences()
.NXException
RemoteException
ConstraintReference createConstraintReference(NXObject movableObject, NXObject geometry, boolean usesAxis, boolean isIndirect) throws NXException, RemoteException
movableObject
- Object to be positioned by constraintgeometry
- Geometry used to define constraintusesAxis
- Use axis of geometryisIndirect
- Geometry is to be used indirectly to identify geometry in another partConstraintReference
NXException
RemoteException
ConstraintReference createConstraintReference(NXObject movableObject, NXObject geometry, boolean usesAxis, boolean isIndirect, boolean usePortRotate) throws NXException, RemoteException
movableObject
- Object to be positioned by constraintgeometry
- Geometry used to define constraintusesAxis
- Use axis of geometryisIndirect
- Geometry is to be used indirectly to identify geometry in another partusePortRotate
- Use rotate vector of nxopen.routing.Port
.ConstraintReference
NXException
RemoteException
void editConstraintReference(ConstraintReference constraintReference, NXObject movableObject, NXObject geometry, boolean usesAxis, boolean isIndirect, boolean usePortRotate) throws NXException, RemoteException
constraintReference
- The ConstraintReference
whose properties are to be changedmovableObject
- Object to be positioned by constraintgeometry
- Geometry used to define constraintusesAxis
- Use axis of geometryisIndirect
- Geometry is to be used indirectly to identify geometry in another partusePortRotate
- Use rotate vector of nxopen.routing.Port
.NXException
RemoteException
Constraint.Type constraintType() throws NXException, RemoteException
NXException
RemoteException
void setConstraintType(Constraint.Type constraintType) throws NXException, RemoteException
constraintType
- NXException
RemoteException
void setConstraintAlignment(Constraint.Alignment alignment) throws NXException, RemoteException
alignment
- Alignment behavior for constraintNXException
RemoteException
Constraint.Alignment constraintAlignment() throws NXException, RemoteException
NXException
RemoteException
void flipAlignment() throws NXException, RemoteException
NXException
RemoteException
void setSuppressed(boolean suppressed) throws NXException, RemoteException
suppressed
- The suppression stateNXException
RemoteException
boolean suppressed() throws NXException, RemoteException
ComponentConstraint
this is the state in the ComponentPositioner.primaryArrangement()
and ComponentPositioner.setPrimaryArrangement(nxopen.assemblies.Arrangement)
."
NXException
RemoteException
void setExpression(String expression) throws NXException, RemoteException
expression
- Name of expression used in distance or angle constraint NXException
RemoteException
Expression expression() throws NXException, RemoteException
NXException
RemoteException
Constraint.SolverStatus getConstraintStatus() throws NXException, RemoteException
NXException
RemoteException
void setAlignmentHint(Constraint.Alignment alignment) throws NXException, RemoteException
constraintAlignment()
,
is Constraint.Alignment.INFER_ALIGN
.
The hint can only have an effect when the constraint has been
explicitly added to a Network
.
Passing in Constraint.Alignment.INFER_ALIGN
as the alignment
argument will have no effect.
The hint is forgotten after an update.
alignment
- The alignment hintNXException
RemoteException
void setPersistent(boolean persistent) throws NXException, RemoteException
persistent
- The persistent stateNXException
RemoteException
boolean persistent() throws NXException, RemoteException
NXException
RemoteException
void setAutomatic(boolean isauto) throws NXException, RemoteException
isauto
- The automatic stateNXException
RemoteException
boolean automatic() throws NXException, RemoteException
NXException
RemoteException
String[] generateConversionReport() throws NXException, RemoteException
NXException
RemoteException
void reverseDirection() throws NXException, RemoteException
ConstraintReference.order()
on each ConstraintReference
.
So "Inside" becomes "Outside", "Outside" becomes "Inside" and "Unknown" remains as it is.
NXException
RemoteException
Constraint.SplineType splinePointsType() throws NXException, RemoteException
Constraint.Type.SPLINE_DATA
.
NXException
RemoteException
void setSplinePointsType(Constraint.SplineType splineType) throws NXException, RemoteException
Constraint.Type.SPLINE_DATA
.
splineType
- NXException
RemoteException
DisplayedConstraint getDisplayedConstraint() throws NXException, RemoteException
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.
NXException
RemoteException
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.