Primitives3D

3D core Primitives

class volmdlr.Vector3D
deterministic_unit_normal_vector

Returns a deterministic normal vector

frame_mapping

side = ‘old’ or ‘new’

normalize

normalize the vector modifying its coordinates

random_unit_normal_vector

Returns a random normal vector

rotation

rotation of angle around axis. Used Rodrigues Formula:

x_rotation

rotation of angle around X axis.

y_rotation

rotation of angle around Y axis.

z_rotation

rotation of angle around Z axis.

class volmdlr.Point3D
class volmdlr.Basis3D

Defines a 3D basis

Parameters:
  • u:Vector3D – first vector of the basis
  • v:Vector3D – second vector of the basis
  • w:Vector3D – third vector of the basis
classmethod from_two_vectors(vector1: volmdlr.core_compiled.Vector3D, vector2: volmdlr.core_compiled.Vector3D) → volmdlr.core_compiled.Basis3D

Create a basis with first vector1 adimensionned, as u, v is the vector2 substracted of u component, w is the cross product of u and v

normalize

normalize the basis modifying its coordinates in place

class volmdlr.Frame3D

Defines a 3D frame :param origin:Point3D: origin of the basis :param u:Vector3D: first vector of the basis :param v:Vector3D: second vector of the basis :param w:Vector3D: third vector of the basis

new_coordinates

You have to give coordinates in the global landmark

old_coordinates

You have to give coordinates in the local landmark

rotation

Rotate the center as a point and vectors as directions (calling Basis)

3D advanced primitives