Open 3DManuH opened 3 years ago
Ah yes, this is currently a known limitation. Transforms are assumed to be in Cartesian directions (i.e. Global orientation). Figuring out the oriented bounding box is a known hard problem. Maybe we can take some shortcuts for orientations in the normal direction by calculating the sum of the normals of all selected elements. I assume at least that's how it works.
Has this ever worked for MeshTools btw ?
No, not working for MeshTools as well. Would be awesome to have this working for CAD Mesh Dimensions and MeshTools. Would use/need this feature all day long.
I have something working. Needs some generalization though. And I don't know yet how it would be clear to the viewer/modeler which direction would be x, y or z. Look at the video, the gizmo changes orientation as I resize. Probably not what we want to happen in the Panel.
cool, that looks promising! hopefully you can remedy the gizmo orientation.
I've pushed a new version that implements transform orientation 'NORMAL'.
A few notes:
Looking forward for some feedback.
sorry can't get it to work as expected. anything i am doing wrong?
It looks like I screwed something up with matrices. It currently only works for objects which are at world origin (0,0,0) :rofl: I'll have another go at this... If you want a sneak preview, put your object at world center for now ;-)
ok, good to know. works really great so far besides the world origin limitation.
there is no local orientation right now. Is this something that could be added?
sorry, seems like i can not create a pull request. (Choose different branches or forks above to discuss and review changes. Learn about pull requests)
possible to add a shortcut for CAD Mesh Dimension? So you are not forced to use N-menu but can access the addon with shortcut?
I'm afraid we hit a serious snag. I overlooked something in my approach. When custom orientations ('normal' is a special form of custom orientation) are involved, you cannot easily map the scale in the custom orientation to global and then expect this to work. There can be many bounding boxes in the custom orientation that map to a single bounding box in global orientation (vice versa).
This means, that we cannot use bpy.ops.transform.resize() (which is what cad_mesh_dimensions (and also MeshTools: edit_dimensions) is built around. I now understand why it wasn't included in the original addon either. It's hard. Add to this that we cannot access the Gizmo matrix easily. And that the Gizmo most of the time is not aligned properly anyway (See blue arrow in picture), basically you'd have to manipulate the mesh vertices directly and implement it for all the possible anchor points. This is way more than I bargained for when I set out to implement this feature request.
So unless we can come up with some clever trick, or I develop a need for this feature that overcomes my reluctance to dive into direct vertex manipulation, this issue is stuck.... Sorry. I gave it my best for now...
sad to hear that. thank you for the hard work until now. hopefully you’ll find a workaround to get this fixed.
Hi Marcel, are there any plans to support normal (or 3d cursor) transformation?
Can't transform in normal direction. Pivot is set to 3D cursor (works) - orientation to normal (doesn't worK) It scales as shown with red line but should work as shown with green lines on screenshot.