HPS::Exchange::CADModel Class Reference

#include <sprk_exchange.h>

Inheritance diagram for HPS::Exchange::CADModel:
HPS::CADModel HPS::Component HPS::Sprocket HPS::Object

Public Member Functions

 CADModel ()
 
 CADModel (Component const &in_that)
 
 CADModel (HPS::CADModel const &in_that)
 
 CADModel (Exchange::CADModel const &in_that)
 
 CADModel (Exchange::CADModel &&in_that)
 
HPS::Component GetComponentFromEntity (A3DEntity *in_entity) const
 
ConfigurationArray GetConfigurations () const
 
UTF8Array GetCurrentConfiguration () const
 
bool GetEntityOwnership () const
 
A3DEntity * GetExchangeEntity () const
 
SheetArray GetSheets () const
 
void HideAllPMI (Canvas &in_canvas, size_t in_layer=0)
 
HPS::Type ObjectType () const
 
CADModeloperator= (Exchange::CADModel &&in_that)
 
ReloadNotifier Reload (TessellationOptionsKit const &in_options=TessellationOptionsKit(), TranslationOptionsKit const &in_translation_options=TranslationOptionsKit())
 
bool ReplaceExchangeEntity (Component const &in_component, A3DEntity *in_a3d_entity)
 
void SetAllPMIInFront (bool in_enable, Canvas &in_canvas, size_t in_layer=0)
 
void ShowAllPMI (Canvas &in_canvas, size_t in_layer=0)
 
void Tessellate (TessellationOptionsKit const &in_options)
 
TranslationNotifier Translate (TranslationOptionsKit const &in_translation_options)
 
- Public Member Functions inherited from HPS::CADModel
View ActivateDefaultCapture ()
 
 CADModel ()
 
 CADModel (Component const &in_that)
 
 CADModel (CADModel const &in_that)
 
 CADModel (CADModel &&in_that)
 
 CADModel (Model const &in_that)
 
FilterArray GetActiveFilters (View const &in_view) const
 
CaptureArray GetAllCaptures () const
 
FilterArray GetAllFilters () const
 
Component GetComponentFromKey (Key const &in_key) const
 
ComponentPath GetComponentPath (KeyPath const &in_key_path, ComponentPath::PathType in_path_type=ComponentPath::PathType::Unique) const
 
ComponentPath GetComponentPath (SelectionItem const &in_item, ComponentPath::PathType in_path_type=ComponentPath::PathType::Unique) const
 
Model GetModel () const
 
CADModeloperator= (CADModel &&in_that)
 
void ResetVisibility (Canvas &in_canvas, size_t in_layer=0)
 
- Public Member Functions inherited from HPS::Component
void AddKey (Key const &in_key)
 
void AddOwner (Component &in_owner, IncludeKey const &in_include=IncludeKey())
 
void AddReference (Component &in_reference)
 
bool AddTransform (MatrixKit const &in_transform)
 
virtual void Assign (Component const &in_that)
 
 Component ()
 
 Component (Component const &in_that)
 
 Component (Component &&in_that)
 
Component CopyTo (HPS::Component const &in_new_owner)
 
void Delete (HPS::Component::DeleteMode mode=HPS::Component::DeleteMode::Standard)
 
bool Equals (Component const &in_that) const
 
void Flush ()
 
MetadataArray GetAllMetadata () const
 
ComponentArray GetAllSubcomponents (ComponentType in_type) const
 
ComponentType GetComponentType () const
 
KeyArray GetKeys () const
 
Metadata GetMetadata (char const *in_name) const
 
UTF8 GetName () const
 
ComponentArray GetOwners () const
 
ComponentArray GetReferences () const
 
ComponentArray GetReferrers () const
 
ComponentArray GetSubcomponents () const
 
bool HasComponentType (ComponentType in_mask) const
 
bool operator!= (Component const &in_that) const
 
Componentoperator= (Component const &in_that)
 
Componentoperator= (Component &&in_that)
 
bool operator== (Component const &in_that) const
 
bool SetName (char const *in_new_name)
 
bool SetTransform (MatrixKit const &in_transform)
 
virtual ~Component ()
 
- Public Member Functions inherited from HPS::Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
 Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::ExchangeCADModel
 
- Static Public Attributes inherited from HPS::CADModel
static const HPS::Type staticType = HPS::Type::CADModel
 
