(
        self, entities, delete_first: bool = True, delete_other: bool = True
    )
return [Dummy(*dim_tag) for dim_tag in dim_tags]
Boolean union, see
        https://gmsh.info/doc/texinfo/gmsh.html#Boolean-operations input_entity
        and tool_entity are called object and tool in gmsh documentation.
Boolean union, see
        https://gmsh.info/doc/texinfo/gmsh.html#Boolean-operations input_entity
        and tool_entity are called object and tool in gmsh documentation.
Boolean union see https : // gmsh . info / doc / texinfo / gmsh . html#Boolean - operations input_entity and tool_entity are called object and tool in gmsh documentation .
def boolean_union(
        self, entities, delete_first: bool = True, delete_other: bool = True
    ):
        """Boolean union, see
        https://gmsh.info/doc/texinfo/gmsh.html#Boolean-operations input_entity
        and tool_entity are called object and tool in gmsh documentation.
        """
        entities = [e if isinstance(e, list) else [e] for e in entities]

        dim_tags, _ = gmsh.model.occ.fuse(
            [e.dim_tag for e in entities[0]],
            [ee.dim_tag for e in entities[1:] for ee in e],
            removeObject=delete_first,
            removeTool=delete_other,
        )

        # remove entities from SIZE_QUEUE if necessary
        all_entities = []
        if delete_first:
            all_entities += entities[0]
        if delete_other:
            for ent in entities[1:]:
                all_entities += ent
        for s in self._SIZE_QUEUE:
            if s[0] in all_entities:
                warnings.warn(
                    f"Specified mesh size for {s[0]} "
                    "discarded in Boolean union operation."
                )
        self._SIZE_QUEUE = [s for s in self._SIZE_QUEUE if s[0] not in all_entities]

        return [Dummy(*dim_tag) for dim_tag in dim_tags]
def boolean_union ( self , entities , delete_first : bool = True , delete_other : bool = True ) : entities = [ e if isinstance ( e , list ) else [ e ] for e in entities ] dim_tags , _ = gmsh . model . occ . fuse ( [ e . dim_tag for e in entities [ 0 ] ] , [ ee . dim_tag for e in entities [ 1 : ] for ee in e ] , removeObject = delete_first , removeTool = delete_other , ) # remove entities from SIZE_QUEUE if necessary all_entities = [ ] if delete_first : all_entities += entities [ 0 ] if delete_other : for ent in entities [ 1 : ] : all_entities += ent for s in self . _SIZE_QUEUE : if s [ 0 ] in all_entities : warnings . warn ( f"Specified mesh size for {s[0]} " "discarded in Boolean union operation." ) self . _SIZE_QUEUE = [ s for s in self . _SIZE_QUEUE if s [ 0 ] not in all_entities ] return [ Dummy ( * dim_tag ) for dim_tag in dim_tags ]