return_union_of_shapes#

return_union_of_shapes(domain, shape_A, shape_B)#

Compute the union of two shapes within a given domain.

Parameters:
domainDomain

The domain containing the shapes and their components.

shape_Aint

The ID of the first shape within the domain.

shape_Bint

The ID of the second shape within the domain.

Returns:
list

A list of dictionaries representing the union of the two shapes. Each dictionary contains: - ‘outer boundary’: Coordinates of the outer boundary of the union. - ‘interior boundary’: Coordinates of the interior boundaries (holes) within the union. - ‘global_visited_indices_exterior’: Global vertex IDs for the exterior boundary. - ‘global_visited_indices_interior’: Global vertex IDs for the interior boundaries.

Raises:
ValueError

If the shapes do not exist in the domain, are not of type ‘shape’, or if the union of non-overlapping shapes is requested.

Notes

The function handles three cases for internal holes: 1. Holes generated from the union of the outsides. 2. Holes whose edges are the interior boundaries of one shape and the exterior boundary of the other. 3. Holes whose edges are formed by the interior boundaries of both shapes.