hlorus / CAD_Sketcher

Constraint-based geometry sketcher for blender
GNU General Public License v3.0
2.59k stars 122 forks source link

[BUG] Workplane rotations applied to the object instead of the object's mesh/curve #419

Closed Miguel-Rodrigues closed 7 months ago

Miguel-Rodrigues commented 7 months ago

Contact Details

miguel.c.rodrigues@gmail.com

Description

The workplane rotations are applied to the object itself rather than the generated mesh or curve. This causes some issues on modifiers and other geometry node operations are relative to the object cartesian rotation, for example circular arrays, Screw or LaplacianSmooth modifiers.

It makes total sense to preserve the object location based on the workplane as the workplane origin point refers to the origin point of the mesh, but the rotation should be applied directly to the mesh, so the object rotations behave expectedly like other blender objects.

For this example I'm trying to make a rubber fitting for a motorcycle turn signal. The object at the right represents the desired shape. To make the circular copies I use an empty arrow object representing the object offset for the array modifier. The expected behaviour is to make 8 copies of the original form in a radial layout, around the X axis. If I try to do this the object becomes shaped like "a flower" instead of the expected "cog" appearance. To overcome this I have to negate the 90° rotations at X and Z and apply 45° at the Y axis, at the empty object, which for some people may not be very intuitive.

At the Zip archive there is the file with the example case.

image

image

image

image

image

https://github.com/hlorus/CAD_Sketcher/assets/10254384/381dd8c3-4e6f-4e39-9b70-17b2a9824d69

Addon Version

0.27.2

Blender Version

3.6.2

What platform are you running on?

Windows test.zip

Miguel-Rodrigues commented 7 months ago

I had some thought about this issue and may not be considered a bug but how blender deals with objects. If trying to scale objects with mesh rotation it deforms based on the global plane of reference instead of the workplane, that's why you require to apply rotations to the object...

Miguel-Rodrigues commented 7 months ago

Closing