:class:`SketchSegment` ====================== .. py:class:: ansys.geometry.core.sketch.segment.SketchSegment(start: ansys.geometry.core.math.point.Point2D, end: ansys.geometry.core.math.point.Point2D, plane: ansys.geometry.core.math.plane.Plane = Plane()) Bases: :py:obj:`ansys.geometry.core.sketch.edge.SketchEdge`, :py:obj:`ansys.geometry.core.shapes.curves.line.Line` Provides segment representation of a line. :Parameters: **start** : :obj:`Point2D` Starting point of the line segment. **end** : :obj:`Point2D` Ending point of the line segment. **plane** : :obj:`Plane`, :obj:`optional` Plane containing the sketched circle, which is the global XY plane by default. .. !! processed by numpydoc !! .. py:currentmodule:: SketchSegment Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~plane_change` - Redefine the plane containing ``SketchSegment`` objects. .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~start` - Starting point of the segment. * - :py:attr:`~end` - Ending point of the segment. * - :py:attr:`~length` - Length of the segment. * - :py:attr:`~visualization_polydata` - VTK polydata representation for PyVista visualization. .. tab-item:: Special methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~__eq__` - Equals operator for the ``SketchSegment`` class. * - :py:attr:`~__ne__` - Not equals operator for the ``SketchSegment`` class. Import detail ------------- .. code-block:: python from ansys.geometry.core.sketch.segment import SketchSegment Property detail --------------- .. py:property:: start :type: ansys.geometry.core.math.point.Point2D Starting point of the segment. .. !! processed by numpydoc !! .. py:property:: end :type: ansys.geometry.core.math.point.Point2D Ending point of the segment. .. !! processed by numpydoc !! .. py:property:: length :type: pint.Quantity Length of the segment. .. !! processed by numpydoc !! .. py:property:: visualization_polydata :type: pyvista.PolyData VTK polydata representation for PyVista visualization. The representation lies in the X/Y plane within the standard global Cartesian coordinate system. :Returns: :obj:`pyvista.PolyData` VTK pyvista.Polydata configuration. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: __eq__(other: SketchSegment) -> bool Equals operator for the ``SketchSegment`` class. .. !! processed by numpydoc !! .. py:method:: __ne__(other: SketchSegment) -> bool Not equals operator for the ``SketchSegment`` class. .. !! processed by numpydoc !! .. py:method:: plane_change(plane: ansys.geometry.core.math.plane.Plane) -> None Redefine the plane containing ``SketchSegment`` objects. :Parameters: **plane** : :obj:`Plane` Desired new plane that is to contain the sketched segment. .. rubric:: Notes This implies that their 3D definition might suffer changes. .. !! processed by numpydoc !!