SketchEdge#

class ansys.geometry.core.sketch.edge.SketchEdge#

Provides for modeling edges forming sketched shapes.

Overview#

contains_point

Check if the edge contains the given point within a tolerance.

plane_change

Redefine the plane containing SketchEdge objects.

start

Starting point of the edge.

end

Ending point of the edge.

length

Length of the edge.

visualization_polydata

VTK polydata representation for PyVista visualization.

Import detail#

from ansys.geometry.core.sketch.edge import SketchEdge

Property detail#

property SketchEdge.start: ansys.geometry.core.math.point.Point2D#
Abstractmethod:

Starting point of the edge.

property SketchEdge.end: ansys.geometry.core.math.point.Point2D#
Abstractmethod:

Ending point of the edge.

property SketchEdge.length: pint.Quantity#
Abstractmethod:

Length of the edge.

property SketchEdge.visualization_polydata: pyvista.PolyData#
Abstractmethod:

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#

abstractmethod SketchEdge.contains_point(point: ansys.geometry.core.math.point.Point2D, tol: float = 1e-06) bool#

Check if the edge contains the given point within a tolerance.

SketchEdge.plane_change(plane: ansys.geometry.core.math.plane.Plane) None#

Redefine the plane containing SketchEdge objects.

Parameters:
planePlane

Desired new plane that is to contain the sketched edge.

Notes

This implies that their 3D definition might suffer changes. By default, this method does nothing. It is required to be implemented in child SketchEdge classes.