This classes located in module ezdxf.algebra
:
from ezdxf.algebra import OCS, UCS
OCS Class¶

class
ezdxf.algebra.
OCS
¶

OCS.
__init__
(extrusion=(0, 0, 1))¶ Establish an Object Coordinate System for a given extrusion vector.

OCS.
to_wcs
(point)¶ Calculate world coordinates for point in object coordinates.

OCS.
points_to_wcs
(points)¶ Translate multiple object coordinates into world coordinates (generator).

OCS.
from_wcs
(point)¶ Calculate object coordinates for point in world coordinates.

OCS.
points_from_wcs
(points)¶ Translate multiple world coordinates into object coordinates (generator).
See also
UCS Class¶

class
ezdxf.algebra.
UCS
¶

UCS.
__init__
(origin=(0, 0, 0), ux=None, uy=None, uz=None)¶ Establish an User Coordinate System. The UCS is defined by the origin and two unit vectors for the x, y or zaxis, all axis n WCS. The missing axis is the cross product of the given axis.
If x and yaxis are None: ux=(1, 0, 0), uy=(0, 1, 0), uz=(0, 0, 1).
Normalization of unit vectors is not required.
Parameters:

UCS.
to_wcs
(point)¶ Calculate world coordinates for point in UCS coordinates.

UCS.
points_to_wcs
(points)¶ Translate multiple user coordinates into world coordinates (generator).

UCS.
to_ocs
(point)¶ Calculate OCS coordinates for point in UCS coordinates.
OCS is defined by the zaxis of the UCS.

UCS.
points_from_wcs
(points)¶ Translate multiple user coordinates into OCS coordinates (generator).
OCS is defined by the zaxis of the UCS.

UCS.
from_wcs
(point)¶ Calculate UCS coordinates for point in world coordinates.

UCS.
points_from_wcs
(points) Translate multiple world coordinates into user coordinates (generator).

UCS.
from_x_axis_and_point_in_xy
(origin, axis, point)¶ Returns an new
UCS
defined by the origin, the xaxis vector and an arbitrary point in the xyplane. (static method)Parameters:

UCS.
from_x_axis_and_point_in_xz
(origin, axis, point)¶ Returns an new
UCS
defined by the origin, the xaxis vector and an arbitrary point in the xzplane. (static method)Parameters:

UCS.
from_y_axis_and_point_in_xy
(origin, axis, point)¶ Returns an new
UCS
defined by the origin, the yaxis vector and an arbitrary point in the xyplane. (static method)Parameters:

UCS.
from_y_axis_and_point_in_yz
(origin, axis, point)¶ Returns an new
UCS
defined by the origin, the yaxis vector and an arbitrary point in the yzplane. (static method)Parameters:

UCS.
from_z_axis_and_point_in_xz
(origin, axis, point)¶ Returns an new
UCS
defined by the origin, the zaxis vector and an arbitrary point in the xzplane. (static method)Parameters:

UCS.
from_z_axis_and_point_in_yz
(origin, axis, point)¶ Returns an new
UCS
defined by the origin, the zaxis vector and an arbitrary point in the yzplane. (static method)Parameters:
See also