MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.DistanceMeasurementObject Class Reference
+ Inheritance diagram for mrmeshpy.DistanceMeasurementObject:

Classes

class  DistanceMode
 

Public Member Functions

None __init__ (self)
 
str className (self)
 
str classNameInPlural (self)
 
Object clone (self)
 
ObjectComparableWithReference.ComparableProperty computeComparableProperty (self, int i)
 
float computeDistance (self)
 
str getComparablePropertyName (self, int i)
 
ObjectComparableWithReference.ComparisonReferenceValue getComparisonReferenceValue (self, int i)
 
str getComparisonReferenceValueName (self, int i)
 
ObjectComparableWithReference.ComparisonTolerance getComparisonTolerence (self, int i)
 
DistanceMeasurementObject.DistanceMode getDistanceMode (self)
 
std_vector_std_string getInfoLines (self)
 
Vector3f getLocalDelta (self)
 
Vector3f getLocalPoint (self)
 
Vector3f getWorldDelta (self)
 
Vector3f getWorldPoint (self)
 
bool isNegative (self)
 
int numComparableProperties (self)
 
None setComparisonReferenceValue (self, int i, std_optional_std_variant_float_Vector3_float value)
 
None setComparisonTolerance (self, int i, std_optional_ObjectComparableWithReference_ComparisonTolerance newTolerance)
 
None setDistanceMode (self, DistanceMeasurementObject.DistanceMode mode)
 
None setIsNegative (self, bool value)
 
None setLocalDelta (self, Vector3f delta)
 
None setLocalPoint (self, Vector3f point)
 
Object shallowClone (self)
 
str typeName (self)
 
- Public Member Functions inherited from mrmeshpy.VisualObject
std_vector_ViewportMask getAllVisualizeProperties (self)
 
float getAmbientStrength (self)
 
Color getBackColor (self, ViewportId viewportId='{}')
 
ViewportProperty_Color getBackColorsForAllViewports (self)
 
Box3f getBoundingBox (self)
 
ColoringType getColoringType (self)
 
int getDirtyFlags (self)
 
Color getFrontColor (self, bool selected=True, ViewportId viewportId='{}')
 
ViewportProperty_Color getFrontColorsForAllViewports (self, bool selected=True)
 
int getGlobalAlpha (self, ViewportId viewportId='{}')
 
ViewportProperty_unsigned_char getGlobalAlphaForAllViewports (self)
 
bool getRedrawFlag (self, ViewportMask viewportMask)
 
float getShininess (self)
 
float getSpecularStrength (self)
 