- Static Public Attributes inherited from HPS::Component
static const HPS::Type staticType = HPS::Type::Component
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Public Types inherited from HPS::Component
enum  ComponentType : uint32_t {
  None = 0x00000000, GenericMask = 0xfffff000, ComponentType::ExchangeComponentMask = 0x00001000, ComponentType::ExchangeModelFile = 0x00001001,
  ComponentType::ExchangeProductOccurrence = 0x00001002, ComponentType::ExchangePartDefinition = 0x00001003, ComponentType::ExchangeView = 0x00001004, ComponentType::ExchangeFilter = 0x00001005,
  ComponentType::ExchangeRepresentationItemMask = 0x00003000, ComponentType::ExchangeRIBRepModel = 0x00003001, ComponentType::ExchangeRICurve = 0x00003002, ComponentType::ExchangeRIDirection = 0x00003003,
  ComponentType::ExchangeRIPlane = 0x00003004, ComponentType::ExchangeRIPointSet = 0x00003005, ComponentType::ExchangeRIPolyBRepModel = 0x00003006, ComponentType::ExchangeRIPolyWire = 0x00003007,
  ComponentType::ExchangeRISet = 0x00003008, ComponentType::ExchangeRICoordinateSystem = 0x00003009, ComponentType::ExchangeTopologyMask = 0x00005000, ComponentType::ExchangeTopoBody = 0x00005001,
  ComponentType::ExchangeTopoConnex = 0x00005002, ComponentType::ExchangeTopoShell = 0x00005003, ComponentType::ExchangeTopoFace = 0x00005004, ComponentType::ExchangeTopoLoop = 0x00005005,
  ComponentType::ExchangeTopoCoEdge = 0x00005006, ComponentType::ExchangeTopoEdge = 0x00005007, ComponentType::ExchangeTopoVertex = 0x00005008, ComponentType::ExchangeTopoSingleWireBody = 0x00005009,
  ComponentType::ExchangeTopoWireEdge = 0x0000500a, ComponentType::ExchangeDrawingMask = 0x00009000, ComponentType::ExchangeDrawingModel = 0x00009001, ComponentType::ExchangeDrawingView = 0x00009002,
  ComponentType::ExchangeDrawingSheet = 0x00009003, ComponentType::ExchangeBasicDrawingBlock = 0x00009004, ComponentType::ExchangeOperatorDrawingBlock = 0x00009005, ComponentType::ExchangePMIMask = 0x00011000,
  ComponentType::ExchangePMI = ExchangePMIMask, ComponentType::ExchangePMIText = 0x00011100, ComponentType::ExchangePMIRichText = 0x00011200, ComponentType::ExchangePMIRoughness = 0x00011300,
  ComponentType::ExchangePMIGDT = 0x00011400, ComponentType::ExchangePMIDatum = 0x00011500, ComponentType::ExchangePMILineWelding = 0x00011600, ComponentType::ExchangePMISpotWelding = 0x00011700,
  ComponentType::ExchangePMIDimension = 0x00011800, ComponentType::ExchangePMIBalloon = 0x00011900, ComponentType::ExchangePMICoordinate = 0x00011a00, ComponentType::ExchangePMIFastener = 0x00011b00,
  ComponentType::ExchangePMILocator = 0x00011c00, ComponentType::ExchangePMIMeasurementPoint = 0x00011d00, ComponentType::ParasolidComponentMask = 0x00020000, ComponentType::ParasolidModelFile = 0x00020001,
  ComponentType::ParasolidAssembly = 0x00020002, ComponentType::ParasolidInstance = 0x00020003, ComponentType::ParasolidTopologyMask = 0x00060000, ComponentType::ParasolidTopoBody = 0x00060001,
  ComponentType::ParasolidTopoRegion = 0x00060002, ComponentType::ParasolidTopoShell = 0x00060003, ComponentType::ParasolidTopoFace = 0x00060004, ComponentType::ParasolidTopoLoop = 0x00060005,
  ComponentType::ParasolidTopoFin = 0x00060006, ComponentType::ParasolidTopoEdge = 0x00060007, ComponentType::ParasolidTopoVertex = 0x00060008, ComponentType::DWGComponentMask = 0x00100000,
  ComponentType::DWGModelFile = 0x00100001, ComponentType::DWGLayout = 0x00100002, ComponentType::DWGBlockTable = 0x00100003, ComponentType::DWGBlockTableRecord = 0x00100004,
  ComponentType::DWGEntity = 0x00100005, ComponentType::DWGLayerTable = 0x00100006, ComponentType::DWGLayer = 0x00100007, ComponentType::UserComponent = 0x01000000
}





 
enum  DeleteMode { Standard, Full, StandardAndExchange }
 
- Static Public Member Functions inherited from HPS::Component
static KeyPathArray GetKeyPath (Component const &in_component)
 
static KeyPathArray GetKeyPath (size_t in_count, Component const in_components[])
 
static KeyPathArray GetKeyPath (ComponentArray const &in_components)
 
- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CADModel() [1/5]

HPS::Exchange::CADModel::CADModel ( )

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

◆ CADModel() [2/5]

