CADModel

class HPS.CADModel : public HPS.Component

The CADModel class is a smart pointer. It represents the root Component for a structured file format.

Subclassed by HPS.DWG.CADModel, HPS.Exchange.CADModel, HPS.Parasolid.CADModel

Public Functions

HPS.View ActivateDefaultCapture ()

Creates a new View object corresponding to the default capture for this CADModel. The View object that is returned will have the corresponding visibility settings, material settings, transformation settings, and camera for the default capture set on it.

Return

A newly created View object corresponding to this Capture.

CADModel ()

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

CADModel (HPS.CADModel in_that)

The copy constructor creates a CADModel object that shares the underlying smart-pointer of the source CADModel.

Param in_that

The source 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 a CADModel object. Otherwise the copy will fail and the resulting CADModel will be invalid.

Param in_that

The source Component to copy.

CADModel (HPS.Model in_that)

This constructor creates a CADModel object that is associated with the given Model. This will throw an exception if the given Model is not associated with a CADModel.

Param in_that

The source Model to use to find the associated CADModel.

override void Dispose ()
HPS.Filter[] GetActiveFilters (HPS.View in_view)

Get a list of the active filters on the given View.

Param in_view

The View for which to get the active filters.

Return

A list of the active filters on the given View.

HPS.Capture[] GetAllCaptures ()

Get a list of all captures from all subcomponents for this CADModel.

Return

A list of all captures from all subcomponents for this CADModel.

HPS.Filter[] GetAllFilters ()

Get a list of all filters from all subcomponents for this CADModel.

Return

A list of all filters from all subcomponents for this CADModel.

HPS.Component GetComponentFromKey (HPS.Key in_key)

Find the Component associated with the given Key (if any).

Param in_key

The Key from which to find the associated Component.

Return

The Component associated with the given Key (if any).

HPS.ComponentPath GetComponentPath (HPS.KeyPath in_key_path)

Get the ComponentPath which corresponds to the given KeyPath.

The returned path will contain the Components which occurs along the given KeyPath, up to the CADModel.

If the path type requested is Unique, Components associated with keys which are implicitly along the key path will be included in the returned path, provided they can be determined unambiguously.

If the path type requested is Complete, all Components associated with keys which are implicitly along the path will be included in the returned path, if an entry cannot be determined unambiguously, it will be filled with the first eligible component found.

Example: a component with two owners will select the first owner out of the two, if the key path does not specify which of the two owners to consider, when using a Complete path type. It will instead not include any of the two owners when using Unique path type.

This function will throw an InvalidSpecificationException if the provided key path does not proceed from leaf to root. An error will be logged if the key path is ambiguous, and only components associated with the explicit keys in the key path will be returned in this case.

Param in_key_path

The KeyPath for which to compute the corresponding ComponentPath.

Return

The ComponentPath corresponding to the given KeyPath.

HPS.ComponentPath GetComponentPath (HPS.KeyPath in_key_path, HPS.ComponentPath.PathType in_path_type)

Get the ComponentPath which corresponds to the given KeyPath.

The returned path will contain the Components which occurs along the given KeyPath, up to the CADModel.

If the path type requested is Unique, Components associated with keys which are implicitly along the key path will be included in the returned path, provided they can be determined unambiguously.

If the path type requested is Complete, all Components associated with keys which are implicitly along the path will be included in the returned path, if an entry cannot be determined unambiguously, it will be filled with the first eligible component found.

Example: a component with two owners will select the first owner out of the two, if the key path does not specify which of the two owners to consider, when using a Complete path type. It will instead not include any of the two owners when using Unique path type.

This function will throw an InvalidSpecificationException if the provided key path does not proceed from leaf to root. An error will be logged if the key path is ambiguous, and only components associated with the explicit keys in the key path will be returned in this case.

Param in_key_path

The KeyPath for which to compute the corresponding ComponentPath.

Param in_path_type

The type of ComponentPath returned by this function.

Return

The ComponentPath corresponding to the given KeyPath.

HPS.ComponentPath GetComponentPath (HPS.SelectionItem in_item)

Get the ComponentPath which corresponds to the given SelectionItem. The returned path will be the Component associated with each key which occurs along the KeyPath associated with the SelectionItem, up to the CADModel.

If the path type requested is Unique, Components associated with keys which are implicitly along the key path will be included in the returned path, provided they can be determined unambiguously.

If the path type requested is Complete, all Components associated with keys which are implicitly along the path will be included in the returned path, if an entry cannot be determined unambiguously, it will be filled with the first eligible component found.

Example: a component with two owners will select the first owner out of the two, if the key path associated with the selection path does not specify which of the two owners to consider, when using a Complete path type. It will instead not include any of the two owners when using Unique path type.

This function will throw an InvalidSpecificationException if the provided key path does not proceed from leaf to root. An error will be logged if the key path is ambiguous, and only components associated with the explicit keys in the key path will be returned in this case.

Param in_item

The SelectionItem for which to compute the corresponding ComponentPath.

Return

The ComponentPath corresponding to the given SelectionItem.

HPS.ComponentPath GetComponentPath (HPS.SelectionItem in_item, HPS.ComponentPath.PathType in_path_type)

Get the ComponentPath which corresponds to the given SelectionItem. The returned path will be the Component associated with each key which occurs along the KeyPath associated with the SelectionItem, up to the CADModel.

If the path type requested is Unique, Components associated with keys which are implicitly along the key path will be included in the returned path, provided they can be determined unambiguously.

If the path type requested is Complete, all Components associated with keys which are implicitly along the path will be included in the returned path, if an entry cannot be determined unambiguously, it will be filled with the first eligible component found.

Example: a component with two owners will select the first owner out of the two, if the key path associated with the selection path does not specify which of the two owners to consider, when using a Complete path type. It will instead not include any of the two owners when using Unique path type.

This function will throw an InvalidSpecificationException if the provided key path does not proceed from leaf to root. An error will be logged if the key path is ambiguous, and only components associated with the explicit keys in the key path will be returned in this case.

Param in_item

The SelectionItem for which to compute the corresponding ComponentPath.

Param in_path_type

The type of ComponentPath returned by this function.

Return

The ComponentPath corresponding to the given SelectionItem.

HPS.Model GetModel ()

Get the Model associated with this CADModel.

Return

The Model associated with this CADModel.

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.

void ResetVisibility (HPS.Canvas in_canvas)

Resets the visibility in the view specified by the given Canvas and layer. This will undo any hides, shows or isolates performed on components contained within this CADModel via ComponentPath calls.

See

ComponentPath.Hide

See

ComponentPath.Show

See

ComponentPath.Isolate

Param in_canvas

The Canvas in which to perform the the visibility reset.

void ResetVisibility (HPS.Canvas in_canvas, ulong in_layer)

Resets the visibility in the view specified by the given Canvas and layer. This will undo any hides, shows or isolates performed on components contained within this CADModel via ComponentPath calls.

See

ComponentPath.Hide

See

ComponentPath.Show

See

ComponentPath.Isolate

Param in_canvas

The Canvas in which to perform the the visibility reset.

Param in_layer

The layer in the Canvas in which to perform the visibility reset.