Skip to content

PrismUtil

implementation of PrismUtil class

  • create a prism from a 2D path or polygon and height

PrismUtil

Canonical path: Utils.Geometry.PrismUtil.PrismUtil

implementation of PrismUtil class

from_path_2d staticmethod

from_path_2d(path: Path2D, height: float) -> Polyhedron3D | BRep3D | None

create a prism from a 2D path and height

Parameters:

  • path (Path2D) –

    path of the footprint

  • height (float) –

    height of the prism

Returns:

from_path_2d_with_chamfer staticmethod

from_path_2d_with_chamfer(
    path: Path2D, height: float, chamfer_height: float, chamfer_angle: float
) -> Polyhedron3D | BRep3D | None

create a prism from a 2D path and height with chamfer

Parameters:

  • path (Path2D) –

    path of the footprint

  • height (float) –

    height of the prism

  • chamfer_height (float) –

    height of the chamfer

  • chamfer_angle (float) –

    angle of the chamfer

Returns:

from_polygon_2d staticmethod

from_polygon_2d(
    polygon: Polygon2D, height: float, scale_poly: bool = False
) -> Polyhedron3D | None

create a prism from a 2D polygon and height

Parameters:

  • polygon (Polygon2D) –

    polygon of the footprint

  • height (float) –

    height of the prism

  • scale_poly (bool, default: False ) –

    scale the polygon to the length factor

Returns:

from_polygon_2d_with_chamfer staticmethod

from_polygon_2d_with_chamfer(
    polygon: Polygon2D,
    height: float,
    chamfer_height: float,
    chamfer_angle: float,
    scale_poly: bool = False,
) -> Polyhedron3D | BRep3D | None

create a prism from a 2D polygon and height with chamfer

Parameters:

  • polygon (Polygon2D) –

    polygon of the footprint

  • height (float) –

    height of the prism

  • chamfer_height (float) –

    height of the chamfer

  • chamfer_angle (float) –

    angle of the chamfer

  • scale_poly (bool, default: False ) –

    scale the polygon to the length factor

Returns:

from_polygon_2d_with_holes staticmethod

from_polygon_2d_with_holes(
    polygon: Polygon2D,
    holes: list[Polygon2D],
    height: float,
    scale_poly: bool = False,
) -> Polyhedron3D | None

create a prism from a 2D polygon and height with holes

Parameters:

  • polygon (Polygon2D) –

    polygon of the footprint

  • holes (list[Polygon2D]) –

    hole polygons (the polygons itself can have multiple parts)

  • height (float) –

    height of the prism

  • scale_poly (bool, default: False ) –

    scale the polygon to the length factor

Returns:

Placeholder