Question about stock after rotating a part

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
luminize
Posts: 6
Joined: Fri Nov 01, 2019 7:44 pm

Question about stock after rotating a part

Post by luminize »

Hi,

I'm looking into the Path module, and I have rotated my imported STEP file so the orientation (XY = horizontal plane) is correct. I did that thru the drop down menu's Edit -> Placement, and rotate to the correct orientation.

In the path module, when I add a job, and choose to use the existing stock, The wireframe showing the "old" orientation shows up. Do I do something wrong.

Best,
Bas
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Question about stock after rotating a part

Post by openBrain »

Not easy to diagnose without the file... Most probably you didn't actually move the objects themselves but you moved the Part container in which they are. Such container having its own LCS, it actually only has a "visual effect".
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Question about stock after rotating a part

Post by RatonLaveur »

I know this is a little bit pirating this topic, and I've been here long enough that asking is shameful...

But im still extremely confused as to which FreeCAD action that moves the part (Transform, manipulator align, path rotate....etc) actually moves it (and in relation to what) And which actually is only visual.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Question about stock after rotating a part

Post by chrisb »

During Job creation a clone is created (or more than one). After that both objects have independent placements, so that the clone can be rotated - which is in Path the main purpose.
Changing the shape of the object results in changing the shape of the clone too. Think of it like twins: they both mature and grow older, get both wrinkles and white hair, but can live in different places - or one of them is rotated, while the other isn't :lol: .
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
luminize
Posts: 6
Joined: Fri Nov 01, 2019 7:44 pm

Re: Question about stock after rotating a part

Post by luminize »

Thank you all for the replies.
I have zero experience wirh FreeCAD, but I've been modelling with CAD programs for the last 20 years. Checking the Path module I'm "just" clicking around to try out stuff. Since I've seen this behaviour I could not comprehend I've made some screenshots to fo along, as well as my Freecad file, and the STEP file I import.

Playing aroud a bit more I've seen the behaviour I expect, and some that I do not expect. I intend no disrespect to the program itself nor its developers or community. I'm just trying to understand what I do wrong (in thinking). Bear with me.

Correct behaviour, see ictures 1 and 2 attached.
I made sure before even opening the Path workbench, I imported, rotated and saved the part. (yellow plane needs to be the XY plane in the picture). And then I've made a job where the stock shows the model I expect. This differed from the situation I made my original post. So I wondered what did I do different.
picture 1
picture 1
1 - 2019-11-03 19_59_44-FreeCAD 0.19.png (135.57 KiB) Viewed 1164 times
picture 2
picture 2
2 - 2019-11-03 19_59_44-FreeCAD 0.19.png (137.53 KiB) Viewed 1164 times
The difference was that I selected the "document" if you will (see picture 2 attached) with the "blue cube red sphere" icon. This probably has a proper name I do not know of :)
This shows the "Stock-stud_welding_assembly" in the same orientation as the model after manually hiding the body.

The behaviour I do not understand, pictures 3 and 4 attached.
When I selected the geometry/solid before I create a job, then selecting "Use existing solid" for stock from the combobox would default to the "cover" body and would show the wrong orientation. Why would that happen if I rotated the entire geometry in the first place? A clone of the rotated body would be rotated in my thoughts.
Scrolling down allows me to chose "stud_welding_assembly" and that shows the proper stock again. I did not see this initially.
picture 3
picture 3
3 - 2019-11-03 19_59_44-FreeCAD 0.19.png (103.72 KiB) Viewed 1164 times
picture 4
picture 4
4 - 2019-11-03 19_59_44-FreeCAD 0.19.png (135.55 KiB) Viewed 1164 times
It seems like selecting something from the Model view, will default to the first child entry for the "Use existing model" option. I would expect the parent that got selected by me and not the first child.

Anyway, I can work further, nothing blocking, but it would be good to understand.
Best,
Bas
luminize
Posts: 6
Joined: Fri Nov 01, 2019 7:44 pm

Re: Question about stock after rotating a part

Post by luminize »

I forgot to add the STEP and FreeCAD file.
Here they are :)
Attachments
stud_welding_assembly.STEP
(233.97 KiB) Downloaded 22 times
stud_welding_assembly.FCStd
(131.83 KiB) Downloaded 23 times
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Question about stock after rotating a part

Post by mlampert »

Finally got around to have a look.

When you create the Job, Path does the right thing and only presents the top level solid. The selection for "Use Existing Solid" is quite messed up as it turns out. What happens is that the choices for the combo box are lexicographically sorted. I remember the reasoning to allow sub-parts in that list, looking at your file I question the wisdom of that decision though :mrgreen:

Finally, the reason "cover" is placed wrong is because the orientation of "cover" is overlayed by the Placement of "stud_welding_assembly" (which has the rotation). If you clear the Placement of "stud_welding_assembly" you'll see that "cover" is placed as it shows up as Stock. Alternatively, if you drag "cover" out of the "stud_welding_assembly" it will also revert back to its original placement (orientation).

Does this make any sense?

BTW: I haven't played with a Part in a long time, last time I tried it didn't work for Path at all. This is excellent news - thanks for showing that off!
Post Reply