Polygon#

class ansys.geometry.core.sketch.polygon.Polygon(center: ansys.geometry.core.math.point.Point2D, inner_radius: beartype.typing.Union[pint.Quantity, ansys.geometry.core.misc.measurements.Distance, ansys.geometry.core.typing.Real], sides: int, angle: beartype.typing.Optional[beartype.typing.Union[pint.Quantity, ansys.geometry.core.misc.measurements.Angle, ansys.geometry.core.typing.Real]] = 0)#

Bases: ansys.geometry.core.sketch.face.SketchFace

Provides for modeling regular polygons.

Parameters:
center: Point2D

Center point of the circle.

inner_radiusUnion[Quantity, Distance, Real]

Inner radius (apothem) of the polygon.

sidesint

Number of sides of the polygon.

angleUnion[Quantity, Angle, Real], default: 0

Placement angle for orientation alignment.

Overview#

center

Center point of the polygon.

inner_radius

Inner radius (apothem) of the polygon.

n_sides

Number of sides of the polygon.

angle

Orientation angle of the polygon.

length

Side length of the polygon.

outer_radius

Outer radius of the polygon.

perimeter

Perimeter of the polygon.

area

Area of the polygon.

visualization_polydata

VTK polydata representation for PyVista visualization.

Import detail#

from ansys.geometry.core.sketch.polygon import Polygon

Property detail#

property Polygon.center: ansys.geometry.core.math.point.Point2D#

Center point of the polygon.

property Polygon.inner_radius: pint.Quantity#

Inner radius (apothem) of the polygon.

property Polygon.n_sides: int#

Number of sides of the polygon.

property Polygon.angle: pint.Quantity#

Orientation angle of the polygon.

property Polygon.length: pint.Quantity#

Side length of the polygon.

property Polygon.outer_radius: pint.Quantity#

Outer radius of the polygon.

property Polygon.perimeter: pint.Quantity#

Perimeter of the polygon.

property Polygon.area: pint.Quantity#

Area of the polygon.

property Polygon.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.