예제 #1
0
def cut(world: "World", dimension: Dimension,
        selection: SelectionGroup) -> OperationReturnType:
    structure = Structure.from_world(world, selection, dimension)
    structure_cache.add_structure(structure)
    yield from delete(
        world,
        dimension,
        selection,
    )
예제 #2
0
def cut(world: "World", dimension: Dimension,
        selection: SelectionGroup) -> OperationReturnType:
    if selection:
        structure = world.extract_structure(selection, dimension)
        structure_cache.add_structure(structure, structure.dimensions[0])
        yield from delete(
            world,
            dimension,
            selection,
        )
    else:
        raise OperationError(
            "At least one selection is required for the copy operation.")
예제 #3
0
 def delete(self):
     self.run_operation(
         lambda: delete(self.world, self.dimension, self.selection_group)
     )