[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!
Jee-Bee
Posts: 2021
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

[possible bug?] placement of part design clone

Postby Jee-Bee » Fri Aug 02, 2019 7:23 am

I have a issue with part design clone placement

The issue is that when i create a body add a object to it. and i start to move this body arround from the origin position. After this moving i create a clone of the body the new body have a position of [0,0,0] but is actually on the same location as the original.

So all placements are related to the position from where it is copied from. So the planes and axis of the clone are at the orgin but the shape inside the body is at position at moment of cloning.
I would request when create a clone of a body that it's placement is also copied. so the position of the shape inside the body origin is exactly the the same as the original body origin. and the placement values are exactly the same as the original

see attachment
Attachments
clone_partdesign_bug.FCStd
(10.72 KiB) Downloaded 11 times
Jee-Bee
Posts: 2021
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

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

Postby Jee-Bee » Fri Aug 02, 2019 7:26 am

If others agree i make a bug report on mantis
chrisb
Posts: 25155
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Fri Aug 02, 2019 8:24 am

I'm not at all against your proposal, but I'm not sure if this is the way to go to stay conformant to other corners of FreeCAD. That's how Clone or Part boolean operations work: A new object is created with a placement of (0,0,0). So movements of a clone are always relative to the source object. We always advocate here that non-PartDesign operations should just use the whole body and treat it like any other object. We would break that rule if we treat bodies specially.

While it is natural that boolean operations get a new placement - where should the result of a union of two displaced objects else be? - a clone is always performed on a single object, which has its own placement. So your prposal could be extended to all objects, but must not break existing models.

Here is my proposal: Add a new property to a Clone "TraceSupport" like we have for ShapeBinders which is false by default.
chrisb
Posts: 25155
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Fri Aug 02, 2019 8:26 am

Jee-Bee wrote:
Fri Aug 02, 2019 7:26 am
If others agree i make a bug report on mantis
Whatever the outcome of this discussion will be, I think the current behaviour may be cumbersome, but it is not a bug.
Jee-Bee
Posts: 2021
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

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

Postby Jee-Bee » Fri Aug 02, 2019 9:39 am

Oke in general i understand your point.

Part is a different type of design philosophy as partdesign that is.
In part every boolean operation/ clone a is related to the main coordinate system. that would be logical since there is only one single coordinate system. so a clone have again a relation to the main coordinate system.
While with part design everything is related to it's local coordinate system. so i would expect the clone of the local is also related to the local of it's clone...

So a clone of shape should be related to it's body / part
a clone of a body should me related to part / main. The object within the body schould be related to the local coordinate system of the body(don't change)
If i lose the coordinate transformation from model to clone i think it isn't a clone anymore.


ps. In my head it would be anoying that i don't know where a object would be after a boolean operation because than i lose my tracebility (where is the object in my modelling space). Within that i consider this as a bug(!!) even if it don't break the program or model.
TheMarkster
Posts: 1545
Joined: Thu Apr 05, 2018 1:53 am

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

Postby TheMarkster » Sun Aug 04, 2019 6:19 am

Perhaps there could be times when the user wants the current behavior.

One solution for you is to temporarily move the body back to the origin, then make the clone, then move it back to where it was. DynamicData workbench can help with this. You can create a copy of the original body's placement, then use that placement copy to put the original body back in that location after making the clone.

phpBB [video]


The parametric copy option would create links using the expression engine to each of the placement's subproperties, e.g. angle, x, etc. Just press Esc to not make the parametric copy. The parametric copy could be useful where, for example, you want to clone to always be 10mm in the +z position compared to the original. Whenever you move the original the clone would follow. To get this behavior make the clone with the original at z = 10mm

phpBB [video]
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
Jee-Bee
Posts: 2021
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

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

Postby Jee-Bee » Sun Aug 04, 2019 11:23 am

I'm unable to see your movies...

Thanks for the workaround. But as a workaround is .. I can do thinks on other way as it should be... :(

Thanks reacting on this topic it helps me to describe the issue better as here... ;)
Jee-Bee
Posts: 2021
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

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

Postby Jee-Bee » Thu Aug 08, 2019 6:36 pm

Take some time but i created a bugreport (of feature request depends on viewpoint ;) )
issue #4084