bool getVisualizeProperty (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
ViewportMask getVisualizePropertyMask (self, AnyVisualizeMaskEnum type)
 
bool globalClippedByPlane (self, ViewportMask viewportMask='ViewportMask::any()')
 
ViewportMask globalClippedByPlaneMask (self)
 
int heapBytes (self)
 
bool isPickable (self, ViewportMask viewportMask='ViewportMask::any()')
 
None renderUi (self, UiRenderParams params)
 
None resetColors (self)
 
None resetDirty (self)
 
None resetDirtyExceptMask (self, int mask)
 
None resetFrontColor (self)
 
None setAllVisualizeProperties (self, std_vector_ViewportMask properties)
 
None setAmbientStrength (self, float ambientStrength)
 
None setBackColor (self, Color color, ViewportId viewportId='{}')
 
None setBackColorsForAllViewports (self, ViewportProperty_Color val)
 
None setColoringType (self, ColoringType coloringType)
 
None setDirtyFlags (self, int mask, bool invalidateCaches=True)
 
None setFrontColor (self, Color color, bool selected, ViewportId viewportId='{}')
 
None setFrontColorsForAllViewports (self, ViewportProperty_Color val, bool selected=True)
 
None setGlobalAlpha (self, int alpha, ViewportId viewportId='{}')
 
None setGlobalAlphaForAllViewports (self, ViewportProperty_unsigned_char val)
 
None setGlobalClippedByPlane (self, bool on, ViewportMask viewportMask='ViewportMask::all()')
 
None setPickable (self, bool on, ViewportMask viewportMask='ViewportMask::all()')
 
None setShininess (self, float shininess)
 
None setSpecularStrength (self, float specularStrength)
 
None setUseDefaultScenePropertiesOnDeserialization (self, bool useDefaultScenePropertiesOnDeserialization)
 
None setVisualizeProperty (self, bool value, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
None setVisualizePropertyMask (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
None showName (self, bool on)
 
bool showName (self)
 
bool supportsVisualizeProperty (self, AnyVisualizeMaskEnum type)
 
None toggleVisualizeProperty (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
bool useDefaultScenePropertiesOnDeserialization (self)
 
- Public Member Functions inherited from mrmeshpy.Object
bool addChild (self, Object child, bool recognizedChild=True)
 
bool addChildBefore (self, Object newChild, Object existingChild)
 
bool addTag (self, str tag)
 
None applyScale (self, float scaleFactor)
 
VisualObject asType_VisualObject (self)
 
VisualObject asType_VisualObject (self)
 
std_vector_std_shared_ptr_Object children (self)
 
std_vector_std_shared_ptr_Object_const children (self)
 
Object cloneTree (self)
 
bool detachFromParent (self)
 
Object find (self, str name)
 
Object find (self, str name)
 
Object findCommonAncestor (self, Object other)
 
Object findCommonAncestor (self, Object other)
 
bool globalVisibility (self, ViewportMask viewportMask='ViewportMask::any()')
 
ViewportMask globalVisibilityMask (self)
 
bool hasModel (self)
 
bool hasVisualRepresentation (self)
 
bool isAncestor (self, Object ancestor)
 
bool isAncillary (self)
 
bool isGlobalAncillary (self)
 
bool isLocked (self)
 
bool isParentLocked (self)
 
bool isSelected (self)
 
bool isVisible (self, ViewportMask viewportMask='ViewportMask::any()')
 
str name (self)
 
Object parent (self)
 
Object parent (self)
 
None removeAllChildren (self)
 
bool removeChild (self, Object child)
 
bool removeChild (self, Object child)
 
bool removeTag (self, str tag)
 
None resetRedrawFlag (self)
 
None resetXf (self, ViewportId id='{}')
 
bool select (self, bool on)
 
None setAncillary (self, bool ancillary)
 
None setGlobalVisibility (self, bool on, ViewportMask viewportMask='ViewportMask::any()')
 
None setLocked (self, bool on)
 
None setName (self, str name)
 
None setParentLocked (self, bool lock)
 
None setVisibilityMask (self, ViewportMask viewportMask)
 
None setVisible (self, bool on, ViewportMask viewportMask='ViewportMask::all()')
 
None setWorldXf (self, AffineXf3f xf, ViewportId id='{}')
 
None setXf (self, AffineXf3f xf, ViewportId id='{}')
 
None setXfsForAllViewports (self, ViewportProperty_AffineXf3f xf)
 
Object shallowCloneTree (self)
 
None sortChildren (self)
 
None swap (self, Object other)
 
std_set_std_string tags (self)
 
ViewportMask visibilityMask (self)
 
AffineXf3f worldXf (self, ViewportId id='{}', bool_output isDef=None)
 
AffineXf3f xf (self, ViewportId id='{}', bool_output isDef=None)
 
ViewportProperty_AffineXf3f xfsForAllViewports (self)
 
- Public Member Functions inherited from mrmeshpy.ObjectChildrenHolder
Object getSharedPtr (self)
 
- Public Member Functions inherited from mrmeshpy.ObjectComparableWithReference
bool comparisonToleranceIsAlwaysOnlyPositive (self, int i)
 
int numComparisonReferenceValues (self)
 
None setComparisonReferenceVal (self, int i, ObjectComparableWithReference.ComparisonReferenceValue value)
 

Static Public Member Functions

str ClassName ()
 
str ClassNameInPlural ()
 
str TypeName ()
 
- Static Public Member Functions inherited from mrmeshpy.MeasurementObject
MeasurementObject operator (*args, **kwargs)
 
- Static Public Member Functions inherited from mrmeshpy.VisualObject
Box3f getWorldBox (*args, **kwargs)
 
bool render (*args, **kwargs)
 
None renderForPicker (*args, **kwargs)
 
- Static Public Member Functions inherited from mrmeshpy.Object
Box3f getWorldTreeBox (*args, **kwargs)
 
- Static Public Member Functions inherited from mrmeshpy.ObjectComparableWithReference
ObjectComparableWithReference operator (*args, **kwargs)
 

Detailed Description

Generated from:  MR::DistanceMeasurementObject

Represents a distance measurement.

Constructor & Destructor Documentation

◆ __init__()

None mrmeshpy.DistanceMeasurementObject.__init__ ( self)
The xf encodes the distance: the origin is one point, and (1,0,0) is another.

Reimplemented from mrmeshpy.MeasurementObject.

Member Function Documentation

◆ ClassName()

str mrmeshpy.DistanceMeasurementObject.ClassName ( )
static
return human readable name of subclass

Reimplemented from mrmeshpy.VisualObject.

◆ className()

str mrmeshpy.DistanceMeasurementObject.className ( self)

Reimplemented from mrmeshpy.VisualObject.

◆ ClassNameInPlural()

str mrmeshpy.DistanceMeasurementObject.ClassNameInPlural ( )
static
return human readable name of subclass in plural form

Reimplemented from mrmeshpy.VisualObject.

◆ classNameInPlural()

str mrmeshpy.DistanceMeasurementObject.classNameInPlural ( self)

Reimplemented from mrmeshpy.VisualObject.

◆ clone()

Object mrmeshpy.DistanceMeasurementObject.clone ( self)
clones this object only, without its children,
making new object the owner of all copied resources

Reimplemented from mrmeshpy.VisualObject.

◆ computeComparableProperty()

ObjectComparableWithReference.ComparableProperty mrmeshpy.DistanceMeasurementObject.computeComparableProperty ( self,
int i )
Compute a value of a property.
Compare `value` and `referenceValue` using the tolerance.
This can return null if the value is impossible to compute, e.g. for some types if the reference isn't set (e.g. if
  we're computing the distance to a reference point).
`i` goes up to `numComparableProperties()`, exclusive.

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ computeDistance()

float mrmeshpy.DistanceMeasurementObject.computeDistance ( self)
Computes the distance value. This is affected by `getDistanceMode()`.
In `euclidean`, this is `getWorldDelta().length() * (isNegative() ? -1 : 1)`.

◆ getComparablePropertyName()

str mrmeshpy.DistanceMeasurementObject.getComparablePropertyName ( self,
int i )
`i` goes up to `numComparableProperties()`, exclusive.

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ getComparisonReferenceValue()

ObjectComparableWithReference.ComparisonReferenceValue mrmeshpy.DistanceMeasurementObject.getComparisonReferenceValue ( self,
int i )
Returns the internal reference value.
If the value wasn't set yet (as indicated by `isSet == false`), you can still use the returned variant to get the expected type.
`i` goes up to `numComparisonReferenceValues()`, exclusive.

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ getComparisonReferenceValueName()

str mrmeshpy.DistanceMeasurementObject.getComparisonReferenceValueName ( self,
int i )
`i` goes up to `numComparisonReferenceValues()`, exclusive.

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ getComparisonTolerence()

ObjectComparableWithReference.ComparisonTolerance mrmeshpy.DistanceMeasurementObject.getComparisonTolerence ( self,
int i )
Returns the tolerance for a specific comparable property. Returns null if not set.
`i` goes up to `numComparableProperties()`, exclusive.

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ getDistanceMode()

DistanceMeasurementObject.DistanceMode mrmeshpy.DistanceMeasurementObject.getDistanceMode ( self)
Whether we should draw the individual X/Y/Z deltas in addition to the distance itself.

◆ getInfoLines()

std_vector_std_string mrmeshpy.DistanceMeasurementObject.getInfoLines ( self)
return several info lines that can better describe the object in the UI

Reimplemented from mrmeshpy.VisualObject.

◆ getLocalDelta()

Vector3f mrmeshpy.DistanceMeasurementObject.getLocalDelta ( self)

◆ getLocalPoint()

Vector3f mrmeshpy.DistanceMeasurementObject.getLocalPoint ( self)
Get the starting point in local coordinates.

◆ getWorldDelta()

Vector3f mrmeshpy.DistanceMeasurementObject.getWorldDelta ( self)
The delta from the starting point to the other point.

◆ getWorldPoint()

Vector3f mrmeshpy.DistanceMeasurementObject.getWorldPoint ( self)
Get the starting point in world coordinates.

◆ isNegative()

bool mrmeshpy.DistanceMeasurementObject.isNegative ( self)
Whether the distance should be displayed as a negative one.

◆ numComparableProperties()

int mrmeshpy.DistanceMeasurementObject.numComparableProperties ( self)
Implement `ObjectComparableWithReference`:

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ setComparisonReferenceValue()

None mrmeshpy.DistanceMeasurementObject.setComparisonReferenceValue ( self,
int i,
std_optional_std_variant_float_Vector3_float value )
Sets the internal reference value. Makes `hasComparisonReferenceValue()` return true.
If you pass nullopt, removes this reference value.
Only a certain variant type is legal to pass, depending on the derived class and the index. Use `getComparisonReferenceValue()` to determine that type.
`i` goes up to `numComparisonReferenceValues()`, exclusive.

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ setComparisonTolerance()

None mrmeshpy.DistanceMeasurementObject.setComparisonTolerance ( self,
int i,
std_optional_ObjectComparableWithReference_ComparisonTolerance newTolerance )
Sets the tolerance for a specific comparable property.
`i` goes up to `numComparableProperties()`, exclusive.

Reimplemented from mrmeshpy.ObjectComparableWithReference.

◆ setDistanceMode()

None mrmeshpy.DistanceMeasurementObject.setDistanceMode ( self,
DistanceMeasurementObject.DistanceMode mode )

◆ setIsNegative()

None mrmeshpy.DistanceMeasurementObject.setIsNegative ( self,
bool value )

◆ setLocalDelta()

None mrmeshpy.DistanceMeasurementObject.setLocalDelta ( self,
Vector3f delta )
Set the delta vector in the local coordinates.

◆ setLocalPoint()

None mrmeshpy.DistanceMeasurementObject.setLocalPoint ( self,
Vector3f point )
Set the start point in the local coordinates.

◆ shallowClone()

Object mrmeshpy.DistanceMeasurementObject.shallowClone ( self)
clones this object only, without its children,
making new object to share resources with this object

Reimplemented from mrmeshpy.VisualObject.

◆ TypeName()

str mrmeshpy.DistanceMeasurementObject.TypeName ( )
static
return name of subtype for serialization purposes

Reimplemented from mrmeshpy.VisualObject.

◆ typeName()

str mrmeshpy.DistanceMeasurementObject.typeName ( self)

Reimplemented from mrmeshpy.VisualObject.


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