Skip to content

BooleanOperationsUtil

implementation of the boolean operations utility

  • create a group for geometry elements
  • add geometry elements to the group
  • create union or diff of two groups

BooleanOperationsUtil

Canonical path: Utils.Geometry.BooleanOperationsUtil.BooleanOperationsUtil

implementation of the boolean operations utility

__init__

__init__(trans_stack: TransformationStack)

initialize

Parameters:

add_geometry

add_geometry(geo_ele: GEO_TYPES)

add a 3D geometry element

Parameters:

  • geo_ele (GEO_TYPES) –

    geometry element

add_group

add_group(name: str)

add a foil

Parameters:

  • name (str) –

    name of the group

close_group

close_group()

close the current group

diff

diff(
    group1: str | list[GEO_TYPES] | GEO_TYPES,
    group2: str | list[GEO_TYPES] | GEO_TYPES,
) -> GEO_TYPES

create a diff from two groups

Parameters:

  • group1 (str | list[GEO_TYPES] | GEO_TYPES) –

    first group of elements

  • group2 (str | list[GEO_TYPES] | GEO_TYPES) –

    second group of elements

Returns:

  • GEO_TYPES

    the difference of the two groups or None if the difference is not possible

get_group_elements

get_group_elements(name: str) -> ListModelEle3D

get the group elements

Parameters:

  • name (str) –

    name of the group

Returns:

  • ListModelEle3D

    the group elements

union

union(
    group1: str | list[GEO_TYPES] | GEO_TYPES,
    group2: str | list[GEO_TYPES] | GEO_TYPES,
) -> GEO_TYPES

create a union from two groups

Parameters:

  • group1 (str | list[GEO_TYPES] | GEO_TYPES) –

    first group of elements

  • group2 (str | list[GEO_TYPES] | GEO_TYPES) –

    second group of elements

Returns:

  • GEO_TYPES

    the union of the two groups or None if the union is not possible

Placeholder