GeneFC wrote: ↑Wed Oct 21, 2020 4:52 pm
This is actually quite trivial. The sketch moves in its own coordinate system. Therefore a pure z-move should work. (If I understand what you want.
)
Gene
On first reading I agreed with Gene, was about to say the same, but now I see that you want the offset value on a vector that is not an axis, and doing the above via the sketch's offset would first offset the sketch to a position along the axis or axes set, and then rotate the sketch relative to those axes. These axes are the axes of an imaginary plane that the sketch would be attached to. So since you attached the sketch to the XZ axis, its attachment plane would have a
1) Z axis running in the direction of -y of the Body
2) Y axis running in the direction of Z of the Body
3) X axis running in the direction of X of the Body
So your sketch would first move based on offset values as explained above, it would then rotate at that new position around the attachment plane axes as above, i.e. not the Body Axes...confusingly in this case the sketch attachment plane and Body axis have the same X axis, but that is just specific to this case since it is caused by where you attached it.
But since you in effect want to first rotate the sketch and then move it relative to the sketch's new z axis...the answer is very simple..
So all you had to do in this case was attach a datum plane to XZ plane, set it's rotation offset values only, then attach your sketch to that datum plane and set the distance offset (which is now just Z axis since it is the Z axis of the datum plane and not of the Body object).
So as Gene said
GeneFC wrote: ↑Wed Oct 21, 2020 4:52 pm
This is actually quite trivial.
Here are some screenshots and a demo file.
The cuboid is just created at Body origin to demonstrate the Body axis system, the cylinder is as Gene suggested and the prism is what you should have done.
- Screenshot_20201023_100427.png (14.39 KiB) Viewed 982 times
Jim
OS: Ubuntu 18.04.5 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 537089b34609308bdb11a8b139dbf013dc7e6ce3
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)