Skip to content

Add Lasso Cut Tool (edit_cut plugin)#1640

Open
Z3roCo0l wants to merge 5 commits intocnr-isti-vclab:develfrom
Z3roCo0l:lasso-cut
Open

Add Lasso Cut Tool (edit_cut plugin)#1640
Z3roCo0l wants to merge 5 commits intocnr-isti-vclab:develfrom
Z3roCo0l:lasso-cut

Conversation

@Z3roCo0l
Copy link

Summary

A new editing tool that draws a closed polyline to cut through mesh triangles and select the inside region.

Features

  • Click to add polyline points on the mesh surface
  • Q — cut edges along the polyline and add inside faces to selection
  • W — subtract inside faces from selection
  • D / A / I — deselect all / select all / invert selection
  • Delete — delete selected faces (delegates to MeshLab's standard filter_select with full undo support)
  • C — clear polyline, Backspace — undo last point, Escape — clear polyline

The tool appears in its own Dynart Tools toolbar section, separate from the standard Edit toolbar.

Implementation

Test plan

  • Load a mesh, activate Lasso Cut tool
  • Draw a polyline with clicks, verify visual feedback
  • Press Q to cut — verify edges are split along polyline and inside faces are selected
  • Press W to subtract — verify selection is reduced
  • Press Delete — verify selected faces are removed
  • Verify Backspace undoes last point, C clears polyline, Escape clears polyline
  • Build on Windows, Linux, macOS

Note: This is PR 2 of 3 (split from #1638). Depends on #1639 (global parameter system). PR 3 (Undo/Redo) builds on this.

Z3roCo0l and others added 5 commits February 12, 2026 10:36
…eload confirmations

- EditPlugin base class: initGlobalParameterList + setCurrentGlobalParamSet
  for persistent per-plugin settings
- edit_select: opt-in "Invert CTRL Behavior" parameter (default OFF)
- Reload/Reload All confirmation dialogs
- Updated all edit plugin factory headers for new interface
New edit plugin that lets users draw a polyline on screen and cut through
mesh triangles along the path. Splits edges at polyline intersections,
re-triangulates affected faces, then selects/deletes faces inside the
polyline boundary.

Features:
- Polyline drawing with mouse clicks
- Edge splitting at polyline-mesh intersections using SplitTab
- Centroid-based face selection for clean boundary cuts
- Two-phase workflow: Q to select (preview), Enter to delete
- Full edit_select-style keybindings (Q/W/D/A/I)
- GPU buffer refresh after mesh modification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove deleteSelectedFaces from edit_cut and let filter_select's
standard Delete shortcut handle deletion (proper undo/redo support).
Preserve selection across endEdit/Escape so the shortcut works.
Move edit_cut button from Edit toolbar to new Dynart Tools toolbar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Strip cutLog/cutLogQ calls, LOG_PATH, and windows.h/cstdio includes.
Clean production code ready for release.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant