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_radius
Union
[Quantity
,Distance
,Real
] Inner radius (apothem) of the polygon.
- sides
int
Number of sides of the polygon.
- angle
Union
[Quantity
,Angle
,Real
], default: 0 Placement angle for orientation alignment.
Overview#
Center point of the polygon. |
|
Inner radius (apothem) of the polygon. |
|
Number of sides of the polygon. |
|
Orientation angle of the polygon. |
|
Side length of the polygon. |
|
Outer radius of the polygon. |
|
Perimeter of the polygon. |
|
Area of the polygon. |
|
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.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.