# Clipping geometries

There are often cases where geometry does not align, one or more meshes that intersects with each other, is covered by other objects or simply sticks out for no apparent reason. A common case is where foliage, rocks and buildings intersects the ground plane/geometry, which can have a negative impact on performance.

Simplygon provides a clipping geometry feature that allows the user to specify a clipping geometry. The clipping geometry will (for remeshing) clip everything that intersects with the clipping geometry and remove triangles that are in the negative normal direction of the surface.

To be able to clip a geometry when doing Remeshing (or any other optimization that supports clipping geometry) a clipping selection set needs to be created. Go to the main toolbar next to the "Manage Selection Sets" button and name the set "ClippingSelectionSet" as in the screenshot below.

Selection sets:

Selection sets

The next step is to make Simplygon aware of which selection set to use, this can be accomplished by assigning the set using the Simplygon UI, but in this case we'll do it via script. In the script below we'll load a remeshing pipeline from file, then simply change the clipping set name.

All selection sets specified in the Pipeline will get exported to Simplygon automatically, there's no need to select the clipping geometry.

    Resulting mesh to the right:

    Clipped geometry