# 7.3. XFEM Carving

In addition to modeling fracture and fragmentation, XFEM can also be used for fast mesh generation or wearing of surfaces via “carving.”” The carving procedure is roughly equivalent to an immersed boundary approach; boundary and contact surfaces are represented by the XFEM cut surface, and the effective carved element response is computed via XFEM volume fraction scaling.

The initial mesh may be carved with the command line

    INITIAL CUT WITH {SIDESET|STL} = <string>file_or_surface_name
      [REMOVE {INTERIOR|EXTERIOR|NOTHING(NOTHING)}]

where `STL` indicates to carve the mesh with a stereolithography (STL) file [[1]], while the `SIDESET` option indicates to carve with a specified sideset from the input mesh file.

Carved material may be removed after the cut is made via the option `REMOVE {INTERIOR|EXTERIOR}`, where the “exterior” consists of all material points lying outside of the region bounded by the carving surface in the direction of its outward normal vector; similarly, the “interior” is the region bounded by the carving surface in the direction opposite its outward normal. As an example, the XFEM command block to cut all blocks with a surface defined in an STL file `file.stl` and remove material interior to the surface is the following:

    BEGIN XFEM
      INCLUDE ALL BLOCKS
      INITIAL CUT WITH STL file.stl REMOVE INTERIOR
    END [XFEM]

[1]

3D Systems, Inc. SLC File Specification. 1994.