Transfering an object to another container

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Transfering an object to another container

Post by DeepSOIC »

So, I made a new project, created Part, Body, drew a sketch... and realized I need that sketch under Part, not in body, because that sketch is a "master" sketch, whose only purpose is to hold essential dimensions and serve for alignment. But extracting it from Body into Part proves much more difficult than I thought.

First, there is no gui tool to do that. There is a command to move to another body, but not Part. So I decided to try duplicating it (Edit->Duplicate selection), to delete the original afterwards.

And as soon as I tried, I saw a bug. FreeCAD invited me to copy objects the sketch depends on. It depends on XZ plane of Body. Oops! That's probably something we are not supposed to ever copy, right? Trap for beginners!!

I was fairly surprised to see that my copy of the sketch was automatically added to active body! And it wasn't Part-o-magic... So, I deactivated the body, and tried again.

Now, the sketch was added to the root of document (I'd like it to land into active Part... but okay, I can just drag-drop it there).

Now, I have another interesting situation. The sketch is attached to XZ plane of... Body!! but lives in Part. Another trap for beginners!
As of now, it seems like it's not causing any problems.

So, problems!
* withdrawing a sketch from a body is painful, with a couple of traps for young players. My sketch was simple, it was much quicker to make a new sketch.
* duplicating a sketch will create a hidden cross-container link, that may suddenly pop up when one decides to move the original container. As of now, it doesn't happen, because placement of body is mostly ignored.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.7668 (Git)
Build type: Release
Branch: BodyBase3
Hash: ef872d37a8a365aeb04567d80616b28a826ed41c
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Transfering an object to another container

Post by cox »

I think I have had this issue as-well today, and it has been a bit confusing.

My goal has been to make 3D parts for Kicad, and making these, it is nice to have separate parts for shape colouring.

I was somehow expecting(hoping) to be able to make multiple pins padded from one sketch under a part container. I know this flies in the face of all we know from before, but would this be feasible?

In this process I have also been moving stuff back and forth between parts and bodies, and lost control on multiple occasions.

I also noticed that when exporting vrml, the body placement is not taken into consideration, and the underlying sketch has to be positioned instead of the body in relation to other entities in the project. (problem only visible on vrml export).

For making these kind of models it would be nice to be able to model them in one body, but colour the individual faces for export. Is this possible somehow?
Need help? Feel free to ask, but please read the guidelines first
Post Reply