Cutter
Cutting MUs into multiple parts
Last updated
Cutting MUs into multiple parts
Last updated
The Cutter component is designed to efficiently segment Movable Units (MUs) into distinct pieces by slicing the meshes within these units along a specified plane. This process divides the MUs into a positive side and a negative side, ensuring that all included meshes are precisely cut according to the plane's orientation. This functionality is integral for simulations requiring dynamic object modification, such as cutting or dividing objects into separate parts for further interaction.
The Cutter component offers versatility in its cutting operation, allowing it to either divide the entire Movable Unit (MU) or selectively slice only specific meshes within the MUs that are designated by tags.
This example demonstrates two distinct cutting processes using the Cutter component, where in both instances, the positive part of each cut is deleted—a configurable option. During the first cut, the entire Movable Unit (MU) is subjected to the slicing action. In the second cut, the process is refined to only target and slice the outer mesh of the MU. The DemoCutter Scene, showcasing the Cutter component's functionality, is located in the demo folder.
The Cutter component requires the 'BzKovSoft.ObjectSlicer' package from the Unity Asset Store.
Ensure this package is installed and the Scripting Define Symbol REALVIRTUAL_CUTTER
is set in your project settings.
A demo package showcasing the Cutter component's capabilities is available. For more details and to download the package, please refer to the description on the Unity Asset Store.
The simplest method to utilize the Cutter component is by dragging and dropping the Cutter prefab directly into your scene. All cutting actions performed by this component are based on the Plane, which is oriented according to the Y direction of the component.
Settings
Cut Material: Assigns a material to the faces created by the cut.
Delete Options: Allows for the deletion of either the positive or negative side of the cut object.
Block For Seconds After Cut: Temporarily disables cutting after a cut is performed to prevent rapid successive cuts.
Submesh Cutting: Option to cut only specified submeshes by tagging them.
Signals / IOs
Start Cut: A boolean signal that, when true, initiates the cutting process. This can be linked to an external PLC signal for automation.
Signal Cut: Represents an external trigger for starting the cutting process.
Cutting Process:
The component detects colliders entering its trigger area (defined by the included box collider), identifying objects for cutting.
When the Start Cut
signal is activated, the component slices through the detected objects based on the configured settings.
Submesh and Full MU Cutting:
If OnlySubmeshes
is enabled, only the parts of objects tagged with SubmeshTag
are cut. Please make sure to define the tags for the Submeshes
Without OnlySubmeshes
, entire objects within the trigger area are subject to cutting.
Post-Cut Handling:
Objects can be selectively destroyed based on the DeletePositiveCut
and DeleteNegativeCut
settings.