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:
startPoint2D

Starting point of the line segment.

endPoint2D

Ending point of the line segment.

planePlane, optional

Plane containing the sketched circle, which is the global XY plane by default.

Overview#

plane_change

Redefine the plane containing SketchSegment objects.

start

Starting point of the segment.

end

Ending point of the segment.

length

Length of the segment.

visualization_polydata

VTK polydata representation for PyVista visualization.

__eq__

Equals operator for the SketchSegment class.

__ne__

Not equals operator for the SketchSegment class.

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:
planePlane

Desired new plane that is to contain the sketched segment.

Notes

This implies that their 3D definition might suffer changes.