moving a subtractive shape shifts origin of sketches

Post here for help on using FreeCAD's graphical user interface (GUI).
User avatar
uwestoehr
Posts: 345
Joined: Sun Jan 27, 2019 3:21 am

moving a subtractive shape shifts origin of sketches

Postby uwestoehr » Tue Feb 19, 2019 3:03 am

For me it is important to have a good and fixed origin for the sketches. My body is based on a cylinder and thus chose the center of its ground face as origin for the sketches.
The problem is that movement of a subtractive shape moves the origin away and thus my sketches and pockets move too.

To reproduce:
- open this file:
Sketch-Origin-problem.FCStd
(16.79 KiB) Downloaded 8 times
You can see that the pocket is nicely centered in the cylinder - as it should be.

- now double-click on the sphere and move its position a few mm away in y- and z-direction

result: the pocket is moved away too because the origin point was moved by the movement of the subtractive sphere.
This is not what I need. I need the subtractive sphere at y=z=3 mm and the pocket centered in the cylinder.

How can I achieve that the sphere movement is not connected to the pocket position?

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Last edited by uwestoehr on Tue Feb 19, 2019 9:36 pm, edited 1 time in total.
User avatar
meme2704
Posts: 2527
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: moving a subtractive shape shifts origin of sketches

Postby meme2704 » Tue Feb 19, 2019 9:21 am

Hi
In Partdesign I noticed that the orientation of the axes and their positions is incremental by default
so when you position the sphere at -3mm, it is from this point that the new position of XYZ starts again, including the direction (a value of Y corresponds to X Word for example)
This seems to me to be an aberrant action
chrisb
Posts: 14019
Joined: Tue Mar 17, 2015 9:14 am

Re: moving a subtractive shape shifts origin of sketches

Postby chrisb » Tue Feb 19, 2019 11:58 am

uwestoehr wrote:
Tue Feb 19, 2019 3:03 am
How can I achieve that the sphere movement is not connected to the pocket position?
If you want the sketch or the pocket independent from the sphere you must not attach it to the sphere.
Attachments
Bildschirmfoto 2019-02-19 um 12.56.37.png
Bildschirmfoto 2019-02-19 um 12.56.37.png (31.34 KiB) Viewed 131 times
User avatar
uwestoehr
Posts: 345
Joined: Sun Jan 27, 2019 3:21 am

Re: moving a subtractive shape shifts origin of sketches

Postby uwestoehr » Tue Feb 19, 2019 9:07 pm

chrisb wrote:
Tue Feb 19, 2019 11:58 am
If you want the sketch or the pocket independent from the sphere you must not attach it to the sphere.
Thanks Chris. I see that the dependency is incorrect but what have I done wrong? I did this:
  1. created a sketch, draw a circle, made a pad
  2. then I created the subtractive sphere (at the origin)
  3. then I selected a face of the pad and created there a sketch to to it
  4. I made a packet using the sketch
  5. later I realized that I need to move the sphere a bit
So at what step do I have to act differently and how to avoid that my pocket is dependent in the sphere? I mean I created its sketch at the pad, not the sphere thus O don't understand why it is dependent on the sphere.
chrisb
Posts: 14019
Joined: Tue Mar 17, 2015 9:14 am

Re: moving a subtractive shape shifts origin of sketches

Postby chrisb » Tue Feb 19, 2019 11:15 pm

You should always attach a sketch to the earliest stage possible. Best would be to attach NextSketch to XY plane. Easiest would be to attach it to Pad. You do so by making Pad visible and attach the sketch to the appropriate face.
User avatar
uwestoehr
Posts: 345
Joined: Sun Jan 27, 2019 3:21 am

Re: moving a subtractive shape shifts origin of sketches

Postby uwestoehr » Tue Feb 19, 2019 11:25 pm

chrisb wrote:
Tue Feb 19, 2019 11:15 pm
You should always attach a sketch to the earliest stage possible. Best would be to attach NextSketch to XY plane. Easiest would be to attach it to Pad. You do so by making Pad visible and attach the sketch to the appropriate face.
But this is what I did, see my step 3. I attached the sketch directly to the pad.

I cannot attach the sketch earlier because in my real-life part, I need to use several additive and subtractive primitives before it.
Bance
Posts: 203
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: moving a subtractive shape shifts origin of sketches

Postby Bance » Wed Feb 20, 2019 12:06 am

In PD WB the last feature is by default the active object, I think this is how the tree is maintained. Try setting the tip to pad before attaching the sketch, it should not then depend on sphere.....

You can also move sphere after pocket, right click context menu, not sure if this will resolve the problem though.

Steve.
User avatar
uwestoehr
Posts: 345
Joined: Sun Jan 27, 2019 3:21 am

Re: moving a subtractive shape shifts origin of sketches

Postby uwestoehr » Wed Feb 20, 2019 1:14 am

Bance wrote:
Wed Feb 20, 2019 12:06 am
In PD WB the last feature is by default the active object, I think this is how the tree is maintained. Try setting the tip to pad before attaching the sketch, it should not then depend on sphere.....
Thank you. The problem is that when I set the tip before the sphere, the sphere is not visible. But in my real-life part I have to attach the sketch after several additive spheres and cylinders. When I made then invisible, I cannot attach the sketch because there is nothing to select to attach.
I see now that overcoming this is tricky. The best would that the center of the sphere would not be the new origin for the following sketches.

In general, I don't understand why there can't be one origin for all features so that every feature can reference this point. Or is there such a point and I just don't know?
chrisb
Posts: 14019
Joined: Tue Mar 17, 2015 9:14 am

Re: moving a subtractive shape shifts origin of sketches

Postby chrisb » Wed Feb 20, 2019 1:20 am

It is sufficient to make the pad visible, you don't have to change Tip.

Rearranging the order of features would be another possibility, but then the issue with the movement persists the other way round.

Have a look at the dependency graph.
Attachments
Sketch-Origin-no-problem.FCStd
(14.79 KiB) Downloaded 1 time
User avatar
uwestoehr
Posts: 345
Joined: Sun Jan 27, 2019 3:21 am

Re: moving a subtractive shape shifts origin of sketches

Postby uwestoehr » Wed Feb 20, 2019 1:39 am

chrisb wrote:
Wed Feb 20, 2019 1:20 am
Rearranging the order of features would be another possibility, but then the issue with the movement persists the other way round.
Yes, I played with this a lot. My solution is now to add a dummy subtractive sphere for away from the part but along the z-axis. This shifts the origin back to the position where I want to have the origin for all features of the body.