ClearanceSet Class

class NXOpen.Assemblies.ClearanceSet

Bases: NXOpen.NXObject

Represents NXOpen.Assemblies.ClearanceSet.

Input to this class can be PSM facet objects.

Currently we don’t support KF at this time.

New in version NX9.0.0.

Properties

Property Description
IsOccurrence Returns whether this object is an occurrence or not.
JournalIdentifier Returns the identifier that would be recorded in a journal for this object.
Name Returns the custom name of the object.
OwningComponent Returns the owning component, if this object is an occurrence.
OwningPart Returns the owning part of this object
Prototype Returns the prototype of this object if it is an occurrence.
Tag Returns the Tag for this object.

Methods

Method Description
CalculatePenetrationDepth Calculate penetration depth for a set of hard interferences.
Copy Makes a copy of a dataset.
CreateAttributeIterator Create an attribute iterator
CreateInterferenceGeometry Construct interference geometry for a set of hard interferences.
Delete Delete this clearance set
DeleteAllAttributesByType Deletes all attributes of a specific type.
DeleteAttributeByTypeAndTitle Deletes an attribute by type and title.
DeleteInterference Deletes the interference for a given object pair.
DeleteUserAttribute Deletes the first attribute encountered with the given Type, Title.
DeleteUserAttributes Deletes the attributes on the object, if any, that satisfy the given iterator
DetectObsoleteSettings Detects whether a clearance set was defined with settings which are obsolete/no longer supported.
FindObject Finds the NXOpen.NXObject with the given identifier as recorded in a journal.
GetAttributeTitlesByType Gets all the attribute titles of a specific type.
GetBooleanUserAttribute Gets a boolean attribute by Title and array Index.
GetComputationalTimeUserAttribute Gets a time attribute by Title and array Index.
GetIntegerAttribute Gets an integer attribute by title.
GetIntegerUserAttribute Gets an integer attribute by Title and array Index.
GetInterferenceData Inquires the data associated with a given pair of interfering objects.
GetIsPairChanged Inquires if an object pair has changed since the last analysis run.
GetNextInterference Cycles the interference in a clearance analysis data set.
GetNextUserAttribute Gets the next attribute encountered on the object, if any, that satisfies the given iterator.
GetNumberOfInterferences Inquires the number of interferences stored in a clearance analysis data set.
GetPdmReferenceAttributeValue Gets the value of PDM Reference attribute for given object.
GetRealAttribute Gets a real attribute by title.
GetRealUserAttribute Gets a real attribute by Title and array Index.
GetReferenceAttribute Gets the reference string (not the calculated value) of a string attribute that uses a reference string.
GetResults Inquires a summary of the results of the most recent clearance analysis run.
GetStringAttribute Gets a string attribute value by title.
GetStringUserAttribute Gets a string attribute by Title and array Index.
GetTimeAttribute Gets a time attribute by title.
GetTimeUserAttribute Gets a time attribute by Title and array Index.
GetUserAttribute Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index.
GetUserAttributeAsString Gets the first attribute encountered on the object, if any, with a given title, type and array index.
GetUserAttributeCount Gets the count of set attributes on the object, if any, that satisfy the given iterator.
GetUserAttributeLock Determine the lock of the given attribute.
GetUserAttributeSize Gets the size of the first attribute encountered on the object, if any, with a given Title and Type.
GetUserAttributeSourceObjects Returns an array of objects from which this object presents attributes.
GetUserAttributes Gets all the attributes that have been set on the given object, if any, that satisfy the given iterator.
GetUserAttributesAsStrings Gets all the attributes that have been set on the given object.
GetVersion Gets the version of a clearance analysis dataset.
HasUserAttribute Determines if an attribute exists on the object, that satisfies the given iterator
PerformAnalysis Perform an analysis on this clearance set with option to specify whether out-of-date excluded pairs will be reanalyzed.
Print Prints a representation of this object to the system log file.
ReanalyzePairs Reanalyze a set of interferences using the specified analysis method.
SetAttribute Creates or modifies an integer attribute.
SetBooleanUserAttribute Creates or modifies a boolean attribute with the option to update or not.
SetInterferenceText Associates a text string to an interfering object pair.
SetName Sets the custom name of the object.
SetPdmReferenceAttribute Sets the value of PDM Reference attribute on the object.
SetReferenceAttribute Creates or modifies a string attribute which uses a reference string.
SetTimeAttribute Creates or modifies a time attribute.
SetTimeUserAttribute Creates or modifies a time attribute with the option to update or not.
SetUserAttribute Creates or modifies an attribute with the option to update or not.
SetUserAttributeLock Lock or unlock the given attribute.

Enumerations

ClearanceSetCopyMode Enumeration Specify the dataset copy mode
ClearanceSetInterferenceType Enumeration Specify the type of interference
ClearanceSetJobStatus Enumeration Specify the job aborted status
ClearanceSetPenetrationDepthResult Enumeration The result of penetration depth calculation
ClearanceSetReanalyzeOutOfDateExcludedPairs Enumeration Specify whether to reanalyze out-of-date excluded pairs.
ClearanceSetReanalyzePairCalculationMethod Enumeration The analysis method to use when reanalyzing a pair.

