\section{How to use the carving manager}

CarvingManager uses a sphere model to remove elements from a surface model. When the sphere collides with the surface model, all the elements which are in contact with the sphere are removed.

NOTE: To be able to detect the proximity between the models, the surface model must be mapped into a triangle model using a topological mapping, like in the example showed below:

\begin{code_xml}
	<Node name="Liver" >
		<Object type="MeshLoader" filename="mesh/liver.msh" />
		<Object type="MechanicalObject" />
		<include href="Objects/TetrahedronSetTopology.xml" />
		<Node name="CollisionModel" >
			<include href="Objects/TriangleSetTopology.xml" />
        		<Object type="Tetra2TriangleTopologicalMapping" object1="@../Container" 
				object2="Container"/>
			<Object type="TriangleSet" contactStiffness="100" />
		</Node>
	</Node>
\end{code_xml}

The different Data's of this object are:

\begin{itemize}
\item \textbf{modelTool}: This data determines the name of the sphere model. If empty, a sphere model will be searched in the node of the CarvingManager. If it is not found, an error will occur.
\item \textbf{modelSurface}: It determines the surface model. If empty, a surface model (more exactly a triangle model mapped to another geometrical model using a topological mapping) will be searched in the whole scene. If not found, an error occurs.
\item \textbf{active}: activate/deactivate the object.
\item \textbf{key}: activate the object only when an event using this key is caught.
\item \textbf{keySwitch}: activate this object when an event using this key is caught and deactivate it when the event is caught.
\end{itemize}

An example of how to use this object can be found in \textit{examples/component/collision/CarvingManager.scn}
