magneticalc.Format.Format

# ``magneticalc`.`Format`.`Format``

class documentation

`class Format:`

View In Hierarchy

Format class.

Static Method | `absolute_filename` | Converts a filename to an absolute filename.
Static Method | `filename_uri` | Converts a filename to a filename URI.
Static Method | `float_to_str` | Converts a float value to string.
Static Method | `point_to_str` | Converts a single 3D point to string.
Static Method | `points_to_str` | Converts list of 3D points to string.
Static Method | `str_to_point` | Converts string to single 3D point.
Static Method | `str_to_points` | Converts string to list of 3D points.
Class Variable | `CoordinatePrecision` | Undocumented
Class Variable | `FloatPrecision` | Coordinate precision.

@staticmethod
def absolute_filename(filename: `str`) -> `str`:

Converts a filename to an absolute filename.

Parameters
filename: `str` | Filename

Returns
`str` | Absolute filename

@staticmethod
def filename_uri(filename: `str`) -> `str`:

Converts a filename to a filename URI.

Parameters
filename: `str` | Filename

Returns
`str` | Filename URI

@staticmethod
def float_to_str(value: `float`) -> `str`:

Converts a float value to string.

@staticmethod
def point_to_str(point: `np.ndarray | list[float]`) -> `str`:

Converts a single 3D point to string.

Parameters
point: `np.ndarray | list[float]` | Single 3D point

Returns
`str` | String

@staticmethod
def points_to_str(points: `np.ndarray | list[list[float]]`) -> `str`:

Converts list of 3D points to string.

Parameters
points: `np.ndarray | list[list[float]]` | List of 3D points

Returns
`str` | String

@staticmethod
def str_to_point(str_point: `str`) -> `np.ndarray | list[float]`:

Converts string to single 3D point.

Parameters
str_point: `str` | String

Returns
`np.ndarray | list[float]` | Single 3D point

@staticmethod
def str_to_points(str_points: `str`) -> `np.ndarray | list[list[float]]`:

Converts string to list of 3D points.

Parameters
str_points: `str` | String

Returns
`np.ndarray | list[list[float]]` | List of 3D points

CoordinatePrecision: `int` =

Undocumented

FloatPrecision: `int` =

Coordinate precision.