AbsoluteValue

The AbsoluteValue class is a simple class that allows to pass some parameters to filters as a an AbsoluteValue and it is basically used to distinguish to parameters that can have values represented with the Percentage class.

Here is a simple example of usage of the class:

ms = pymeshlab.MeshSet()
[...]
ms.generate_resampled_uniform_mesh(cellsize=AbsoluteValue(0.01), offset=AbsoluteValue(1))

This class is necessary to distinguish between relative Percentage values and AbsoluteValue object. Before version 2021.10, instead of this class, the type float was used, leading to unwanted errors by the users. The usage of this class makes sure that the user knows what type of value is passing to parameters that could accept both absolute values or percentages w.r.t. some other measures.

Check the Apply Filter Parameters: Percentage tutorial for further examples.

class pmeshlab.AbsoluteValue
__init__(self: pmeshlab.AbsoluteValue, arg0: float) → None

Constructor of the AbsoluteValue class. Takes as input a float value (default: 0) and initializes the absolute value.

set_value(self: pmeshlab.AbsoluteValue, arg0: float) → None

Sets the value of the absolute value.

value(self: pmeshlab.AbsoluteValue) → float

Returns the value of the absolute value.