prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.63k stars 1.92k forks source link

Rotating Generic Box about Z axis actually rotates about Y #3521

Open Incendium87 opened 4 years ago

Incendium87 commented 4 years ago

Version

2.1.0

Operating system type + version

Windows 7

3D printer brand / version + firmware version (if known)

I3 Mk3

Behavior

Is this a new feature request? No

Project File (.3MF) where problem occurs

Upload a PrusaSlicer Project File (.3MF) (Plater -> Export plate as 3MF for Slic3r PE 1.41.2 and older, File -> Save / Save Project for PrusaSlicer, Slic3r PE 1.42.0-alpha and newer) Images (PNG, GIF, JPEG), PDFs or text files could be drag & dropped to the issue directly, while all other files need to be zipped first (.zip, .gz)

Prusa Slicer Rotation.zip

neophyl commented 4 years ago

I think its because the axis are fixed relative to the enforcer. Its more apparent whats happening if you rotate your enforcer 45 degrees around X first and then try and rotate around Z, The Z (and other axis) moves with the part rather than staying locked to the World space.

Wether that's a bug or intended design operation I don't know but both methods are certainly valid ways of handling it.

Incendium87 commented 4 years ago

I agree that the axes move with the enforcer, and I think that this behavior would be fine and perfectly logical if it was consistent. My initial problem was that when the enforcer was first created it was rotated about X by 90° already. Then, when I wanted to rotate about Z, which was the long axis of the enforcer (the 30 mm edge), the enforcer did not rotate about the long axis even though the arrows displayed on screen seemed to show that it would.

An additional and probably related problem I have just found is that the rotation, axes orientation, and scaling of the enforcer is not persistent and resets to an odd orientation. When I reopened my .3mf file to respond to your comment, I found the rotation, scaling, and size had been reset. All rotations were 0° and all scaling was at 100%. This caused the originally rotated part to have dimensions of 28.28x28.28x10 (xyz) rather than the original 101030. With dimensions of 28.28x28.28x10 and with the enforcer in the orientation shown, this indicates that the coordinate system that the enforcer defaulted to has Y up (along machine Z) and Z to the front of the machine (along machine y). This is confirmed by the way the arrows highlight on screen when you click into the size text field to change the size of the enforcer.

image

Streeter1981 commented 4 years ago

I'm finding that the rotation is just completely off on any modifiers --- the axes do not align properly with X, Y, and Z.

I think the "reason" it's doing this is because it's aligning the axes per however the part that the modifier is attached to was rotated. In this case, I set the back face of the part to the bed. So the modifier seems to be picking that up. Unfortunately, that renders the modifier useless in that one can't effectively manipulate it into the correct position.

I just added a modifier and here are the default axes available for rotation: Snag_ce07f32

Due to this issue, I may have to downgrade back to 2.1 as I simply cannot use any modifiers because I can't put them in any position. By default the rotation is set to the below values when I add the modifier.: Snag_ce141c7

Again that's before I've even touched the modifier, but after placing the part on a particular face.

If I set those values to 0, then the modifer shows as: Snag_ce20ce7

Erwos commented 3 years ago

I think my problem is related to this one. When I move the Enforcer box in the Y axis, the Z value changes in the Part Manipulation Position box instead of the the Y. Makes me wonder if the Y and Z got swapped.

image

When Y Position Box has focus image

When Z Position Box has focus image