bluemira.geometry.placement =========================== .. py:module:: bluemira.geometry.placement .. autoapi-nested-parse:: Wrapper for FreeCAD Placement objects Classes ------- .. autoapisummary:: bluemira.geometry.placement.BluemiraPlacement Module Contents --------------- .. py:class:: BluemiraPlacement(base: collections.abc.Iterable[float] = [0.0, 0.0, 0.0], axis: collections.abc.Iterable[float] = [0.0, 0.0, 1.0], angle: float = 0.0, label: str = '') Bluemira Placement class. :param base: Placement origin :param axis: vector describing the axis of rotation :param angle: angle of rotation in degree :param label: Label of the placement .. py:attribute:: _shape .. py:attribute:: label :value: '' .. py:method:: from_3_points(point_1: collections.abc.Iterable[float], point_2: collections.abc.Iterable[float], point_3: collections.abc.Iterable[float], label: str = '') -> BluemiraPlacement :classmethod: Instantiate a BluemiraPlacement from three points. :param point_1: First point :param point_2: Second Point :param point_3: Third point :param label: Label of the placement :returns: A BluemiraPlacement from three points. :raises GeometryError: Points are co-linear .. py:method:: from_matrix(matrix: numpy.ndarray, label: str = '') -> BluemiraPlacement :classmethod: Instantiate a BluemiraPlacement from a 4 x 4 matrix :param matrix: 4 x 4 matrix from which to make the placement :param label: Label of the placement :returns: A BluemiraPlacement from a 4 x 4 matrix .. py:property:: base :type: numpy.ndarray Placement's local origin .. py:property:: axis :type: numpy.ndarray Placement's rotation matrix .. py:property:: angle :type: float Placement's angle of rotation .. py:method:: to_matrix() -> numpy.ndarray :returns: A matrix (quaternion) representing the Placement's transformation .. py:method:: inverse() -> BluemiraPlacement Returns the inverse placement :returns: An inverted placement. .. py:method:: move(vector: collections.abc.Iterable[float]) Moves the Placement along the given vector .. py:method:: __repr__() .. py:method:: copy(label: str | None = None) -> BluemiraPlacement Make a copy of the BluemiraPlacement :returns: A copy of the BluemiraPlacement. .. py:method:: deepcopy(label: str | None = None) -> BluemiraPlacement Make a deepcopy of the BluemiraPlacement :returns: A deepcopy of the BluemiraPlacement. .. py:method:: _create(obj: bluemira.codes._freecadapi.apiPlacement, label: str = '') -> BluemiraPlacement :classmethod: Create a placement from a cadapi Placement :returns: A bluemira placement from a FreeCAD placement. :raises TypeError: Can only be created with cadapi placement .. py:method:: mult_vec(vec: collections.abc.Iterable[float]) -> numpy.ndarray Transform a vector into the local placement :returns: A placement from a vector. .. py:method:: extract_plane(v1: collections.abc.Iterable[float], v2: collections.abc.Iterable[float], base: float | None = None) -> bluemira.geometry.plane.BluemiraPlane Return a plane identified by two vector given in the self placement :param v1: first reference vector :param v2: second reference vector :param base: output plane origin :rtype: A BluemiraPlane .. py:method:: xy_plane() :returns: The corresponding placement xy plane .. py:method:: yz_plane() :returns: The corresponding placement yz plane .. py:method:: xz_plane() :returns: The corresponding placement xz plane