Coordinate Systems

Coordinate systems

Global Coordinate System

class onscale.GlobalCoordinates

A pointer to the global coordinate system of the simulation domain

Store this node within context simulation, must be called last

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.

Custom Coordinate System

class onscale.CoordinateSystem(vector_1: Collection[float], vector_2: Collection[float], center: Collection[float] | None = None, system_type: str = 'cartesian', handedness: CoordinateSystemHandedness | str | None = None, alias: str | None = None)

A custom defined coordinate system

Specified by a center and two vectors. The third vector of the coordinate system will be inferred as the cross product of vector_1 by vector_2.

Parameters:
  • vector_1 – The first vector defining the coordinate system. Must be length 3 and linearly independent with vector_2.

  • vector_2 – The second vector defining the coordinate system. Must be length 3 and linearly independent with vector_1.

  • center – The origin of the coordinate system. Must be length 3. Default is [0, 0, 0].

  • system_type – The type of coordinate system to use. Must be one of (“CARTESIAN”, “CYLINDRICAL”, “SPHERICAL”).

  • alias – Optional alias for this object.

static from_dict(data: Dict[str, Any], sim: Simulation | None = None) Node

Construct this node from serialized dictionary data

to_json() str

Convert this node into JSON representation

property uuid: str

Get the UUID associated with this node.