Structs

ClearanceSetSummary_Struct Struct Summary of the most recent Clearance Analysis results

Property Detail

IsOccurrence

ClearanceSet.IsOccurrence

Returns whether this object is an occurrence or not.

-------------------------------------

Getter Method

Signature IsOccurrence

Returns:This object is an occurrence
Return type:bool

New in version NX3.0.0.

License requirements: None.

JournalIdentifier

ClearanceSet.JournalIdentifier

Returns the identifier that would be recorded in a journal for this object.

This may not be the same across different releases of the software.

-------------------------------------

Getter Method

Signature JournalIdentifier

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

Name

ClearanceSet.Name

Returns the custom name of the object.

-------------------------------------

Getter Method

Signature Name

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

OwningComponent

ClearanceSet.OwningComponent

Returns the owning component, if this object is an occurrence.

-------------------------------------

Getter Method

Signature OwningComponent

Returns:
Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

OwningPart

ClearanceSet.OwningPart

Returns the owning part of this object

-------------------------------------

Getter Method

Signature OwningPart

Returns:The owning part of this object or null if it does not have an owner
Return type:NXOpen.BasePart

New in version NX3.0.0.

License requirements: None.

Prototype

ClearanceSet.Prototype

Returns the prototype of this object if it is an occurrence.

-------------------------------------

Getter Method

Signature Prototype

Returns:The prototype of this object or null if this object is not an occurrence
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

Method Detail

CalculatePenetrationDepth

ClearanceSet.CalculatePenetrationDepth

Calculate penetration depth for a set of hard interferences.

The interferences must be specified using two parallel arrays: the objects in the first interference should be given in the first elements of the arrays, the objects in the second interference should be given in the second elements of the arrays, etc.

Signature CalculatePenetrationDepth(firstObjects, secondObjects)

Parameters:
  • firstObjects (list of NXOpen.DisplayableObject) – The first object of each interference. Must be the same size as secondObjects.
  • secondObjects (list of NXOpen.DisplayableObject) – The second object of each interference. Must be the same size as firstObjects.

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

Copy

ClearanceSet.Copy

Makes a copy of a dataset.

You must supply a unique name. There are three modes in which to copy the dataset: NXOpen.Assemblies.ClearanceSetCopyMode.NoResults only copies the setup data. The version of the new dataset is set to zero (meaning clearance analysis has not been run); NXOpen.Assemblies.ClearanceSetCopyMode.Results makes a copy of the current analysis results, but not the interference bodies; NXOpen.Assemblies.ClearanceSetCopyMode.InterfBodies makes a complete copy of the results. The name must be less than MAX_LINE_SIZE characters long

Signature Copy(name, mode)

Parameters:
Returns:

the dataset that is copied

Return type:

NXOpen.Assemblies.ClearanceSet

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CreateInterferenceGeometry

ClearanceSet.CreateInterferenceGeometry

Construct interference geometry for a set of hard interferences.

The interferences must be specified using two parallel arrays: the objects in the first interference should be given in the first elements of the arrays, the objects in the second interference should be given in the second elements of the arrays, etc.

Signature CreateInterferenceGeometry(firstObjects, secondObjects)

Parameters:
  • firstObjects (list of NXOpen.DisplayableObject) – The first object of each interference. Must be the same size as secondObjects.
  • secondObjects (list of NXOpen.DisplayableObject) – The second object of each interference. Must be the same size as firstObjects.

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

Delete

ClearanceSet.Delete

Delete this clearance set

Signature Delete()

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

DeleteInterference

ClearanceSet.DeleteInterference

Deletes the interference for a given object pair.

Both objects must be members of the given data set. If the object pair does not refer to an existing interference, an error is returned. All data associated with the interference is deleted.

Signature DeleteInterference(object1, object2)

Parameters:

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

DetectObsoleteSettings

ClearanceSet.DetectObsoleteSettings

Detects whether a clearance set was defined with settings which are obsolete/no longer supported.

For example, prior to NX 9.0, an optional setting “ignore mated pairs” was available. Existing results may still be read from a clearance set with obsolete settings, but the next time analysis is performed, the obsolete settings will be removed and all existing results cleared. Optionally, this method can perform any required cleanup now, instead of waiting until the next analysis.

Signature DetectObsoleteSettings(doCleanupNow)

Parameters:doCleanupNow (bool) – whether cleanup should be performed now
Returns:whether the clearance set contains obsolete settings
Return type:bool

New in version NX10.0.2.

License requirements: assemblies (“ASSEMBLIES MODULE”)

FindObject

ClearanceSet.FindObject

Finds the NXOpen.NXObject with the given identifier as recorded in a journal.

An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.

