HPS::Exchange::CADModel

class HPS.Exchange.CADModel : public HPS.CADModel

The CADModel class is a smart pointer. It represents an A3DAsmModelFile in Exchange. The primary purpose of this class is simply to provide access to the underlying A3DAsmModelFile pointer for use by Exchange library functions.

Public Functions

CADModel ()

The default constructor creates an uninitialized CADModel object. The Type() function will return Type.None.

CADModel (HPS.CADModel in_that)

This constructor creates an Exchange.CADModel object that shares the underlying smart-pointer of the source HPS.CADModel. The copy will only be successful if the source component is really an upcast of an Exchange.CADModel object. Otherwise the copy will fail and the resulting Exchange.CADModel will be invalid.

Param in_that

The source HPS.CADModel to copy.

CADModel (HPS.Component in_that)

This constructor creates a CADModel object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of an Exchange.CADModel object. Otherwise the copy will fail and the resulting Exchange.CADModel will be invalid.

Param in_that

The source Component to copy.

CADModel (HPS.Exchange.CADModel in_that)

This constructor creates an Exchange.CADModel object that shares the underlying smart-pointer of the source HPS.CADModel. The copy will only be successful if the source component is really an upcast of an Exchange.CADModel object. Otherwise the copy will fail and the resulting Exchange.CADModel will be invalid.

Param in_that

The source HPS.CADModel to copy.

override void Dispose ()
HPS.Exchange.Layer[] GetAllLayers ()

Get all layers defined in this CAD Model.

Return

A list of all layers defined in this CAD Model.

HPS.Exchange.BIMData GetBIMData ()

Gets a const reference to BIM data. Only formats which support the concept of BIM data can have a non empty BIM Data.

Return

the BIM data for this CADModel.

HPS.Component GetComponentFromEntity (IntPtr in_entity)

Gets the Component associated with the given A3DEntity pointer (if any).

Param in_entity

The A3DEntity pointer from which to find the associated Component.

Return

The Component associated with the given A3DEntity pointer, or an empty component if there is no such Component.

HPS.Exchange.Configuration[] GetConfigurations ()

Gets a list of configurations for this CADModel (if any). Only formats which support the concept of configurations can return a non-empty array, and only files of those formats which contain configurations will return a non-empty array.

Return

The list of configurations for this CADModel.

string[] GetCurrentConfiguration ()

Gets the current configuration for this CADModel if it exists. Only formats which support the concept of configurations can have a current configuration, and only files of those formats which contain configurations will have a current configuration.

Return

The current configuration for this CADModel.

bool GetEntityOwnership ()

Whether this CADModel owns the associated A3DAsmModelFile or not. If this CADModel owns the associated A3DAsmModelFile, when it is deleted (via Exchange.CADModel.Delete), it will delete not only the associated Visualize components, segments and geometry but also the A3DAsmModelFile via A3DAsmModelFileDelete. If this CADModel does not own the associated A3DAsmModelFile, when it is deleted, it will only delete the associated Visualize components, segments and geometry, but not the A3DAsmModelFile. It will be up to the user to ensure the A3DAsmModelFile is deleted to reclaim any memory it has allocated in this case.

Return

Whether this CADModel owns the associated A3DAsmModelFile.

IntPtr GetExchangeEntity ()

Gets the A3DEntity pointer corresponding to this Exchange.CADModel.

Return

The A3DEntity pointer corresponding to this Exchange.CADModel.

HPS.Exchange.Sheet[] GetSheets ()

Gets a list of sheets for this CADModel (if any). Only formats which support the concept of sheets can return a non-empty array.

Return

The list of sheets for this CADModel

void HideAllPMI (HPS.Canvas in_canvas)

Forces the visibility of all PMI off in the given Canvas and layer. This will undo any hides, shows, isolates, or other highlights performed on PMI components contained within this CADModel via ComponentPath calls.

Param in_canvas

The Canvas in which to perform the the operation

void HideAllPMI (HPS.Canvas in_canvas, ulong in_layer)

