(
        self, d0, d1, delete_first: bool = True, delete_other: bool = True
    )
return [Dummy(*dim_tag) for dim_tag in dim_tags]
Boolean fragments, see
        https://gmsh.info/doc/texinfo/gmsh.html#Boolean-operations input_entity
        and tool_entity are called object and tool in gmsh documentation.
Boolean fragments, see
        https://gmsh.info/doc/texinfo/gmsh.html#Boolean-operations input_entity
        and tool_entity are called object and tool in gmsh documentation.
Boolean fragments 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_fragments(
        self, d0, d1, delete_first: bool = True, delete_other: bool = True
    ):
        """Boolean fragments, see
        https://gmsh.info/doc/texinfo/gmsh.html#Boolean-operations input_entity
        and tool_entity are called object and tool in gmsh documentation.
        """
        d0 = d0 if isinstance(d0, list) else [d0]
        d1 = d1 if isinstance(d1, list) else [d1]
        dim_tags, _ = gmsh.model.occ.fragment(
            [d.dim_tag for d in d0],
            [d.dim_tag for d in d1],
            removeObject=delete_first,
            removeTool=delete_other,
        )

        # remove entities from SIZE_QUEUE if necessary
        all_entities = []
        if delete_first:
            all_entities += d0
        if delete_other:
            all_entities += d1
        for s in self._SIZE_QUEUE:
            if s[0] in all_entities:
                warnings.warn(
                    f"Specified mesh size for {s[0]} "
                    "discarded in Boolean fragments 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_fragments ( self , d0 , d1 , delete_first : bool = True , delete_other : bool = True ) : d0 = d0 if isinstance ( d0 , list ) else [ d0 ] d1 = d1 if isinstance ( d1 , list ) else [ d1 ] dim_tags , _ = gmsh . model . occ . fragment ( [ d . dim_tag for d in d0 ] , [ d . dim_tag for d in d1 ] , removeObject = delete_first , removeTool = delete_other , ) # remove entities from SIZE_QUEUE if necessary all_entities = [ ] if delete_first : all_entities += d0 if delete_other : all_entities += d1 for s in self . _SIZE_QUEUE : if s [ 0 ] in all_entities : warnings . warn ( f"Specified mesh size for {s[0]} " "discarded in Boolean fragments 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 ]