[possible bug?] placement of part design clone

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!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: [possible bug?] placement of part design clone

Post by adrianinsaval »

it's shown by default for me :?

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.27809 (Git)
Build type: Release
Python 3.8.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * A2plus 0.4.54b
  * AirPlaneDesign
  * Assembly4 0.11.10
  * Autoload
  * CfdOF 1.10.3
  * CubeMenu
  * CurvedShapes 1.0.0
  * Curves 0.3.0
  * DynamicData 2.34.0
  * fasteners 0.3.38
  * FCGear 1.0.0
  * FC_SU
  * Glass
  * IconThemes
  * Plot
  * SelectorToolbar
  * sheetmetal 0.2.49
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: [possible bug?] placement of part design clone

Post by kisolre »

adrianinsaval wrote: Sun Mar 13, 2022 10:52 pm it's shown by default for me
Sorry for the noise, In my head it was still working like the normal BaseFeature.
Noticed just now that both Clone and the normal BaseFeature dont like empty linked bodies. Added note to the BaseFeature page: https://wiki.freecadweb.org/PartDesign_ ... se_Feature
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: [possible bug?] placement of part design clone

Post by adrianinsaval »

AFAIK this is intended behavior of clone, it is intentionally an object with the original body's placement, you could create a clone then set the clone placement to 0 to have what you want or you can use the body as basefeature instead of cloning, the only problem with this is that using a body as basefeature is a little cumbersome because it doesn't work when you select before creating a new body and you can' drag and drop a body into another for some reason, anybody knows why that is? I would like to have that improved instead of changing the clone behavior, or maybe have two separate (nested) commands: "Clone" (regular basefeature) and "Clone with placement" (current clone)
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [possible bug?] placement of part design clone

Post by Jee-Bee »

discussion related to issue #5974
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [possible bug?] placement of part design clone

Post by Jee-Bee »

I can't imagine why it could be intentionally. I understand that it is intentional that a body is related to origin an not to it's previous created parent(is that the good word?).
I just don't understand that the CS, planes, axis are transformed to origin while the object is not / that the object stay in place while the CS, planes, axis is not. I can't believe that difference is intentional!
I think that if it is true what you said that in the existence of the clone function (within part design) is a bug because it is useless.
It is just totally different as the part design work flow.

I'm not sure if the usage of BaseFeature is a replacement. The result is currently better as with clone, but it is much more work...
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: [possible bug?] placement of part design clone

Post by adrianinsaval »

useless to you, please remember that FreeCAD is not only developed for you. The origin is not transformed at all, a body is created in the default position, then a clone is put inside with the same placement as the original object (note that clone can be used with objects that don't even have an explicit origin feature), there are perfectly valid uses for this. On the other hand if your intention is to just have another instance of the same body for something like an assembly it is a better idea to use a link (or an array or a mirror depending on the case) rather than a clone, while if you want to edit and keep the same relative placement basefeature is the way to go, then what you actually want to ask for is a more user friendly way of using bodies as basefeatures (a request I support).

In all cases this leads to closing that ticket IMO. Clone is meant to behave as it does, don't like it, don't use it.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [possible bug?] placement of part design clone

Post by Jee-Bee »

adrianinsaval wrote: Wed Aug 03, 2022 6:35 pm The origin is not transformed at all, a body is created in the default position, then a clone is put inside with the same placement as the original object (note that clone can be used with objects that don't even have an explicit origin feature)
Here is exactly my problem. what you describe here is NOT a clone!

According to Merriam(https://www.merriam-webster.com/dictionary/clone):
1a : the aggregate of genetically identical cells or organisms asexually produced by or from a single progenitor cell or organism
b : an individual grown from a single somatic cell or cell nucleus and genetically identical to it
c : a group of replicas of all or part of a macromolecule and especially DNA clones of identical recombinant DNA sequences
2 : one that appears to be a copy of an original form : duplicate a clone of a personal computer
Where point 2 is most similar with the situation in FC(but in ll cases there is spoken about identical). A clone in FC is not identical. Identical. The clone function should take over it's shape and it's properties(at the moment of cloning it).
As you describe to just don't do that!
That other objects don't have origin is not (completely ) True. It is only called placement (related to the general origin).
I understand that is more difficult when a PD clone is used for an object from outside PD(on origin, on placement or set on creation), but i think that is a separate topic.

In any case there are two options to change:
- change the function to it's what the function name says it is
- Change the name so that i don't conflicts with it's function
adrianinsaval wrote: Wed Aug 03, 2022 6:35 pm a more user friendly way of using bodies as basefeatures (a request I support).
It takes me 20 minutes to figure out what you did after i downloaded you file... probably that says enough :shock:
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: [possible bug?] placement of part design clone

Post by adrianinsaval »

Jee-Bee wrote: Fri Aug 05, 2022 11:49 am A clone in FC is not identical. Identical. The clone function should take over it's shape and it's properties(at the moment of cloning it).
And that it does, check the clone object, it has the same shape and placement as the object you cloned.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [possible bug?] placement of part design clone

Post by Jee-Bee »

No it does not. There is a transformation between the both of the bodies.
Screenshot 2022-08-05 at 16.36.51.png
Screenshot 2022-08-05 at 16.36.51.png (128.31 KiB) Viewed 647 times
Screenshot 2022-08-05 at 16.37.58.png
Screenshot 2022-08-05 at 16.37.58.png (125.72 KiB) Viewed 647 times
So they aren't the same

You are ignoring the body it self! You only look if the shape inside the body it the same. While the placement properties are changed
And a body is both the shape inside it AND his placement properties.

If i clone a body i expect a cloned body and not a cloned shape that is inside the body that i selected.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: [possible bug?] placement of part design clone

Post by adrianinsaval »

Note that the clone object is that one inside the new body, not the new body itself.
Post Reply