[0.17] PartDesign: How to move a body into a part

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!
tom
Posts: 165
Joined: Sun Mar 29, 2015 9:20 pm

[0.17] PartDesign: How to move a body into a part

Post by tom »

Hi,

I'm trying out the new capabilities of the PartDesign WB in FC 0.17. But now I stumbled over a problem with managing parts and bodies. In my model I have created a body containing a complex feature history. Later I realized that the body should be a member of a part, but I forgot to create the part in there very beginning of the design. Thus I added the part later and tried to move the body into the part. Although the GUI let me drag and drop the body into the part the whole operation destroyed my body object. In fact all the children of the body were extracted from the body and placed as direct children of the part into the model hierarchy the body itself became also a child of the part, but it is now empty. Moving the lost children of the body back into body completely broke the model.

I attached a very simplified model showing the problem. After opening the model try to move Body into Part and see what happens. Is there an alternative way to complete my task? Is the observed behavior desired in 0.17 PD workbench or is it a bug?

Thank you for your help.

Regards,
Thomas

BTW: I tried to attach the *.FCstd file without zipping it before as suggested in the forum rules, but the OS X file browser did not allow to select a *.FCstd file. Also renaming the file into *.fcstd or *.FCSTD did not help.

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10802 (Git)
Build type: Release
Branch: (detached from 10ce910)
Hash: 10ce910c03347a90712327a7cc7be2bcdee13afc
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Attachments
part-body-problem.zip
(8.94 KiB) Downloaded 62 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [0.17] PartDesign: How to move a body into a part

Post by DeepSOIC »

Hi!
It is a known bug, sorry.
You can work around it using Py console:

Code: Select all

App.ActiveDocument.Part.Group = App.ActiveDocument.Part.Group + [App.ActiveDocument.Body]
(replace "Part" with the name of your part, and "Body" with the name of your body)
tom
Posts: 165
Joined: Sun Mar 29, 2015 9:20 pm

Re: [0.17] PartDesign: How to move a body into a part

Post by tom »

Hi DeepSOIC,

wow, that was a really fast answer. It works like a charm. Thank you so much for your help.

Regards,
Thomas
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [0.17] PartDesign: How to move a body into a part

Post by NormandC »

tom wrote: I tried to attach the *.FCstd file without zipping it before as suggested in the forum rules, but the OS X file browser did not allow to select a *.FCstd file. Also renaming the file into *.fcstd or *.FCSTD did not help.
Have you tried simply dragging & dropping you file over the message box as suggested under the Attachments tab?
the Attachments tab wrote:If you wish to attach one or more files enter the details below. You may also attach files by dragging and dropping them in the message box.
DeepSOIC wrote:It is a known bug, sorry.
Is it related to issue #2835?

Because that python code doesn't fix the issue of duplicate BodyOrigin axes and planes...

With tom's file, after moving "Body" into Part then applying your code, see what the tree looks like: Body has disappeared completely!
FC017_tom_part-body-problem_01.png
FC017_tom_part-body-problem_01.png (34.38 KiB) Viewed 3464 times
Moreover the PartOrigin axes and planes are orphaned and replaced by the BodyOrigin's.

This is a highly critical issue IMO... :?

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10807 (Git)
Build type: None
Branch: master
Hash: b32e9806e1b075c745c0c9692e81aea1dcab81e4
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
tom
Posts: 165
Joined: Sun Mar 29, 2015 9:20 pm

Re: [0.17] PartDesign: How to move a body into a part

Post by tom »

NormandC wrote:
tom wrote: I tried to attach the *.FCstd file without zipping it before as suggested in the forum rules, but the OS X file browser did not allow to select a *.FCstd file. Also renaming the file into *.fcstd or *.FCSTD did not help.
Have you tried simply dragging & dropping you file over the message box as suggested under the Attachments tab?
the Attachments tab wrote:If you wish to attach one or more files enter the details below. You may also attach files by dragging and dropping them in the message box.
I did not notice that message. I only read the forum rules. Nevertheless, dragging and dropping works for me. Thank you for that hint.

NormandC wrote:
DeepSOIC wrote:It is a known bug, sorry.
Is it related to issue #2835?
Yes, that issue tracker entry describes my problem.
NormandC wrote:This is a highly critical issue IMO... :?
I agree with you, but I also know, that the developers currently are discussing a more critical issue - the topological naming. Since the workaround suggested by DeepSOIC works well for me I didn't want to introduce additional distraction from the topological naming topic.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [0.17] PartDesign: How to move a body into a part

Post by NormandC »

tom wrote:I agree with you, but I also know, that the developers currently are discussing a more critical issue - the topological naming
The topological naming issue has been known for the past 4 years. It is such a complex problem that it will not be solved any time soon, and should not have any incidence on the problem at hand.
tom wrote:Since the workaround suggested by DeepSOIC works well for me
That has me baffled. It certainly doesn't work for me as it deletes the Body completely! You're saying that you are getting a different result than me?
tom
Posts: 165
Joined: Sun Mar 29, 2015 9:20 pm

Re: [0.17] PartDesign: How to move a body into a part

Post by tom »

NormandC wrote: The topological naming issue has been known for the past 4 years. It is such a complex problem that it will not be solved any time soon, and should not have any incidence on the problem at hand.
I know that. And in some sleepless nights I'm also thinking about the problem - without any success so far. :)
NormandC wrote:That has me baffled. It certainly doesn't work for me as it deletes the Body completely! You're saying that you are getting a different result than me?
Yes, the workaround does its job for both the simplified test design as well as for my more complex design.
part-body-problem.tiff
part-body-problem.tiff (250.83 KiB) Viewed 3452 times
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [0.17] PartDesign: How to move a body into a part

Post by NormandC »

Please don't attach TIFF images as they are not visible in other systems than OS X. I wish it was removed from the accepted file types...

This is how it looks to me.
Attachments
FC_tom_TIFF_image_01.png
FC_tom_TIFF_image_01.png (16.09 KiB) Viewed 3445 times
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [0.17] PartDesign: How to move a body into a part

Post by NormandC »

@ DeepSOIC

How is it that the result of the python command is so wildly different for tom and me?!? :?

tom's TIFF image attached as PNG so a majority of forum users will see it without needing to save it to disk:
Attachments
part-body-problem.png
part-body-problem.png (138.78 KiB) Viewed 3444 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [0.17] PartDesign: How to move a body into a part

Post by DeepSOIC »

NormandC wrote:With tom's file, after moving "Body" into Part then applying your code, see what the tree looks like: ...
The code I posted doesn't fix the faulty move. The code does the move in a different manner. Just don't drag Body into Part.

Ickby had a fix for this together with a substantial set of other changes. However I pointed out too many problems with the other changes, that sent ickby back to drawing board. I don't know how much progress had happened since then.

https://forum.freecadweb.org/viewtopic.php?f=10&t=20749
Post Reply