relationship of two parts: child and parent
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
relationship of two parts: child and parent
Coming from Blender world, there it has the "parent" operation, thus an object A becomes a child of another object B. That's very common feature, such as in the serial robot arm motion. I see FreeCAD only has "compound" feature, but this is not quite similar.
Any ideas on implement a child and parent relationship of two parts? The main different is that for compound, the origin is the origin at the time when the two parts makes to a compound. But for a parent and child relationship, the origin is the parent object's origin.
Any ideas on implement a child and parent relationship of two parts? The main different is that for compound, the origin is the origin at the time when the two parts makes to a compound. But for a parent and child relationship, the origin is the parent object's origin.
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: relationship of two parts: child and parent
Hi!
In the current development version of FreeCAD, there are placeable groups called Part containers. This kind of what you are asking for. They are at their infancy, though, and in many cases can behave unexpectedly. Nexting of Part containers is not supported yet, but I think this will come eventually.
There is a bit of a problem. FreeCAD did not support parenting from the beginning (apparently). Now it's being "bodged" in attempts to avoid reprogramming most features.
See related topics:
viewtopic.php?f=8&t=15332
viewtopic.php?f=8&t=15356
viewtopic.php?f=20&t=10786
In the current development version of FreeCAD, there are placeable groups called Part containers. This kind of what you are asking for. They are at their infancy, though, and in many cases can behave unexpectedly. Nexting of Part containers is not supported yet, but I think this will come eventually.
There is a bit of a problem. FreeCAD did not support parenting from the beginning (apparently). Now it's being "bodged" in attempts to avoid reprogramming most features.
See related topics:
viewtopic.php?f=8&t=15332
viewtopic.php?f=8&t=15356
viewtopic.php?f=20&t=10786
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: relationship of two parts: child and parent
Yes you have to learn this other kind of relationship.
But the concept is more general. You arange some parts to a group and than you can move them as a compound.
The same idea is implemented in Open Inventor and vrml and vpython.
With the new Version of part Design you will have more opportunities. So wait some days until the 0.17 master is stable.
Or use compound, I never had problems in all of my animations.
But the concept is more general. You arange some parts to a group and than you can move them as a compound.
The same idea is implemented in Open Inventor and vrml and vpython.
With the new Version of part Design you will have more opportunities. So wait some days until the 0.17 master is stable.
Or use compound, I never had problems in all of my animations.
Re: relationship of two parts: child and parent
Thanks for your replies.
I will just wait for the next release.
@microelly2
In your animation workbench:
Is it possible that when I try to set the "target" of object in the "Placer" dialog, the object's translation and rotation is automatically fetched to the dialog?
For me, when the Placer attach to an object, the translation and rotation will get reset, that's not quite good. For a motion, I just want to let the current position of the object be the start position. I'm not sure you can understand my feature request...
Thanks.
I will just wait for the next release.
@microelly2
In your animation workbench:
Is it possible that when I try to set the "target" of object in the "Placer" dialog, the object's translation and rotation is automatically fetched to the dialog?
For me, when the Placer attach to an object, the translation and rotation will get reset, that's not quite good. For a motion, I just want to let the current position of the object be the start position. I'm not sure you can understand my feature request...
Thanks.
Re: relationship of two parts: child and parent
@microelly2
I found an issue of your animation workbench, if an object is added to a compound, then in its associated Placer dialog, I can still change its translation or rotation by the noodle, but the button "backword" and "forward" do not works any longer. If it does not in a compound, then those two buttons can work OK.
I found an issue of your animation workbench, if an object is added to a compound, then in its associated Placer dialog, I can still change its translation or rotation by the noodle, but the button "backword" and "forward" do not works any longer. If it does not in a compound, then those two buttons can work OK.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: relationship of two parts: child and parent
The problem with the Placer and compound is that changing the placements of the components does not change the compound because the internals of the execute function of object proxys.
I have a trick: I use a toucher object that forces a recompute for the compound
see this
viewtopic.php?f=3&t=15283
example file is included.
I have a trick: I use a toucher object that forces a recompute for the compound
see this
viewtopic.php?f=3&t=15283
example file is included.
Re: relationship of two parts: child and parent
Hi, thanks for the reply, I just retest the FreeCAD files in this post: Re: rotation along a selected axis, but I found that when I move the needle, I see the arm never moved again. If I remember correctly, it works with before which I used 0.15 release, maybe its my new 0.16 release?microelly2 wrote:The problem with the Placer and compound is that changing the placements of the components does not change the compound because the internals of the execute function of object proxys.
I have a trick: I use a toucher object that forces a recompute for the compound
see this
viewtopic.php?f=3&t=15283
example file is included.
Basically, I use the placer dialog to rotate the arm, so that I get different gestures of the robotic arm. I don't need to generate the animation. It is really bad if I can't manipulate the arm by the needle.
Is the toucher object used only in the animation? (when I click the run button in the My_manager dialog)
Here is my environment:
OS: Windows XP
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6698 (Git)
Build type: Release
Branch: master
Hash: ca7c5d31a4d61f32a25b71025b14641a6e378328
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: relationship of two parts: child and parent
I have the same version of FreeCAD and it works,
so I hope you have the manager active (means visible)
In this case the Placers are controlled by the Manager and the dialog/dialer has no effect.
Two ways you can work:
a) hide the manager but let the placer visible
b) move the placer from the manager outside to the top level of the object tree
in both cases the manager loses the control over the placer
OS: Ubuntu 14.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6698 (Git)
Build type: None
Branch: master
Hash: ca7c5d31a4d61f32a25b71025b14641a6e378328
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
so I hope you have the manager active (means visible)
In this case the Placers are controlled by the Manager and the dialog/dialer has no effect.
Two ways you can work:
a) hide the manager but let the placer visible
b) move the placer from the manager outside to the top level of the object tree
in both cases the manager loses the control over the placer
OS: Ubuntu 14.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6698 (Git)
Build type: None
Branch: master
Hash: ca7c5d31a4d61f32a25b71025b14641a6e378328
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Re: relationship of two parts: child and parent
Thank you very much!microelly2 wrote:I have the same version of FreeCAD and it works,
so I hope you have the manager active (means visible)
In this case the Placers are controlled by the Manager and the dialog/dialer has no effect.
Two ways you can work:
a) hide the manager but let the placer visible
b) move the placer from the manager outside to the top level of the object tree
in both cases the manager loses the control over the placer
In-fact, I don't have the manager active. (I can open the manager dialog and close it, the manager dialog is not opened when I open the FreeCAD source file animation_chain.fcstd)
So, only the second method of the above two methods works here on my computer.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: relationship of two parts: child and parent
I will test it on a windows xp computer and give feedback ..