HPS::Exchange::CommonMeasurementOperator
-
class HPS::Exchange::CommonMeasurementOperator : public HPS::Operator
The CommonMeasurementOperator class defines an operator which contains many often used functions when inserting measurements. Users can build a custom measurement operator by deriving from this class. This operator requires the model be loaded using the Exchange bridge, and the model must contain B-rep.
Subclassed by HPS::Exchange::MeasurementOperator
Public Functions
-
void DeleteMeasurements()
Deletes all measurements
-
MaterialMappingKit GetMaterial() const
Returns the material used for the measurements
-
SegmentKey GetMeasurementSegment() const
Returns the top measurement segment containing all measurements
-
inline virtual HPS::UTF8 GetName() const override
Returns the name of the operator.
-
size_t GetPrecision() const
Returns the precision used in the measurement (number of digits after the decimal point)
-
TextAttributeKit GetTextAttributes() const
Returns the text attributes used for the measurements
-
virtual void OnViewAttached(HPS::View const &in_attached_view) override
This function is called whenever a view is attached to this operator.
- Parameters
in_attached_view – The view attached to this operator.
-
virtual void OnViewDetached(HPS::View const &in_detached_view) override
This function is called whenever a view is detached from this operator.
- Parameters
in_detached_view – The view detached from this operator.
-
void SetMaterial(MaterialMappingKit const &in_material_mapping)
Changes the material used for the measurements. Affects all measurements, even those already inserted.
-
void SetPrecision(size_t in_precision)
Changes the precision used in the measurement (number of digits after the decimal point) Only affects future measurements.
-
void SetTextAttribute(TextAttributeKit const &in_text_attributes)
Changes the text attributes used for the measurements. Affects all measurements, even those already inserted.
Public Static Functions
-
class MeasurementDeletedEvent : public HPS::Event
Public Functions
-
inline virtual Event *Clone() const
Allocates and returns a copy of this MeasurementDeletedEvent.
- Returns
A copy of this MeasurementDeletedEvent.
-
inline MeasurementDeletedEvent()
The default constructor creates an empty MeasurementDeletedEvent object.
-
inline virtual Event *Clone() const
-
class MeasurementInsertedEvent : public HPS::Event
Public Functions
-
inline virtual Event *Clone() const
Allocates and returns a copy of this MeasurementInsertedEvent.
- Returns
A copy of this MeasurementInsertedEvent.
-
inline MeasurementInsertedEvent()
The default constructor creates an empty MeasurementInsertedEvent object.
-
inline virtual Event *Clone() const
-
void DeleteMeasurements()