nickberckley / bool_tool

Quick boolean operations and carving tools for hard surface mesh modeling (Blender 4.2 and upward)
https://extensions.blender.org/add-ons/bool-tool/
GNU General Public License v3.0
6 stars 1 forks source link

Carver: Rotation issues #23

Open nickberckley opened 2 months ago

nickberckley commented 2 months ago

Rotation in carver tool has many issues that make the feature almost broken and barely functional, all of which are there because embarrassingly I understand nothing about matrices and rotations.

Rotation happens in first step of the operator (steps described in #22) when the 2D shape (list of vertices) is created. I believe issue could be WHEN the rotation matrix is applied to the verts, but experimenting with other orders didn't give me anything.

Known issues with rotation are:


There are some to-dos which are easy to do (and some in fact I have already done), like rotation snapping and changing rotation by circling cursor around shape, instead of moving left-to-right, but without those issues fixed there is little point in them, unfortunately.

nickberckley commented 2 months ago

One more rotation related issue is with bevel. Beveling works very well with rectangle, but for any more or less points it breaks. Circle is possible for Circle tool and is only disabled in UI, because of that problem.

This is bevel on Circle tool with 4 verts: image

Issue I think is with the fact that rotation applied in create_2d_circle function (/functions/draw.py in draw_circle) isn't considered by bevel for some reason. Even for four verts bevel only works if initial rotation fed to create_2d_circle is 45 degrees. Weirdly enough if you rotate the rectangle with rotation property issue doesn't happen, probably because it is applied after.

If bevel can be made to work on non-90 degree corners it could be enabled for Circle for triangles, and for Polyline as well which is where it is really useful.

Some other screenshots of broken bevel:

image Circle with 16 vertices (this is not a gpu shader issue, that's how verts are aligned)

image Bevel on polyline when one of the points doesn't align with others. As the angle between corners increases, verts get distributed more tightly.