bluemira.geometry.wire ====================== .. py:module:: bluemira.geometry.wire .. autoapi-nested-parse:: Wrapper for FreeCAD Part.Wire objects Classes ------- .. autoapisummary:: bluemira.geometry.wire.BluemiraWire Module Contents --------------- .. py:class:: BluemiraWire(boundary: list[bluemira.codes._freecadapi.apiWire | BluemiraWire], label: str = '') Bases: :py:obj:`bluemira.geometry.base.BluemiraGeo` .. autoapi-inheritance-diagram:: bluemira.geometry.wire.BluemiraWire :parts: 1 :private-bases: Bluemira Wire class. :param boundary: List of wires from which to make the BluemiraWire. The wires should be passed in "end-to-start", i.e. the end point of the current wire in the list should match the start point of the next wire in the list. :param label: Label to assign to the wire .. note:: The construction of the BluemiraWire can usually handle one wire that is not in the correct order in the :code:`boundary` argument, but it is best not to test your luck. .. py:method:: _check_orientations() .. py:method:: _converter(func) :staticmethod: Function used in __getattr__ to modify the added functions. :returns: Function used in __getattr__ to modify the added functions. .. py:method:: _create_shape() -> bluemira.codes._freecadapi.apiWire :returns: shape of the object as a single wire :rtype: apiWire .. py:method:: _create_wire(*, check_reverse: bool = True) .. py:method:: _get_wires() -> list[bluemira.codes._freecadapi.apiWire] :returns: List of wires of which the shape consists of. .. py:method:: __add__(other: BluemiraWire) -> BluemiraWire Add two wires :returns: Wire resulting from combining two wires. :raises TypeError: Must be BluemiraWire .. py:method:: close(label: str = '') -> None Close the shape with a line segment between shape's end and start point. This function modifies the object boundary. :raises NotClosedWireError: Wire has not been closed .. py:method:: discretise(ndiscr: int = 100, *, byedges: bool = False, dl: float | None = None) -> bluemira.geometry.coordinates.Coordinates Discretise the wire in ndiscr equidistant points or with a reference dl segment step. :param ndiscr: Number of points to discretise to :param byedges: Whether or not to discretise by edges. If True, each edge is discretised separately using an approximated distance (wire.Length/ndiscr) or the specified dl. If True, it is possible that ndiscr is larger than specified. :param dl: Discretise by length, overriding ndiscr :rtype: Coordinates of the discretised points. .. py:method:: value_at(alpha: float | None = None, distance: float | None = None) -> numpy.ndarray Get a point along the wire at a given parameterised length or length. :param alpha: Parameterised distance along the wire length, in the range [0 .. 1] :param distance: Physical distance along the wire length :rtype: Point coordinates (w.r.t. BluemiraWire's BluemiraPlacement) :raises GeometryError: Alpha or distance must be specified .. py:method:: parameter_at(vertex: collections.abc.Iterable[float], tolerance: float = EPS_FREECAD) -> float Get the parameter value at a vertex along a wire. :param vertex: Vertex for which to get the parameter :param tolerance: Tolerance within which to get the parameter :rtype: Parameter value along the wire at the vertex :raises GeometryError: If the vertex is further away to the wire than the specified tolerance .. py:method:: start_point() -> bluemira.geometry.coordinates.Coordinates :returns: Get the coordinates of the start of the wire. .. py:method:: end_point() -> bluemira.geometry.coordinates.Coordinates :returns: Get the coordinates of the end of the wire. .. py:property:: vertexes :type: bluemira.geometry.coordinates.Coordinates The ordered vertexes of the wire. .. py:property:: edges :type: tuple[BluemiraWire] The ordered edges of the wire. .. py:property:: wires :type: tuple[BluemiraWire] The wires of the wire. By definition a tuple of itself. .. py:property:: faces :type: tuple The faces of the wire. By definition an empty tuple. .. py:property:: shells :type: tuple The shells of the wire. By definition an empty tuple. .. py:property:: solids :type: tuple The solids of the wire. By definition an empty tuple.