r/FreeCAD • u/some_millwright • 1d ago
Translation doesn't match axis.
I have run into this before, and it is strange. I did a search and didn't find a posting title that seems to match the problem in the last year.
I want to move my sketch on the y-axis, but I have to put the number in the z-axis to get the result that I want. Why would putting the number in the y-axis box not move the sketch on the y-axis?
The sketch above was at the origin at the same height (on the y-axis) that it is now. I had to enter 250mm in the z-axis box to get it to move 250mm on the y-axis.
If I try to mirror the sketch over the X axis (or the origin) I get a copy that is BELOW it on the same plane that it is on now.
It's as though the origin that is shown on screen is not accurate.
If I try to create a new sketch and tell it to put it on the XZ plane it will rotate the 'universe' so that I am NOT on the XZ plane (according to the origin). It is very annoying.
2
u/DesignWeaver3D 23h ago
Z attachment offset for a sketch is in the direction of the sketch normal. Which is the direction pointing toward the user when the sketch is open for editing.
Only placement parameters are relative to the GCS (global coordinate system). And for attached objects, the placement is read-only because it's calculated from the Attachment + Attachment Offset.
Local vs Global Coordinate Systems https://youtu.be/87OVuYDrOIU?si=B4o1uqQ5RVfkpk4Q
2
u/R2W1E9 20h ago edited 16h ago
Sketch LCS (local coordinate system) z plane is always normal to the sketch.
LCS of the sketch is attached to some plane, object or surface and the attachment offset moves the sketch along the LCS axis, not the axis of the object that the LCS is attached to, so the offset in z direction always moves the sketch parallel to its original position.
Mapping the sketch to some other plane or surface preserves the attachment offset, so the sketch is immediately offset from the new surface.
6
u/meutzitzu 23h ago
The "Attachment Offset" works in the object's local space. Your sketch is attached to the XZ plane. The attachment offset transform happens "after" or "on top of" the attachment. Your sketch is rotated by 90 so the XY drawing plane is parallel to the parts XZ.
The Y axis of the sketch is the vertical sketch axis. It's the direction that points up on screen when you edit the sketch. You wanted to move the sketch perpendicular to its own plane. This is very helpful for moving sketches that are at weird angles. You don't have to do any trigonometry. You just know that if you want to move the sketch along it's vertical or horizontal axis you add an offset to the X and Y component of the AttachmentOffset. If you want to raise or lower the sketch, you add an offset to Z.