An exception will be thrown if no object can be found with the given journal identifier.

Signature FindObject(journalIdentifier)

Parameters:journalIdentifier (str) – Journal identifier of the object
Returns:
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

GetInterferenceData

ClearanceSet.GetInterferenceData

Inquires the data associated with a given pair of interfering objects.

Signature GetInterferenceData(object1, object2)

Parameters:
Returns:

a tuple

Return type:

A tuple consisting of (type, newInterference, interfBodies, point1, point2, text, interfNum, config, depthResult, depth, direction, minPoint, maxPoint). type is a NXOpen.Assemblies.ClearanceSetInterferenceType. the interference type newInterference is a bool. the flag for new interference interfBodies is a list of NXOpen.DisplayableObject. the list of interference bodies point1 is a NXOpen.Point3d. a point on the first object point2 is a NXOpen.Point3d. a point on the second object text is a str. text associated with the interference interfNum is a int. a unique number for the interference config is a int. the configuration index depthResult is a int. result status of penetration depth calculation depth is a float. depth of penetration direction is a NXOpen.Vector3d. a unit vector indicating the direction of penetration minPoint is a NXOpen.Point3d. the points on the interference region at the extremes of depth maxPoint is a NXOpen.Point3d. the points on the interference region at the extremes of depth

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetIsPairChanged

ClearanceSet.GetIsPairChanged

Inquires if an object pair has changed since the last analysis run.

Both objects must be solid bodies or facet models that are members of the clearance analysis data set. If either object has changed since the last analysis run, then isChanged is returned as TRUE. If no analysis has been run on either of the objects, TRUE is returned.

Signature GetIsPairChanged(object1, object2)

Parameters:
Returns:

Has this pair changed since the last analysis run?

Return type:

bool

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetNextInterference

ClearanceSet.GetNextInterference

Cycles the interference in a clearance analysis data set.

Interferences are stored as object pairs. Start the cycling using None as the input values for both object1 and object2. This routine passes back the tags of the objects that define the next interference. None returned for either object indicates the end of the cycling.

Signature GetNextInterference(object1, object2)

Parameters:
Returns:

a tuple

Return type:

A tuple consisting of (nextObject1, nextObject2). nextObject1 is a NXOpen.DisplayableObject. the first object in the pair of the next interference nextObject2 is a NXOpen.DisplayableObject. the second object in the pair of the next interference

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetNumberOfInterferences

ClearanceSet.GetNumberOfInterferences

Inquires the number of interferences stored in a clearance analysis data set.

If clearance analysis has never been run on the data set, an error is returned.

Signature GetNumberOfInterferences()

Returns:the number of interferences associated with the dataset
Return type:int

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetResults

ClearanceSet.GetResults

Inquires a summary of the results of the most recent clearance analysis run.

The NXOpen.Assemblies.ClearanceSetSummary_Struct structure is filled with analysis statistics, including numbers of objects, number of pairs, number of checked pairs, and number of interferences of each type. If clearance analysis has never been run on the data set, an error is returned.

Signature GetResults()

Returns:the summary structure
Return type:NXOpen.Assemblies.ClearanceSetSummary_Struct

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetVersion

ClearanceSet.GetVersion

Gets the version of a clearance analysis dataset.

The version indicates how many times clearance analysis has been run on a data set. If the version is zero, then the analysis has never been run.

Signature GetVersion()

Returns:
Return type:int

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

PerformAnalysis

ClearanceSet.PerformAnalysis

Perform an analysis on this clearance set with option to specify whether out-of-date excluded pairs will be reanalyzed.

You can specify to use the Customer Default setting, or you can specify a true or false option to override the Customer Default.

Signature PerformAnalysis(reanalyzeOption)

Parameters:reanalyzeOption (NXOpen.Assemblies.ClearanceSetReanalyzeOutOfDateExcludedPairs) –

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

Print

ClearanceSet.Print

Prints a representation of this object to the system log file.

Signature Print()

New in version NX3.0.0.

License requirements: None.

ReanalyzePairs

ClearanceSet.ReanalyzePairs

Reanalyze a set of interferences using the specified analysis method.

The interferences must be specified using two parallel arrays: the objects in the first interference should be given in the first elements of the arrays, the objects in the second interference should be given in the second elements of the arrays, etc.

Signature ReanalyzePairs(firstObjects, secondObjects, calculationMethod)

Parameters:

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SetInterferenceText

ClearanceSet.SetInterferenceText

Associates a text string to an interfering object pair.

Both objects must be members of the given dataset. If the object pair does not refer to an existing interference, an error is returned.

Signature SetInterferenceText(object1, object2, text)

Parameters:

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SetName

ClearanceSet.SetName

Sets the custom name of the object.

NOTE: This method should not be used to edit a read-only object such as a Mirrored PMI object. If it is, the changes will be overridden when the part is updated.

Signature SetName(name)

Parameters:name (str) –

New in version NX3.0.0.

License requirements: None.