Box#

class ansys.geometry.core.sketch.box.Box(center: ansys.geometry.core.math.point.Point2D, width: pint.Quantity | ansys.geometry.core.misc.measurements.Distance | ansys.geometry.core.typing.Real, height: pint.Quantity | ansys.geometry.core.misc.measurements.Distance | ansys.geometry.core.typing.Real, angle: pint.Quantity | ansys.geometry.core.misc.measurements.Angle | ansys.geometry.core.typing.Real = 0)#

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

Provides for modeling a box.

Parameters:
center: Point2D

Center point of the box.

widthQuantity | Distance | Real

Width of the box.

heightQuantity | Distance | Real

Height of the box.

angleQuantity | Angle | Real, default: 0

Placement angle for orientation alignment.

Overview#

center

Center point of the box.

width

Width of the box.

height

Height of the box.

perimeter

Perimeter of the box.

area

Area of the box.

visualization_polydata

VTK polydata representation for PyVista visualization.

Import detail#

from ansys.geometry.core.sketch.box import Box

Property detail#

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

Center point of the box.

property Box.width: pint.Quantity#

Width of the box.

property Box.height: pint.Quantity#

Height of the box.

property Box.perimeter: pint.Quantity#

Perimeter of the box.

property Box.area: pint.Quantity#

Area of the box.

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

Attribute detail#

Box.angle#
Box.rotation#
Box.width_magnitude#
Box.height_magnitude#
Box.half_h#
Box.half_w#
Box.corner_1#
Box.corner_2#
Box.corner_3#
Box.corner_4#