[Draft] Clone doesn't behave as clone

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

[Draft] Clone doesn't behave as clone

Post by balrobs »

Not sure if this is an issue of the Draft or the Part workbench ... or if it's an issue at all.
For me it looks like a strange and unexpected behaviour.
I have simplified my original file to make it clear what I mean:
Sketch_Clone.FCStd
(14.91 KiB) Downloaded 35 times
  • take the three extrude shapes in the following file (Extrude, Extrude001, Extrude002).
    Extrude extends Sketch
    Extrude001 extends Sketch (2D), which is a clone of Sketch
    Extrude002 extends Sketch (2D)001 along Sketch_Extrusion_Asis. Here Sketch (2D)001 is also a clone of Sketch
  • now let's make all object visible and change the dimensions of Sketch
  • however you change Sketch Extrude, Extrude001 and Extrude002 remain synchronized as expected
  • now turn the clones Sketch (2D) and Sketch (2D)001 invisibile
  • make a first change to Sketch
  • notice that Extrude, Extrude001 and Extrude002 remain synchronized as expected
  • now make a second change to Sketch and you will notice that only Extrude and Extrude001 change accordingly, but not Extrude002
  • from now on all Sketch changes will not affect Extrude002
  • to come back to the expected behavior you have to turn Sketch (2D)001 visibility back on

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.0.31917 (Git)
Build type: Release
Branch: master
Hash: 4639283b459f9ff9093e289908cc003db8745b82
Python 3.10.9, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * 3DfindIT 1.2.0
  * BIM 2021.12.0
  * dodo 1.0.0
  * FreeCAD-NativeIFC 2022.10.20
  * FreeCAD_SketchArch
Last edited by balrobs on Tue Mar 07, 2023 10:35 am, edited 1 time in total.
chrisb
Veteran
Posts: 53939
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft Clone, strange behaviour?

Post by chrisb »

balrobs wrote: Sat Mar 04, 2023 7:55 am
  • take the three extrude shapes in the following file (Extrude, Extrude001, Extrude002).
    Extrude extends Sketch
    Extrude001 extends Sketch (2D), which is a clone of Sketch
    Extrude002 extends Sketch (2D)001 along Sketch_Extrusion_Asis. Here Sketch (2D)001 is also a clone of Sketch
  • now let's make all object visible and change the dimensions of Sketch
  • however you change Sketch Extrude, Extrude001 and Extrude002 remain synchronized as expected
  • now turn the clones Sketch (2D) and Sketch (2D)001 invisibile
  • make a first change to Sketch
  • notice that Extrude, Extrude001 and Extrude002 remain synchronized as expected
  • now make a second change to Sketch and you will notice that only Extrude and Extrude001 change accordingly, but not Extrude002
  • from now on all Sketch changes will not affect Extrude002
  • to come back to the expected behavior you have to turn Sketch (2D)001 visibility back on
Before replaying this myself: I guess that the recompute is delayed, to be seen by the recompute icon becoming active. Does the issue occur when you click that button? If not: does marking the root for recompute and then recomputing the whole model fix the issue?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: Draft Clone, strange behaviour?

Post by balrobs »

Thanks @chrisb for your reply :D
chrisb wrote: Sat Mar 04, 2023 10:31 am I guess that the recompute is delayed, to be seen by the recompute icon becoming active. Does the issue occur when you click that button? If not does marking the root for recompute and then recomputing fix the issue?
Here no recompute icon becomes active indicating that a recompute is necessary. Although marking the root for recompute and then do a recompute doesn't fix the issue. To fix it I have to unhide Sketch (2D)001 and force a recompute without getting a notification that this is necessary.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: Draft Clone, strange behaviour?

Post by balrobs »

Seems to be a regression because with version 0.20.2 I can't notice the issue.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * 3DfindIT 1.2.0
  * BIM 2021.12.0
  * dodo 1.0.0
  * FreeCAD-NativeIFC 2022.10.20
  * FreeCAD_SketchArch
user1234
Veteran
Posts: 3345
Joined: Mon Jul 11, 2016 5:08 pm

Re: Draft Clone, strange behaviour?

Post by user1234 »

balrobs wrote: Sat Mar 04, 2023 7:55 am Not sure if this is an issue of the Draft or the Part workbench ... or if it's an issue at all.
For me it looks like a strange and unexpected behaviour.
Confirmed. That is a really wird bug.

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.0.32193 (Git)
Build type: Release
Branch: master
Hash: 323476a9a4ec788ae563eb376ed8660f3a7d8cd4
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 9.0.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * QuickMeasure 2022.10.28
  * CurvedShapes 1.0.4
  * Curves 0.6.6

Greetings
user1234
chrisb
Veteran
Posts: 53939
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft Clone, strange behaviour?

Post by chrisb »

balrobs wrote: Sat Mar 04, 2023 7:55 am
  • take the three extrude shapes in the following file (Extrude, Extrude001, Extrude002).
    Extrude extends Sketch
    Extrude001 extends Sketch (2D), which is a clone of Sketch
    Extrude002 extends Sketch (2D)001 along Sketch_Extrusion_Asis. Here Sketch (2D)001 is also a clone of Sketch
  • now let's make all object visible and change the dimensions of Sketch
I see the issue already after that step. To reproduce:
- open the file
- select Sketch
- change in the property tab the constraint value from 25 to 40.

This is what I get:
SnipScreenshot-5a11ed.png
SnipScreenshot-5a11ed.png (28.05 KiB) Viewed 1001 times
A full recompute doesn't help.
I rate it as a bug. If nobody objects, please create a github ticket.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: Draft Clone, strange behaviour?

Post by balrobs »

chrisb wrote: Sat Mar 04, 2023 6:19 pm ...
I rate it as a bug. If nobody objects, please create a github ticket.
ok so let's wait a moment and if no one objects i will open a github issue.
chrisb
Veteran
Posts: 53939
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft Clone, strange behaviour?

Post by chrisb »

balrobs wrote: Sun Mar 05, 2023 5:33 pm ok so let's wait a moment and if no one objects i will open a github issue.
Perfect!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [Draft] Clone doesn't behave as clone

Post by balrobs »

Here is the github issue:
issue #8771
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: [Draft] Clone doesn't behave as clone

Post by yorik »

The second clone is mapped to the second sketch. I think it prevents something, but I fail to see what...
Post Reply