Forces the visibility of all PMI off in the given Canvas and layer. This will undo any hides, shows, isolates, or other highlights performed on PMI components contained within this CADModel via ComponentPath calls.

Param in_canvas

The Canvas in which to perform the the operation

Param in_layer

The layer in the Canvas in which to perform the operation.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

HPS.Exchange.ReloadNotifier Reload ()

Asynchronously reloads this CADModel. This will delete all underlying subcomponents and then reparse the underlying Exchange data.

HPS.Exchange.ReloadNotifier Reload (HPS.Exchange.TessellationOptionsKit in_options)

Asynchronously reloads this CADModel. This will delete all underlying subcomponents and then reparse the underlying Exchange data.

Param in_options

The options to use to generate tessellations for new Components (if necessary).

HPS.Exchange.ReloadNotifier Reload (HPS.Exchange.TessellationOptionsKit in_options, HPS.Exchange.TranslationOptionsKit in_translation_options)

Asynchronously reloads this CADModel. This will delete all underlying subcomponents and then reparse the underlying Exchange data.

Param in_options

The options to use to generate tessellations for new Components (if necessary).

Param in_translation_options

The options to use for translation from Exchange BRep to Parasolid. This option only applies if a file was loaded via the ExchangeParasolid module and there are components underlying this component that need to be translated to Parasolid.

bool ReplaceExchangeEntity (HPS.Component in_component, IntPtr in_a3d_entity)

Replace the Exchange entity associated with the provided component. You are required to sync the HPS model tree with the PRC structures after calling this via Reload.

See

Reload

Param in_component

The component whose entity is to be replaced.

Param in_a3d_entity

The new entity that will be associated with in_component.

Return

true if the new entity was associated successfully, false otherwise.

void SetAllPMIInFront (bool in_enable, HPS.Canvas in_canvas)

Forces all of the PMI in this CADModel to be rendered in front of the other geometry. contained within this CADModel via ComponentPath calls.

Param in_enable

Dictates whether the pmi will be forced in front or not.

Param in_canvas

The Canvas in which to perform the the operation

void SetAllPMIInFront (bool in_enable, HPS.Canvas in_canvas, ulong in_layer)

Forces all of the PMI in this CADModel to be rendered in front of the other geometry. contained within this CADModel via ComponentPath calls.

Param in_enable

Dictates whether the pmi will be forced in front or not.

Param in_canvas

The Canvas in which to perform the the operation

Param in_layer

The layer in the Canvas in which to perform the operation.

void ShowAllPMI (HPS.Canvas in_canvas)

Forces the visibility of all PMI on in the given Canvas and layer. This will undo any hides, shows, isolates, or other highlights performed on PMI components contained within this CADModel via ComponentPath calls.

Param in_canvas

The Canvas in which to perform the the operation

void ShowAllPMI (HPS.Canvas in_canvas, ulong in_layer)

Forces the visibility of all PMI on in the given Canvas and layer. This will undo any hides, shows, isolates, or other highlights performed on PMI components contained within this CADModel via ComponentPath calls.

Param in_canvas

The Canvas in which to perform the the operation

Param in_layer

The layer in the Canvas in which to perform the operation.

void Tessellate (HPS.Exchange.TessellationOptionsKit in_options)

Re-tessellate the given CADModel with the provided options. Tessellation occurs at the representation item level in Exchange. All representation items underneath this CADModel will be re-tessellated with the provided options. Additionally, only components for which there is BRep data can the tessellation be regenerated.

Param in_options

The options to use to generate the new tessellation for this CADModel

HPS.Exchange.TranslationNotifier Translate (HPS.Exchange.TranslationOptionsKit in_translation_options)

Asynchronously translates this CADModel into an array of Parasolid parts, using the options provided. A valid Parasolid session is required for this function to succeed. If this CADModel was imported in tessellation only mode an empty Parasolid assembly will be returned.

Param in_translation_options

Options used during the translation.

Return

An TranslationNotifier object that can be used to query the import progress and status.