UCutMeshWithMeshTool

[UCutMeshWithMeshTool](API\Plugins\MeshModelingTools\UCutMeshWithMeshTool) cuts an input mesh into two pieces based on a second input mesh.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MeshModelingTools

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/MeshModelingTools/Public/CutMeshWithMeshTool.h

Include

#include "CutMeshWithMeshTool.h"

Syntax

UCLASS()
class UCutMeshWithMeshTool : public UBaseCreateFromSelectedTool

Remarks

UCutMeshWithMeshTool cuts an input mesh into two pieces based on a second input mesh. Essentially this just both a Boolean Subtract and a Boolean Intersection. However doing those as two separate operations involves quite a few steps, so this Tool does it in a single step and with some improved efficiency.

Variables

Name Description

Protected variable

TArray< int >

 

CreatedIntersectBoundaryEdges

Protected variable

TArray< int >

 

CreatedSubtractBoundaryEdges

For visualization of any errors in the currently-previewed CSG operation

Protected variable UProperty

TObjectPtr< UCu...

 

CutProperties

Protected variable UProperty

TObjectPtr< ULi...

 

DrawnLineSet

Protected variable

FDynamicMesh3

 

IntersectionMesh

Protected variable UProperty

TObjectPtr< UPr...

 

IntersectPreviewMesh

Protected variable

TSharedPtr< FDy...

 

OriginalCuttingMesh

Protected variable

TSharedPtr< FDy...

 

OriginalTargetMesh

Constructors

Name Description

Public function

UCutMeshWithMeshTool()

Functions

Name Description

Protected function

void

 

UpdateVisualization()

Overridden from UBaseCreateFromSelectedTool

Name Description

Protected function Virtual

void

 

ConvertInputsAndSetPreviewMaterials

(
    bool bSetPreviewMesh
)

UBaseCreateFromSelectedTool API - subclasses typically implement these functions After preview is created, this is called to convert inputs and set preview materials (grouped together because materials may come from inputs) Subclasses should always implement this.

Protected function Virtual Const

FText

 

GetActionName()

Return the name of the action to be used in the Undo stack

Protected function Virtual Const

FString

 

GetCreatedAssetName()

Return the name to be used for generated assets.

Protected function Virtual

void

 

SaveProperties()

Overload to save any added properties in the subclasses; called on shutdown

Protected function Virtual

void

 

SetPreviewCallbacks()

Optional overload to set callbacks on preview, e.g. to visualize results; called after preview is created.

Protected function Virtual

void

 

SetupProperties()

Overload to initialize any added properties in subclasses; called during setup

Overridden from UInteractiveTool

Name Description

Protected function Virtual

void

 

OnPropertyModified

(
    UObject* PropertySet,
    FProperty* Property
)

Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes

Protected function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Overridden from IDynamicMeshOperatorFactory

Name Description

Protected function Virtual

TUniquePtr< ...

 

MakeNewOperator()

IDynamicMeshOperatorFactory API.