The HPS::Exchange::ExportSTLOptionsKit class is a user space object. More...
#include <sprk_exchange.h>
Public Member Functions | |
ExportSTLOptionsKit () | |
The default constructor creates an empty ExportSTLOptionsKit object. More... | |
ExportSTLOptionsKit (ExportSTLOptionsKit const &in_kit) | |
The copy constructor creates a new ExportSTLOptionsKit object that contains the same settings as the source ExportSTLOptionsKit. More... | |
ExportSTLOptionsKit (ExportSTLOptionsKit &&in_that) | |
The move constructor creates an ExportSTLOptionsKit by transferring the underlying object of the rvalue reference to this ExportSTLOptionsKit. More... | |
virtual | ~ExportSTLOptionsKit () |
HPS::Type | ObjectType () const |
void | Set (ExportSTLOptionsKit const &in_kit) |
Copies the source ExportSTLOptionsKit into this ExportSTLOptionsKit. More... | |
void | Show (ExportSTLOptionsKit &out_kit) const |
Copies this ExportSTLOptionsKit into the given ExportSTLOptionsKit. More... | |
ExportSTLOptionsKit & | operator= (ExportSTLOptionsKit const &in_kit) |
Copies the source ExportSTLOptionsKit into this ExportSTLOptionsKit. More... | |
ExportSTLOptionsKit & | operator= (ExportSTLOptionsKit &&in_that) |
The move assignment operator transfers the underlying object of the rvalue reference to this ExportSTLOptionsKit. More... | |
bool | Empty () const |
Indicates whether this ExportSTLOptionsKit has any values set on it. More... | |
bool | Equals (ExportSTLOptionsKit const &in_kit) const |
Check if the source ExportSTLOptionsKit is equivalent to this ExportSTLOptionsKit. More... | |
bool | operator== (ExportSTLOptionsKit const &in_kit) const |
Check if the source ExportSTLOptionsKit is equivalent to this ExportSTLOptionsKit. More... | |
bool | operator!= (ExportSTLOptionsKit const &in_kit) const |
Check if the source ExportSTLOptionsKit is not equivalent to this ExportSTLOptionsKit. More... | |
ExportSTLOptionsKit & | SetBinary (bool in_state) |
Sets whether to write STL data in binary form. More... | |
ExportSTLOptionsKit & | SetTessellationLevel (Tessellation::Level in_level) |
Sets the predefined quality of the tessellation that will be generated for BRep data using the standard tessellation algorithm. More... | |
ExportSTLOptionsKit & | SetTessellationLevel (Tessellation::Chord::Limit in_limit_type, double in_limit, double in_angle_tolerance) |
Sets the user defined quality of the tessellation that will be generated for BRep data using the standard or accurate tessellation algorithm. More... | |
ExportSTLOptionsKit & | SetTessellationAccuracy (Tessellation::Accuracy in_type) |
Sets the accuracy of the tessellation that will be generated for BRep data. More... | |
ExportSTLOptionsKit & | SetCurrentTessellationRetention (bool in_state) |
Sets whether to keep the current tessellation. More... | |
ExportSTLOptionsKit & | SetMaximumEdgeLength (double in_length) |
Sets the maximum length of triangle edges in the tessellation generated for BRep data. More... | |
ExportSTLOptionsKit & | SetUnits (Units in_units) |
Sets the units to associate with the STL export. More... | |
ExportSTLOptionsKit & | UnsetBinary () |
Removes the binary export setting. More... | |
ExportSTLOptionsKit & | UnsetTessellationLevel () |
Removes the tessellation level setting. More... | |
ExportSTLOptionsKit & | UnsetTessellationAccuracy () |
Removes the tessellation accuracy setting. More... | |
ExportSTLOptionsKit & | UnsetCurrentTessellationRetention () |
Removes the current tessellation retention setting. More... | |
ExportSTLOptionsKit & | UnsetMaximumEdgeLength () |
Removes the tessellation maximum edge length setting. More... | |
ExportSTLOptionsKit & | UnsetUnits () |
Removes the units export setting. More... | |
ExportSTLOptionsKit & | UnsetEverything () |
Removes all settings from this ExportSTLOptionsKit. More... | |
bool | ShowBinary (bool &out_state) const |
Shows the binary export setting. More... | |
bool | ShowTessellationLevel (Tessellation::Type &out_type, Tessellation::Level &out_level, Tessellation::Chord::Limit &out_limit_type, double &out_limit, double &out_angle_tolerance) const |
Shows the tessellation level setting. More... | |
bool | ShowTessellationAccuracy (Tessellation::Accuracy &out_type) const |
Shows the tessellation accuracy setting. More... | |
bool | ShowCurrentTessellationRetention (bool &out_state) const |
Shows the current tessellation retention setting. More... | |
bool | ShowMaximumEdgeLength (double &out_length) const |
Shows the tessellation maximum edge length setting. More... | |
bool | ShowUnits (Units &out_units) const |
Shows the binary export setting. More... | |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. More... | |
virtual void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
bool | HasType (HPS::Type in_mask) const |
This function indicates whether this Object has the given Type mask. More... | |
intptr_t | GetClassID () const |
Returns a unique identifier that is shared by all objects of the same class. More... | |
intptr_t | GetInstanceID () const |
Returns an identifier that can be used to identify which instance of a class an object is. More... | |
Static Public Member Functions | |
static ExportSTLOptionsKit | GetDefault () |
Creates an ExportSTLOptionsKit which contains the default settings. More... | |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::ExchangeExportSTLOptionsKit |
The HPS::Exchange::ExportSTLOptionsKit class is a user space object.
It contains settings controlling how STL data is exported via Exchange. Calling HPS::Exchange::ExportSTLOptionsKit::GetDefault() will return an options kit with values found in here.
HPS::Exchange::ExportSTLOptionsKit::ExportSTLOptionsKit | ( | ) |
The default constructor creates an empty ExportSTLOptionsKit object.
HPS::Exchange::ExportSTLOptionsKit::ExportSTLOptionsKit | ( | ExportSTLOptionsKit const & | in_kit | ) |
The copy constructor creates a new ExportSTLOptionsKit object that contains the same settings as the source ExportSTLOptionsKit.
in_kit | The source ExportSTLOptionsKit to copy. |
HPS::Exchange::ExportSTLOptionsKit::ExportSTLOptionsKit | ( | ExportSTLOptionsKit && | in_that | ) |
The move constructor creates an ExportSTLOptionsKit by transferring the underlying object of the rvalue reference to this ExportSTLOptionsKit.
in_that | An rvalue reference to an ExportSTLOptionsKit to take the underlying object from. |
|
virtual |
|
inlinestaticinherited |
Unique identifier for this class.
Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.
|
virtual |
Indicates whether this ExportSTLOptionsKit has any values set on it.
Reimplemented from HPS::Object.
bool HPS::Exchange::ExportSTLOptionsKit::Equals | ( | ExportSTLOptionsKit const & | in_kit | ) | const |
Check if the source ExportSTLOptionsKit is equivalent to this ExportSTLOptionsKit.
in_kit | The source ExportSTLOptionsKit to compare to this ExportSTLOptionsKit. |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
static |
Creates an ExportSTLOptionsKit 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 import unless an option is overridden by the options passed to File::ExportSTL.
|
inherited |
Returns an identifier that can be used to identify which instance of a class an object is.
Different keys and controls will return the same value if they are backed by the same database resource.
|
inherited |
|
inlinevirtual |
bool HPS::Exchange::ExportSTLOptionsKit::operator!= | ( | ExportSTLOptionsKit const & | in_kit | ) | const |
Check if the source ExportSTLOptionsKit is not equivalent to this ExportSTLOptionsKit.
in_kit | The source ExportSTLOptionsKit to compare to this ExportSTLOptionsKit. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::operator= | ( | ExportSTLOptionsKit const & | in_kit | ) |
Copies the source ExportSTLOptionsKit into this ExportSTLOptionsKit.
in_kit | The source ExportSTLOptionsKit to copy. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::operator= | ( | ExportSTLOptionsKit && | in_that | ) |
The move assignment operator transfers the underlying object of the rvalue reference to this ExportSTLOptionsKit.
in_that | An rvalue reference to an ExportSTLOptionsKit to take the underlying object from. |
bool HPS::Exchange::ExportSTLOptionsKit::operator== | ( | ExportSTLOptionsKit const & | in_kit | ) | const |
Check if the source ExportSTLOptionsKit is equivalent to this ExportSTLOptionsKit.
in_kit | The source ExportSTLOptionsKit to compare to this ExportSTLOptionsKit. |
|
virtualinherited |
Resets this object to its initial, uninitialized state.
Reimplemented in HPS::EventHandler, HPS::EventDispatcher, HPS::World, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::SearchResults, and HPS::SearchResultsIterator.
void HPS::Exchange::ExportSTLOptionsKit::Set | ( | ExportSTLOptionsKit const & | in_kit | ) |
Copies the source ExportSTLOptionsKit into this ExportSTLOptionsKit.
in_kit | The source ExportSTLOptionsKit to copy. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::SetBinary | ( | bool | in_state | ) |
Sets whether to write STL data in binary form.
This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_bBinaryFile.
in_state | Whether to write STL data in binary form. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::SetCurrentTessellationRetention | ( | bool | in_state | ) |
Sets whether to keep the current tessellation.
This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_bKeepCurrentTessellation.
in_state | Whether to keep the current tessellation. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::SetMaximumEdgeLength | ( | double | in_length | ) |
Sets the maximum length of triangle edges in the tessellation generated for BRep data.
This is only relevant if the tessellation level is set to Tessellation::Level::UserDefined. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_dMaximalTriangleEdgeLength.
in_length | The maximum length of triangle edges in the tessellation generated for BRep data. The value must be non-negative. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::SetTessellationAccuracy | ( | Tessellation::Accuracy | in_type | ) |
Sets the accuracy of the tessellation that will be generated for BRep data.
in_type | The accuracy to use for tessellation generation. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::SetTessellationLevel | ( | Tessellation::Level | in_level | ) |
Sets the predefined quality of the tessellation that will be generated for BRep data using the standard tessellation algorithm.
This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_eTessellationLevelOfDetail.
in_level | The predefined quality of the tessellation that will be generated for BRep data using the standard tessellation algorithm. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::SetTessellationLevel | ( | Tessellation::Chord::Limit | in_limit_type, |
double | in_limit, | ||
double | in_angle_tolerance | ||
) |
Sets the user defined quality of the tessellation that will be generated for BRep data using the standard or accurate tessellation algorithm.
This implicitly sets A3DRWParamsExportStlData::m_eTessellationLevel to kA3DTessLODUserDefined.
in_limit_type | The type of the chord limit to be specified. |
in_limit | Either the ratio of the tessellation chord height to the bounding box height which should be in the range [50, 10000], or the maximum distance between the surface definition and the tessellation approximation, depending on the preceding argument. |
in_angle_tolerance | The maximum angle in degrees between two consecutive wire elements in the generated tessellation which should be in the range [10, 40]. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_dAngleToleranceDeg. |
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::SetUnits | ( | Units | in_units | ) |
Sets the units to associate with the STL export.
This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_eExportUnit. This function will result in a scale being applied to the exported model. The CADModel will NOT have a unit associated with it, since STL is a unit-less format. For example: exporting a cube with a 1mm side with Units set to Meter, will cause the side of the cube to shrink by a factor of 1000, since every unit in the file, which used to correspond to one mm, now corresponds to a meter. This is useful in the case where the STL file needs to be loaded in a scene alongside another model, so that the units of the two models can match.
in_units | The units to associate with the export. Passing Units::Unknown will preserve the original units. |
void HPS::Exchange::ExportSTLOptionsKit::Show | ( | ExportSTLOptionsKit & | out_kit | ) | const |
Copies this ExportSTLOptionsKit into the given ExportSTLOptionsKit.
out_kit | The ExportSTLOptionsKit to populate with the contents of this ExportSTLOptionsKit. |
bool HPS::Exchange::ExportSTLOptionsKit::ShowBinary | ( | bool & | out_state | ) | const |
Shows the binary export setting.
out_state | Whether to write STL data in binary form. |
bool HPS::Exchange::ExportSTLOptionsKit::ShowCurrentTessellationRetention | ( | bool & | out_state | ) | const |
Shows the current tessellation retention setting.
out_state | Whether to keep the current tessellation. |
bool HPS::Exchange::ExportSTLOptionsKit::ShowMaximumEdgeLength | ( | double & | out_length | ) | const |
Shows the tessellation maximum edge length setting.
out_length | The tessellation maximum edge length setting. |
bool HPS::Exchange::ExportSTLOptionsKit::ShowTessellationAccuracy | ( | Tessellation::Accuracy & | out_type | ) | const |
Shows the tessellation accuracy setting.
out_type | The type of the tessellation accuracy which was specified. |
bool HPS::Exchange::ExportSTLOptionsKit::ShowTessellationLevel | ( | Tessellation::Type & | out_type, |
Tessellation::Level & | out_level, | ||
Tessellation::Chord::Limit & | out_limit_type, | ||
double & | out_limit, | ||
double & | out_angle_tolerance | ||
) | const |
Shows the tessellation level setting.
out_type | The type of the tessellation level setting which was specified. |
out_level | The predefined quality of the tessellation that will be generated for BRep data using the standard tessellaiton algorithm. This is only valid if out_type is Tessellation::Type::Standard. |
out_limit_type | The type of chord limit which was specified. This is only valid if out_type is Tessellation::Type::Custom. |
out_limit | The chord limit to use to generate tessellation for BRep data. Its interpretation depends on the preceding argument. This is only valid if out_type is Tessellation::Type::Custom. |
out_angle_tolerance | The maximum angle in degrees between two consecutive wire elements in the generated tessellation. This is only valid if out_type is Tessellation::Type::Custom. |
bool HPS::Exchange::ExportSTLOptionsKit::ShowUnits | ( | Units & | out_units | ) | const |
Shows the binary export setting.
out_state | The units that will be associated with this export. |
|
virtualinherited |
This function returns the true type of the underlying object.
This function is useful for finding the type of smart pointer objects that have been cast to more generic types.
Reimplemented in HPS::UpdateOptionsControl, HPS::HighlightControl, HPS::SelectionOptionsControl, HPS::OffScreenWindowOptionsControl, HPS::ApplicationWindowOptionsControl, HPS::StandAloneWindowOptionsControl, HPS::AttributeLockControl, HPS::WindowInfoControl, HPS::DebuggingControl, HPS::SubwindowControl, HPS::ContourLineControl, HPS::VisualEffectsControl, HPS::TransformMaskControl, HPS::PostProcessEffectsControl, HPS::DrawingAttributeControl, HPS::HiddenLineAttributeControl, HPS::PerformanceControl, HPS::NURBSSurfaceAttributeControl, HPS::ConditionControl, HPS::StyleControl, HPS::PortfolioControl, HPS::MaterialMappingControl, HPS::TextureMatrixControl, HPS::ModellingMatrixControl, HPS::CurveAttributeControl, HPS::EdgeAttributeControl, HPS::LineAttributeControl, HPS::TextAttributeControl, HPS::CuttingSectionAttributeControl, HPS::CylinderAttributeControl, HPS::LightingAttributeControl, HPS::SphereAttributeControl, HPS::MarkerAttributeControl, HPS::CullingControl, HPS::ColorInterpolationControl, HPS::TransparencyControl, HPS::SelectabilityControl, HPS::CameraControl, HPS::VisibilityControl, HPS::BoundingControl, HPS::Kit, and HPS::Control.
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::UnsetBinary | ( | ) |
Removes the binary export setting.
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::UnsetCurrentTessellationRetention | ( | ) |
Removes the current tessellation retention setting.
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::UnsetEverything | ( | ) |
Removes all settings from this ExportSTLOptionsKit.
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::UnsetMaximumEdgeLength | ( | ) |
Removes the tessellation maximum edge length setting.
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::UnsetTessellationAccuracy | ( | ) |
Removes the tessellation accuracy setting.
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::UnsetTessellationLevel | ( | ) |
Removes the tessellation level setting.
ExportSTLOptionsKit& HPS::Exchange::ExportSTLOptionsKit::UnsetUnits | ( | ) |
Removes the units export setting.
|
static |