Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D View - Sculpt Mode - Sculpt header legacy - new Line Trim #4252

Open
Draise14 opened this issue May 14, 2024 · 0 comments
Open

3D View - Sculpt Mode - Sculpt header legacy - new Line Trim #4252

Draise14 opened this issue May 14, 2024 · 0 comments
Labels
0 - task A normal development task

Comments

@Draise14
Copy link
Collaborator

image

New line trim act-once operator... that already exists in the toolshelf.

Add icon, document.

Details

SHA-1: d4a6164

  • Sculpt: Add Line Trim tool

This PR adds the Line Trim tool to Sculpt mode. It is exposed via
the toolbar along with the other Trim tools and as an entry in the
Sculpt menu.

Technical Approach

Line gestures are represented as two points in screen space: the start
and end of the gesture. Trim tools work by taking a set of screen
points as the top face of a volume, projecting a copy of the face into
the scene, then using that as the operand shape for boolean operations.
To behave as users would expect, the Line Trim tool does the following
steps to make the initial face:

  1. Take the sculpted object's bounding box.
  2. Project the bounding box into screen space
  3. Take the magnitude of the diagonal line made from the bounding box
  4. Use the magnitude multiplied by an arbitrary factor to ensure the
    initial line is long enough to fully divide the object.
  5. Create two points by moving in a perpendicular direction from start
    and end points.
  6. Use the resulting four points as vertices of the quad in screen space.

Differences with Other Trim Tools

  • Line Trim only supports the Difference mode. As such, the
    corresponding tool options have been disabled in the header.

Alternatives

  • Instead of using a boolean operation, this could be achieved by using
    a bisect operation when using the Fixed projection mode. While this
    may result in a better performing tool, it is not guaranteed and
    requires extra work to integrate this approach.

Pull Request: https://projects.blender.org/blender/blender/pulls/120845

@Draise14 Draise14 added the 0 - task A normal development task label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - task A normal development task
Projects
None yet
Development

No branches or pull requests

1 participant