SketchSegment
#
- 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:
ansys.geometry.core.sketch.edge.SketchEdge
,ansys.geometry.core.shapes.curves.line.Line
Provides segment representation of a line.
- Parameters:
- start
Point2D
Starting point of the line segment.
- end
Point2D
Ending point of the line segment.
- plane
Plane
,optional
Plane containing the sketched circle, which is the global XY plane by default.
- start
Overview#
Redefine the plane containing |
Starting point of the segment. |
|
Ending point of the segment. |
|
Length of the segment. |
|
VTK polydata representation for PyVista visualization. |
Import detail#
from ansys.geometry.core.sketch.segment import SketchSegment
Property detail#
- property SketchSegment.start: ansys.geometry.core.math.point.Point2D#
Starting point of the segment.
- property SketchSegment.end: ansys.geometry.core.math.point.Point2D#
Ending point of the segment.
- property SketchSegment.length: pint.Quantity#
Length of the segment.
- property SketchSegment.visualization_polydata: pyvista.PolyData#
VTK polydata representation for PyVista visualization.
The representation lies in the X/Y plane within the standard global Cartesian coordinate system.
- Returns:
pyvista.PolyData
VTK pyvista.Polydata configuration.
Method detail#
- SketchSegment.__eq__(other: SketchSegment) bool #
Equals operator for the
SketchSegment
class.
- SketchSegment.__ne__(other: SketchSegment) bool #
Not equals operator for the
SketchSegment
class.
- SketchSegment.plane_change(plane: ansys.geometry.core.math.plane.Plane) None #
Redefine the plane containing
SketchSegment
objects.- Parameters:
- plane
Plane
Desired new plane that is to contain the sketched segment.
- plane
Notes
This implies that their 3D definition might suffer changes.