[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
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 »

that is exactly the problem the whole bug is created for!!! :evil:
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

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

Post by Syres »

All @Jee-Bee is stating IMHO is that Part Design Clone should behave the same as Draft>Clone which does clone the Base>Placement parameters. So if consistency in FreeCAD is to be seen then either Draft>Clone needs to change to match Part Design Clone or as @Jee-Bee requests.
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 »

The clone object itself is cloning the placement too (although only at creation). Can you explain in what situation it would be useful to put the placement on the body rather than the clone? Keep in mind what I've said before about using basefeature.
Jee-Bee just because you don't like a tool's behavior doesn't mean it's a bug, specially if there is a better alternative to suit your needs already (basefeature or link)
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 »

It is a bug because it by the name the tool have another behavior can be expected / should be expected.
If the name was Make a copy of it shape and put it in a new body container that is placed at origin then i expect current behaviour.
If something is called a clone then i may expect a exact clone of the object i choose. If i choose a body container then i expect a clone that selected body container(with or without object(s)).
As of now this is just not the case. It don't clone the body container! It only clone the shape that's inside the container and put that in a new container (placed at origin) ...

Within PD there is a hard relationship between a shape object and it parent container. And the clone function puts everything in the trashcan and do something different.


Addition: while writing this i noticed that when selecting an empty container the clone created a container with an empty shape. And Reference geometry (planes axis etc) are ignored while they are part of the container and thus also part of the clone...
But this should be expected behavior as well :roll:
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 »

First besides the debate of whether we want to keep the current behavior or change to your proposal let's make something clear regarding terminology: it is not a bug because it's behaving as intended, you not liking it is something entirely different, what you are making is a feature request to change the behavior to something to your liking, note that for feature requests there should be consensus on what is desired, which it doesn't appear as we have here.
Syres wrote: Mon Aug 08, 2022 10:06 am All @Jee-Bee is stating IMHO is that Part Design Clone should behave the same as Draft>Clone which does clone the Base>Placement parameters. So if consistency in FreeCAD is to be seen then either Draft>Clone needs to change to match Part Design Clone or as @Jee-Bee requests.
It behaves the same, check it's placement. The misconception here is the belief that the new body is the clone, it is not, the clone is just created inside a new body.
Jee-Bee wrote: Mon Aug 08, 2022 3:21 pm If something is called a clone then i may expect a exact clone of the object i choose.
So go and create a Part object (say a cylinder) then go back to PD and make a clone of it, how is it not an exact clone?

IMO basefeature and link already provide what you want, so I don't see the need for this change, however if others also want it and someone is willing to implement then ok go ahead, it probably won't affect me much.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

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

Post by Syres »

Well, I've tried this code, it basically allows @Jee-Bee and others who want their request to use a parameter that isn't set by default so any new users will receive the functionality as is. If the community don't want to use it as a base (I'm sure there's a cleaner way to code it) I'll step out https://github.com/FreeCAD/FreeCAD/comp ... D:patch-51

Code: Select all

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.30019 (Git)
Build type: Release
Branch: master
Hash: a32e92722700c8584d74e3fe3e4823fbbabba9bc
Python 3.6.9, Qt 5.9.5, Coin 4.0.0a, Vtk 7.1.1, OCC 7.3.0
Locale: English/UnitedKingdom (en_GB)
Installed mods: 
  * fasteners 0.3.50
  * Silk 1.0.0
  * Plot 2022.4.17
  * CfdOF 1.16.1
  * BIM 2021.12.0
  * FeedsAndSpeeds 0.4.0
  * dodo
  * Curves 0.5.4
  * Manipulator 1.4.9
  * fcgear 1.0.0
  * ThreadProfile 1.82.0
  * A2plus 0.4.56a
  * sheetmetal 0.2.56
Edit: Update branch reference
Last edited by Syres on Tue Aug 09, 2022 7:38 am, edited 1 time in total.
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 »

DraftCloneBehaviour is a bad name for the parameter because, as I've said, the clone object itself already has the same behavior as Draft clone. Perhaps something like CloneTransformBody?
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: Mon Aug 08, 2022 5:35 pm So go and create a Part object (say a cylinder) then go back to PD and make a clone of it, how is it not an exact clone?
Please start reading!
Where did i talk about part --> Part Design?
I'm talking about Part Design - Body --> Part Design - body...
In the bug report i talk about that, in this topic i explained (excluding this one) three times
adrianinsaval wrote: Mon Aug 08, 2022 5:35 pm ... because it's behaving as intended ...
Show me the evidence!
That is is the same behavior as in draft is not valid because it are different tools, with different objects.
Part extrude is also different as part design extrude.

And as sum up Intended or not intended don't matter! You can with good reasons do things wrong and with bad reasons doing something right.
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: Mon Aug 08, 2022 6:50 pm Please start reading!
Where did i talk about part --> Part Design?
I'm talking about Part Design - Body --> Part Design - body...
In the bug report i talk about that, in this topic i explained (excluding this one) three times
And like i said before and tried to highlight here again PD cloning is intended to be used with any object with a shape, not exclusively with PD body, as such it is made as a general tool that clones the shape of the object, nothing else, so there's no special behavior when cloning a body. I'm trying to get you to understand this.
Jee-Bee wrote: Mon Aug 08, 2022 6:50 pm Show me the evidence!
the burden of proof is on you since you are the one proposing to change it. There is nothing to indicate that what you want was ever intended.
Jee-Bee wrote: Mon Aug 08, 2022 6:50 pm And as sum up Intended or not intended don't matter! You can with good reasons do things wrong and with bad reasons doing something right.
In that section of my post I'm just trying to get you to understand the difference between a bug and a feature request, this is a feature request not a bug.
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: Mon Aug 08, 2022 7:24 pm And like i said before and tried to highlight here again PD cloning is intended to be used with any object with a shape, not exclusively with PD body, as such it is made as a general tool that clones the shape of the object, nothing else, so there's no special behavior when cloning a body. I'm trying to get you to understand this.
The whole problem, is that a PD-body is not a special case. The result that the PD-body is ignored.

Few years back there was an accident with a self driving car. The problem was that a pedestrian was crossing the road on a pot where it was not aloud. The software saw the person classified it as a person. told it can't be a person because they are not aloud here. so it was going to check between a bike and a pedestrian back and foward until the car hit the person.
The reason was that during the creation of the software nobody has thought about a situation that anybody can cross the road / walk on the road where it was not aloud.
Clearly an edge case where up till the problem nobody thought about.
It is not impossible that the same applies here (yes less deadly i know) too.
adrianinsaval wrote: Mon Aug 08, 2022 7:24 pm the burden of proof is on you since you are the one proposing to change it. There is nothing to indicate that what you want was ever intended.
You are the one with the bold statement, so the proof is up to you. That i requested something has nothing to do with it.
adrianinsaval wrote: Mon Aug 08, 2022 7:24 pm I'm just trying to get you to understand the difference between a bug and a feature request
I know the difference between a bug report and a feature request. I'm well aware of term it's not a bug it's a feature too.
Both cases leave some space for disagreement.
Post Reply