PR#2862: Configuration Table using Spreadsheet

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
realthunder
Posts: 2021
Joined: Tue Jan 03, 2017 10:55 am

Re: PR#2862: Configuration Table using Spreadsheet

Postby realthunder » Sat Sep 11, 2021 2:10 pm

Zolko wrote: Sat Sep 11, 2021 11:38 am Why not use a hidden temporary Document to contain the deep copy : with a new hidden temporary document, you are sure that it's empty, thus all copied names will be preserved.? If you copy into the current document, existing names will be changed to keep the unique name principle of FreeCAD, so how do you track the changed (variant) variables ?
Temporary document are not saved, while variant copy is meant to be preserved. The SubShapeBinder supports variant binding as well, and it does indeed use a temporary document for that purpose, because the binder does not need to preserve the variant copies, only the combined shape.

The naming conflict is a common problem that must be solved in order for normal copy to work. You know, when you copy a body and paste it into the same document, FreeCAD must change the reference according to name changes. Similar things happen here. In addition, since this is actually a replace operation, it will also change reference in existing objects. Similar logic has already been implemented in 'Link replace' action in upstream.
Also, is this variant link a C++ construct or a Python object ?
It is implemented in Link using C++.
Try Assembly3 (latest version 2021.09.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
Zolko
Posts: 1491
Joined: Mon Dec 17, 2018 10:02 am

Re: PR#2862: Configuration Table using Spreadsheet

Postby Zolko » Sat Sep 11, 2021 6:29 pm

realthunder wrote: Sat Sep 11, 2021 2:10 pm It is implemented in Link using C++.
I think that variant links should be implemented in Python, and I have proposed a possible implementation (see here and here). I will (try to) do this now with Assembly4, and for 0.19 if possible
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
paullee
Posts: 3716
Joined: Wed May 04, 2016 3:58 pm

Re: PR#2862: Configuration Table using Spreadsheet

Postby paullee » Sat Sep 11, 2021 11:34 pm

Looks exciting :) Though probabaly not understanding the usecases.

Can have a simple example, e.g. a Sketch with 4 edges to demonstrate ?

Thanks.
carlopav
Posts: 1909
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: PR#2862: Configuration Table using Spreadsheet

Postby carlopav » Sun Sep 12, 2021 9:16 pm

Zolko wrote: Sat Sep 11, 2021 6:29 pm I think that variant links should be implemented in Python
Can you elaborate?

I will (try to) do this now with Assembly4, and for 0.19 if possible
Sound like duplicated effort... I've tested this PR and "variant subshapebinder" in realthunder fork quite a lot and it works very good in my user opinion...
follow my experiments on BIM modelling for architecture design
galou_breizh
Posts: 366
Joined: Wed Sep 15, 2010 9:38 am

Re: PR#2862: Configuration Table using Spreadsheet

Postby galou_breizh » Thu Sep 16, 2021 7:11 am

Thanks realthunder for this nice feature.

I didn't manage to have it work though. I'm attaching a sample where I think I did everything as you wrote but changing the property marked "CopyOnChange" (Pad.Length) still modifies the original object.
copy_on_change.fcstd
(15.45 KiB) Downloaded 10 times
I'm using the AppImage from 2021-09-16 (FreeCAD-asm3-Daily-Conda-Py3-Qt5-20210916-glibc2.12-x86_64.AppImage).

Thanks,
Gaël

OS: Ubuntu 20.04.3 LTS (i3/i3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2021.916.24301 +4152 (Git) AppImage
Build type: Release
Branch: LinkDaily
Hash: 7fd36f96f4db17db4f8d058eab22588cca8f9d5c
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.1
OCC version: 7.5.2
Locale: English/United States (en_US)