Confusion about Y or Z axis Placement on plane [Solved]

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
FredCailloux
Posts: 52
Joined: Wed Jul 14, 2021 7:37 pm
Location: Canada

Confusion about Y or Z axis Placement on plane [Solved]

Post by FredCailloux »

Code: Select all

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: French/Canada (fr_CA)
A Body01 is created. It include a Sketch01 to build a somewhat complex shape.
Then a Revolution01 attribute build the solid wheel.
The Sketch01 is originally built on the XZ plane.
X is horizontal and Z is vertical on the rendering window. Sketch01 is fully constrained.
A second Body02 represent the axis holding the wheel.
In order to visualize both Bodies, Sketch01 is raised by 30mm in the Z direction.
This is done in the Combo View window, selecting Sketch01 the Property dialog box is shown.
In the Attachment section, the Attachment dropdown list is opened and as well as the Position dropdown list. In the Position dropdown list appear the x , y , z position values.
From there the position z is changed to 30.00 mm.
The result is that Body01 will drift to -30 mm on the Y axis, not the Z axis.
That result is not expected. So the z value position is reverted back to 0 mm and instead the y value position is changed to 30.00 mm. Now the Body01 is correctly position 30 mm above the XY plane on the Z axis.
The Questions: Why is Body01 displaced in the Y axis when the Z position is changed ?
Shouldn’t the Z position adjustment change the Body’s position on that particular Z axis 30 mm above ? I struggle understanding that behavior.
WheelHub.FCStd included

Thanks
Attachments
WheelHub.png
WheelHub.png (60.91 KiB) Viewed 758 times
WheelHub.FCStd
(121.83 KiB) Downloaded 6 times
Last edited by FredCailloux on Sat Aug 20, 2022 9:45 pm, edited 1 time in total.
Great results only comes with great understanding. Great memory is just an illusion.
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Confusion about Y or Z axis Placement on plane

Post by Shalmeneser »

For a sketch attachment :
* X and Y are as inside the sketch
* Z is outside the sketch

X, Y, Z are relative to the sketch, not to the global axis. And it's better for you.

(Btw, the revolution sketch is complex imho and body002 can be just one revolution and 2 pockets.)
(Spreadsheet is really PITA here)
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Confusion about Y or Z axis Placement on plane

Post by chrisb »

FredCailloux wrote: Mon Aug 15, 2022 10:07 pm From there the position z is changed to 30.00 mm.
The result is that Body01 will drift to -30 mm on the Y axis, not the Z axis.
It is not the body that moves, it is the feature inside. That feature depends on the sketch. The sketch has its own coordinate system: When you edit the sketch, then x goes to the right, y goes up, z is orthogonal to the sketch plane. The sketch of the revolve is in the global XZ plane, thus moving it locally orthogonal to the sketch plane, moves it globally in y direction.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
FredCailloux
Posts: 52
Joined: Wed Jul 14, 2021 7:37 pm
Location: Canada

Re: Confusion about Y or Z axis Placement on plane

Post by FredCailloux »

chrisb wrote: Mon Aug 15, 2022 10:20 pm It is not the body that moves, it is the feature inside. That feature depends on the sketch. The sketch has its own coordinate system: When you edit the sketch, then x goes to the right, y goes up, z is orthogonal to the sketch plane. The sketch of the revolve is in the global XZ plane, thus moving it locally orthogonal to the sketch plane, moves it globally in y direction.
So, what your saying, if my understanding is correct, is that the Y(sketch) is in the same direction as the Z(rendering window) ?
Great results only comes with great understanding. Great memory is just an illusion.
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Confusion about Y or Z axis Placement on plane

Post by Shalmeneser »

:idea:
Attachments
Capture d’écran 2022-08-16 011714.jpg
Capture d’écran 2022-08-16 011714.jpg (66.2 KiB) Viewed 691 times
WheelHub_SHALM.FCStd
(96.33 KiB) Downloaded 6 times
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Confusion about Y or Z axis Placement on plane

Post by Shalmeneser »

FredCailloux wrote: Mon Aug 15, 2022 10:46 pm So, what your saying, if my understanding is correct, is that the Y(sketch) is in the same direction as the (+/-)Z(rendering window) ?
Only if you sketch upon XZ plane.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Confusion about Y or Z axis Placement on plane

Post by GeneFC »

FredCailloux wrote: Mon Aug 15, 2022 10:46 pm So, what your saying, if my understanding is correct, is that the Y(sketch) is in the same direction as the Z(rendering window) ?
The way I think about it is that one should consider how the sketch appears in the sketcher. X and Y movements are obvious, and Z movement is positive when the sketch moves out of the screen toward the user.

You will need to twist your head around when trying to move the sketch that is already back in the body. If the sketch was drawn on the x-y plane the situation is pretty easy to comprehend. If the sketch was drawn on another plane the it is a bit more difficult.

Gene
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Confusion about Y or Z axis Placement on plane

Post by chrisb »

Let me loose a few words why it is very sensible the way it is: When your sketch has a nontrivial orientation, e.g. on a slanted face, then you can easily offset it by using the local coordinate system or it can be moved on the face by changing its x and y coordinates. That would be near to impossible if the coordinates are global.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
drmacro
Veteran
Posts: 8864
Joined: Sun Mar 02, 2014 4:35 pm

Re: Confusion about Y or Z axis Placement on plane

Post by drmacro »

This is a typical thing where I actual sit down and do experiments to solidify the concept...before moving on and assuming I get it it because...what ever reason.

In this case I start by turning on the axis cross (View>Toggle axis cross or key shortcut A,C):
Snip macro screenshot-43cf4a.png
Snip macro screenshot-43cf4a.png (65.75 KiB) Viewed 533 times
This orients us in global coordinates.

If we now create a sketch on the XY_Plane and tilt a bit off the sketch plane we can see the Y (green) axis in the sketch maps to the Y (green) arrow of the global Y. Same for the X sketch and X global. And we note the Z+ is coming out of the screen.
Snip macro screenshot-189aa7.png
Snip macro screenshot-189aa7.png (84.17 KiB) Viewed 533 times
Create a sketch on the XZ_Plane and we see sketch Y is now mapped to global Z and sketch is mapped to global X. And that sketch Z is now mapped to global Y.
Snip macro screenshot-75dba8.png
Snip macro screenshot-75dba8.png (90.11 KiB) Viewed 533 times
Similarly for a sketch on the YZ_Plane, sketch Z is mapped to the global X.
Snip macro screenshot-4b3462.png
Snip macro screenshot-4b3462.png (88.27 KiB) Viewed 533 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Post Reply