HPS::Exchange::CADModel::CADModel ( Component const &  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.

Parameters
in_thatThe source Component to copy.

◆ CADModel() [3/5]

HPS::Exchange::CADModel::CADModel ( HPS::CADModel const &  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.

Parameters
in_thatThe source HPS::CADModel to copy.

◆ CADModel() [4/5]

HPS::Exchange::CADModel::CADModel ( Exchange::CADModel const &  in_that)

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

Parameters
in_thatThe source Exchange::CADModel to copy.

◆ CADModel() [5/5]

HPS::Exchange::CADModel::CADModel ( Exchange::CADModel &&  in_that)

The move constructor creates an Exchange::CADModel by transferring the underlying object of the rvalue reference to this Exchange::CADModel.

Parameters
in_thatAn rvalue reference to an Exchange::CADModel to take the underlying object from.

Member Function Documentation

◆ GetComponentFromEntity()

HPS::Component HPS::Exchange::CADModel::GetComponentFromEntity ( A3DEntity *  in_entity) const

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

Parameters
in_entityThe A3DEntity pointer from which to find the associated Component.
Returns
The Component associated with the given A3DEntity pointer, or an empty component if there is no such Component.

◆ GetConfigurations()

ConfigurationArray HPS::Exchange::CADModel::GetConfigurations ( ) const

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.

Returns
The list of configurations for this CADModel.

◆ GetCurrentConfiguration()

UTF8Array HPS::Exchange::CADModel::GetCurrentConfiguration ( ) const

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.

Returns
The current configuration for this CADModel.

◆ GetEntityOwnership()

bool HPS::Exchange::CADModel::GetEntityOwnership ( ) const

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.

Returns
Whether this CADModel owns the associated A3DAsmModelFile.

◆ GetExchangeEntity()

A3DEntity* HPS::Exchange::CADModel::GetExchangeEntity ( ) const

Gets the A3DEntity pointer corresponding to this Exchange::CADModel.

Returns
The A3DEntity pointer corresponding to this Exchange::CADModel.

◆ HideAllPMI()

void HPS::Exchange::CADModel::HideAllPMI ( Canvas in_canvas,
size_t  in_layer = 0 
)

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.

Parameters
in_canvasThe Canvas in which to perform the the operation
in_layerThe layer in the Canvas in which to perform the operation.

◆ ObjectType()

HPS::Type HPS::Exchange::CADModel::ObjectType ( ) const
inlinevirtual

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).

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

Reimplemented from HPS::CADModel.

◆ operator=()

CADModel& HPS::Exchange::CADModel::operator= ( Exchange::CADModel &&  in_that)

The move assignment operator transfers the underlying object of the rvalue reference to this Exchange::CADModel.

Parameters
in_thatAn rvalue reference to an Exchange::CADModel to take the underlying object from.
Returns
A reference to this Exchange::CADModel.

◆ Reload()

ReloadNotifier HPS::Exchange::CADModel::Reload ( TessellationOptionsKit const &  in_options = TessellationOptionsKit(),
TranslationOptionsKit const &  in_translation_options = TranslationOptionsKit() 
)

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

Parameters
in_optionsThe options to use to generate tessellations for new Components (if necessary).
in_translation_optionsThe 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.

◆ ReplaceExchangeEntity()

bool HPS::Exchange::CADModel::ReplaceExchangeEntity ( Component const &  in_component,
A3DEntity *  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.

Parameters
in_componentThe component whose entity is to be replaced.
in_a3d_entityThe new entity that will be associated with in_component.
Returns
true if the new entity was associated successfully, false otherwise.
See also
Reload

◆ SetAllPMIInFront()

void HPS::Exchange::CADModel::SetAllPMIInFront ( bool  in_enable,
Canvas in_canvas,
size_t  in_layer = 0 
)

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

Parameters
in_enableDictates whether the pmi will be forced in front or not.
in_canvasThe Canvas in which to perform the the operation
in_layerThe layer in the Canvas in which to perform the operation.

◆ ShowAllPMI()

void HPS::Exchange::CADModel::ShowAllPMI ( Canvas in_canvas,
size_t  in_layer = 0 
)

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.

Parameters
in_canvasThe Canvas in which to perform the the operation
in_layerThe layer in the Canvas in which to perform the operation.

◆ Tessellate()

void HPS::Exchange::CADModel::Tessellate ( TessellationOptionsKit const &  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.

Parameters
in_optionsThe options to use to generate the new tessellation for this CADModel

◆ Translate()

TranslationNotifier HPS::Exchange::CADModel::Translate ( TranslationOptionsKit const &  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.

Parameters
in_translation_optionsOptions used during the translation.
Returns
An TranslationNotifier object that can be used to query the import progress and status.

The documentation for this class was generated from the following file: