Open nickberckley opened 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:
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:
Circle with 16 vertices (this is not a gpu
shader issue, that's how verts are aligned)
Bevel on polyline when one of the points doesn't align with others. As the angle between corners increases, verts get distributed more tightly.
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:
It is proving difficult to always have bounding box bottom-right corner attached to cursor. Reason why cursor disappears during
R
modifier in modal is that after rotation is done cursor should still be at the bottom-right corner of the bounding box (visualized by red outline). That is important because snapping happens at the cursor position, and to ensure perfect snapping bounding box should be there too, otherwise snapping is unpredictable and pointless. (I think this might be because of bug incontext.cursor_wrap
function, so I'll file a bug report to Blender, but maybe its something else)In corner origin mode top-left corner keeps twitching and isn't perfectly fixed This problem appeared once I added rotation, and couldn't fix after that.
Doesn't work for
Polyline
tool at all (to be completely honest I don't remember exactly why, I think because getting the center point was difficult when cursor position counts as point as well).Bevel clamping breaks with rotation. I think the problem is bounding box doesn't take rotation into account and bevel function isn't fed correct width and height. But there is also problem with first point. After rotation is done (in center origin mode) initial cursor position remains as first and origin point. This also makes resizing shape difficult and unpredictable. I believe for the box after the rotation top-left corner of the shape should become new origin point, wherever it might be.
Array gap needs to be able to subtract rotation to perfectly align rotated shapes at 0 gap. Think this might same as bevel clamping issue, because both depend on bounding box width and height, which is not updated.
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.