HPS::Exchange::TranslationOptionsKit

class HPS::Exchange::TranslationOptionsKit : public HPS::SprocketKit

The HPS::Exchange::TranslationOptionsKit class is a user space object. It contains settings controlling what and how data is translated to Parasolid by Exchange. Calling HPS::Exchange::TranslationOptionsKit::GetDefault() will return an options kit with values found in here.

Public Functions

virtual bool Empty() const

Indicates whether this TranslationOptionsKit has any values set on it.

Returns

true if no values are set on this TranslationOptionsKit, false otherwise.

bool Equals(TranslationOptionsKit const &in_kit) const

Check if the source TranslationOptionsKit is equivalent to this TranslationOptionsKit.

Parameters

in_kit – The source TranslationOptionsKit to compare to this TranslationOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

inline virtual HPS::Type ObjectType() const

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.

bool operator!=(TranslationOptionsKit const &in_kit) const

Check if the source TranslationOptionsKit is not equivalent to this TranslationOptionsKit.

Parameters

in_kit – The source TranslationOptionsKit to compare to this TranslationOptionsKit.

Returns

true if the objects are not equivalent, false otherwise.

TranslationOptionsKit &operator=(TranslationOptionsKit &&in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this TranslationOptionsKit thereby avoiding a copy.

Parameters

in_that – An rvalue reference to an TranslationOptionsKit to take the impl from.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &operator=(TranslationOptionsKit const &in_kit)

Copies the source TranslationOptionsKit into this TranslationOptionsKit.

Parameters

in_kit – The source TranslationOptionsKit to copy.

Returns

A reference to this TranslationOptionsKit.

bool operator==(TranslationOptionsKit const &in_kit) const

Check if the source TranslationOptionsKit is equivalent to this TranslationOptionsKit.

Parameters

in_kit – The source TranslationOptionsKit to compare to this TranslationOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

void Set(TranslationOptionsKit const &in_kit)

Copies the source TranslationOptionsKit into this TranslationOptionsKit.

Parameters

in_kit – The source TranslationOptionsKit to copy.

TranslationOptionsKit &SetAccurateEdges(Translation::AccurateEdges in_accurate_edges)

Sets whether accurate edges will be computed as part of the translation. This corresponds to the value that will be passed to A3DRWParamsTranslateToPkPartsData::m_eComputeAccurateEdges.

Parameters

in_accurate_edges – Whether to compute accurate edges.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetApplication(char const *in_name)

Sets the application name to put in the Parasolid data. This corresponds to the value that will be passed to A3DRWParamsExportParasolidData::m_pcApplication.

Parameters

in_name – UTF8-encoded application name to put in the Parasolid data.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetDisjointFaces(bool in_state)

Sets whether erroneous faces can be disjointed from their solids as part of the translation. This corresponds to the value that will be passed to A3DRWParamsTranslateToPkPartsData::m_bDisjoinIfFaceFaceError.

Parameters

in_state – Whether to disjoin erroneous faces from their owning solids.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetEntityMerging(Translation::Merging in_merging)

Sets whether entities can be merged as part of the translation. This corresponds to the value that will be passed to A3DRWParamsTranslateToPkPartsData::m_eMergeEntities.

Parameters

in_merging – Whether to merge entities.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetExplodeMultiBodies(bool in_state)

Sets whether to explode multi-connexes B-reps into multiple bodies. This corresponds to the value that will be passed to A3DRWParamsExportParasolidData::m_bExplodeMultiBodies.

See

Default value

Parameters

in_state – Whether to explode multi-connexes B-reps into multiple bodies.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetHealing(Translation::Healing in_healing)

Sets whether healing will be performed as part of the translation. This corresponds to the value that will be passed to A3DRWParamsTranslateToPkPartsData::m_eHealing.

Parameters

in_healing – Whether to perform healing.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetHiddenObjects(bool in_state)

Sets whether to export hidden objects. This corresponds to the value that will be passed to A3DRWParamsExportParasolidData::m_bWriteBlankedEntities.

See

Default value

Parameters

in_state – Whether to export hidden objects.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetMultiProcessCount(unsigned int in_count)

Sets the number of processes to use when performing translation. This should be a value between 1 and the number of cores on your system.

Note

Presently this option is only used for translations performed when using HPS::ExchangeParsolid::File::Import and HPS::ExchangeParasolid::File::Reload.

Parameters

in_count – The number of processes to use when performing translation.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetSewing(bool in_state, double in_tolerance = 0.0)

Sets whether perform sewing as part of the translation.

Parameters
  • in_state – Whether to perform sewing.

  • in_tolerance – The sewing tolerance in millimeters.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetSimplification(Translation::Simplification in_simplification)

Sets whether geometry can be simplified as part of the translation. This corresponds to the value that will be passed to A3DRWParamsTranslateToPkPartsData::m_eSimplifyGeometry.

Parameters

in_simplification – Whether to simplify geometry.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetSolidsAsFaces(bool in_state)

Sets whether to convert solids to a set of independent faces for export. This corresponds to the value that will be passed to A3DRWParamsExportIgesData::m_bSaveSolidsAsFaces.

See

Default value

Parameters

in_state – Whether to convert solids to a set of independent faces for export.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetTessellation(bool in_state)

Sets whether to export tessellation data. This corresponds to the value that will be passed to A3DRWParamsExportParasolidData::m_bWriteTessellation.

See

Default value

Parameters

in_state – Whether to export tessellation data.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &SetVersion(char const *in_version)

Sets the version string to put in the Parasolid data. This corresponds to the value that will be passed to A3DRWParamsExportParasolidData::m_pcVersion.

Parameters

in_version – UTF8-encoded version string to put in the Parasolid data.

Returns

A reference to this TranslationOptionsKit.

void Show(TranslationOptionsKit &out_kit) const

Copies this TranslationOptionsKit into the given TranslationOptionsKit.

Parameters

out_kit – The TranslationOptionsKit to populate with the contents of this TranslationOptionsKit.

bool ShowAccurateEdges(Translation::AccurateEdges &out_accurate_edges) const

Shows the accurate edges setting.

Parameters

out_accurate_edges – Whether to compute accurate edges for translation.

Returns

true if an accurate edges setting was specified, false otherwise.

bool ShowApplication(UTF8 &out_name) const

Shows the application name setting.

Parameters

out_name – The application name to put in the Parasolid data.

Returns

true if an application name setting was specified, false otherwise.

bool ShowDisjointFaces(bool &out_state) const

Shows the disjoin faces setting.

Parameters

out_state – Whether to disjoin erroneous faces from their owning solids.

Returns

true if a disjoin faces setting was specified, false otherwise.

bool ShowEntityMerging(Translation::Merging &out_merging) const

Shows the merging setting.

Parameters

out_merging – Whether to merge entities for translation.

Returns

true if a merging setting was specified, false otherwise.

bool ShowExplodeMultiBodies(bool &out_state) const

Shows the explode multi bodies setting.

Parameters

out_state – The explode multi bodies setting to put in the Parasolid data.

Returns

true if a explode multi bodies setting was specified, false otherwise.

bool ShowHealing(Translation::Healing &out_healing) const

Shows the healing setting.

Parameters

out_healing – Whether to heal data for translation.

Returns

true if a healing setting was specified, false otherwise.

bool ShowHiddenObjects(bool &out_state) const

Shows the hidden object translation setting.

Parameters

out_state – Whether to translate hidden objects.

Returns

true if a hidden object export setting was specified, false otherwise.

bool ShowMultiProcessCount(unsigned int &out_count) const

Shows the multi-process count setting.

Parameters

out_count – The number of processes to use when performing translation.

Returns

true if a multi-process count setting was specified, false otherwise.

bool ShowSewing(bool &out_state, double &out_tolerance) const

Shows the sewing setting.

Parameters
  • out_state – Whether to perform sewing for translation.

  • out_tolerance – The sewing tolerance. Only valid if out_state is true.

Returns

true if a sewing setting was specified, false otherwise.

bool ShowSimplification(Translation::Simplification &out_simplification) const

Shows the simplification setting.

Parameters

out_simplification – Whether to simplify geometry for translation.

Returns

true if a simplification setting was specified, false otherwise.

bool ShowSolidsAsFaces(bool &out_state) const

Shows the solids to faces conversion setting.

Parameters

out_state – Whether to convert solids to a set of independent faces for translation.

Returns

true if a solids to faces conversion setting was specified, false otherwise.

bool ShowTessellation(bool &out_state) const

Shows the tessellation translation setting.

Parameters

out_state – Whether to export tessellation data.

Returns

true if a tessellation export setting was specified, false otherwise.

bool ShowVersion(UTF8 &out_version) const

Shows the version string setting.

Parameters

out_version – The version string to put in the Parasolid data.

Returns

true if a version string setting was specified, false otherwise.

TranslationOptionsKit()

The default constructor creates an empty TranslationOptionsKit object.

TranslationOptionsKit(TranslationOptionsKit &&in_that)

The move constructor creates a TranslationOptionsKit by transferring the underlying impl of the rvalue reference to this TranslationOptionsKit thereby avoiding a copy and allocation.

Parameters

in_that – An rvalue reference to an TranslationOptionsKit to take the impl from.

TranslationOptionsKit(TranslationOptionsKit const &in_kit)

The copy constructor creates a new TranslationOptionsKit object that contains the same settings as the source TranslationOptionsKit.

Parameters

in_kit – The source TranslationOptionsKit to copy.

TranslationOptionsKit &UnsetAccurateEdges()

Removes the accurate edges setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetApplication()

Removes the application name setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetDisjointFaces()

Removes the disjoin faces setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetEntityMerging()

Removes the merging setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetEverything()

Removes all settings from this TranslationOptionsKit.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetExplodeMultiBodies()

Removes the explode multi bodies setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetHealing()

Removes the healing setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetHiddenObjects()

Removes the hidden objects export setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetMultiProcessCount()

Removes the multi-process count setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetSewing()

Removes the sewing setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetSimplification()

Removes the simplification setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetSolidsAsFaces()

Removes the solids to faces conversion setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetTessellation()

Removes the tessellation export setting.

Returns

A reference to this TranslationOptionsKit.

TranslationOptionsKit &UnsetVersion()

Removes the version string setting.

Returns

A reference to this TranslationOptionsKit.

virtual ~TranslationOptionsKit()

Public Static Functions

static TranslationOptionsKit GetDefault()

Creates a TranslationOptionsKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default. These values will be used for translation unless an option is overridden by the options passed to one of the Translate functions.

Returns

A TranslationOptionsKit with the default settings.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::ExchangeTranslationOptionsKit