d4a61647bf571cb90090e1320f4aa1156482836f
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
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
