The constraints are not actually removed from the first geometry, they just disappear from the list and UI view, and they also seem to temporarily cease to cause any restrictions on the model. However, the constraints are still there, as exiting Sketcher and either a) using Sketch validator to fix the constraints, or b) simply doing a save-close-load cycle, restores the constraints.
[FIXED] Using undo in Sketcher causes errors after the Big Merge
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: [Bug?] Using undo in Sketcher causes errors after the Big Merge
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: [Bug?] Using undo in Sketcher causes errors after the Big Merge
I have just added fix for this. Please try build my LinkMerge branch here.aapo wrote: ↑Fri Aug 23, 2019 9:27 am The constraints are not actually removed from the first geometry, they just disappear from the list and UI view, and they also seem to temporarily cease to cause any restrictions on the model. However, the constraints are still there, as exiting Sketcher and either a) using Sketch validator to fix the constraints, or b) simply doing a save-close-load cycle, restores the constraints.
Re: [Bug?] Using undo in Sketcher causes errors after the Big Merge
Hello!
But i can conform that the LinkMerge branch have no errors in this
setup.
Greetings
user
I can not confirm if the error was before, because i do not much in the sketcher.realthunder wrote: ↑Fri Aug 23, 2019 11:16 am I have just added fix for this. Please try build my LinkMerge branch here.
But i can conform that the LinkMerge branch have no errors in this
Code: Select all
OS: Debian GNU/Linux 10 (buster) (X-Cinnamon/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17899 (Git)
Build type: DebWithRelInfo
Branch: LinkMerge
Hash: a17196cdbe868c57e5cdee92b986f730d9956878
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Greetings
user
Re: [Bug?] Using undo in Sketcher causes errors after the Big Merge
Thanks for the quick fix @realthunder and cheers to @user1234 for the positive swift feedback, I'll have to wait for the PR to be merged into master but in the meantime I can work fine with the 0.19.17651 build.user1234 wrote: ↑Fri Aug 23, 2019 1:41 pm Hello!I can not confirm if the error was before, because i do not much in the sketcher.realthunder wrote: ↑Fri Aug 23, 2019 11:16 am I have just added fix for this. Please try build my LinkMerge branch here.
But i can conform that the LinkMerge branch have no errors in this
Re: [Bug?] Using undo in Sketcher causes errors after the Big Merge
Hopefully I did it correctly, as my git-skills are not top-notch, but I went withrealthunder wrote: ↑Fri Aug 23, 2019 11:16 am I have just added fix for this. Please try build my LinkMerge branch here.
Code: Select all
$ git pull https://github.com/realthunder/FreeCAD/ LinkMerge:LinkMerge
Re: [Bug?] Using undo in Sketcher causes errors after the Big Merge
The compilation has finished, and I did some (very) basic Sketcher tests with the resulting FreeCAD binary. No problems with the Sketcher undo anymore, so I can confirm that your fix also works very well for my case. Nicely done, thanks! Curiously, the resulting FreeCAD still says it's "master" branch, but it does contain the LinkMerge branch fixes, at least according to git:realthunder wrote: ↑Fri Aug 23, 2019 11:16 amI have just added fix for this. Please try build my LinkMerge branch here.aapo wrote: ↑Fri Aug 23, 2019 9:27 am The constraints are not actually removed from the first geometry, they just disappear from the list and UI view, and they also seem to temporarily cease to cause any restrictions on the model. However, the constraints are still there, as exiting Sketcher and either a) using Sketch validator to fix the constraints, or b) simply doing a save-close-load cycle, restores the constraints.
Code: Select all
$ git pull https://github.com/realthunder/FreeCAD/ LinkMerge:LinkMerge
remote: Enumerating objects: 177, done.
remote: Counting objects: 100% (177/177), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 177 (delta 142), reused 166 (delta 136), pack-reused 0
Receiving objects: 100% (177/177), 107.91 KiB | 673.00 KiB/s, done.
Resolving deltas: 100% (142/142), completed with 46 local objects.
From https://github.com/realthunder/FreeCAD
* [new branch] LinkMerge -> LinkMerge
* [new tag] 0.17_pre -> 0.17_pre
OS: Debian GNU/Linux bullseye/sid (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17903 (Git)
Build type: Release
Branch: master
Hash: 7dbca147bcd7358e3c00fe3437a8108235ed3fa9
Python version: 2.7.16+
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Re: [Bug?] Using undo in Sketcher causes errors after the Big Merge
I reverted back to the official FreeCAD/master, and compiled again, and confirmed that the bug is still in there, and FreeCAD crashes. However, I manually cherry-picked your fix a17196c... from your tree, and patched the official FreeCAD/master branch with just this one commit, and compiled once again. Resulting binary worked, so the a17196c... fixes the bug also on top of the official master:
Git complained about some trailing whitespace in your commit, but it didn't of course have an effect on compiling. So, your fix works for me on top of the official master, and fixes the bug. Well done!
OS: Debian GNU/Linux bullseye/sid (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17875 (Git)
Build type: Release
Branch: master
Hash: 6dae8f371735dd54630e6bfb07824c7796509824
Python version: 2.7.16+
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Code: Select all
$ wget https://github.com/realthunder/FreeCAD/commit/a17196cdbe868c57e5cdee92b986f730d9956878.patch
$ git apply --stat a17196cdbe868c57e5cdee92b986f730d9956878.patch
src/Mod/Sketcher/App/SketchObject.cpp | 11 ++++-------
src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 10 ++++++++++
2 files changed, 14 insertions(+), 7 deletions(-)
$ git apply a17196cdbe868c57e5cdee92b986f730d9956878.patch
a17196cdbe868c57e5cdee92b986f730d9956878.patch:62: trailing whitespace.
if(Constr->First < -extGeoCount || Constr->First >= intGeoCount
a17196cdbe868c57e5cdee92b986f730d9956878.patch:63: trailing whitespace.
|| (Constr->Second!=Constraint::GeoUndef
a17196cdbe868c57e5cdee92b986f730d9956878.patch:65: trailing whitespace.
|| (Constr->Third!=Constraint::GeoUndef
warning: 3 lines add whitespace errors.
$ make -j4
OS: Debian GNU/Linux bullseye/sid (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17875 (Git)
Build type: Release
Branch: master
Hash: 6dae8f371735dd54630e6bfb07824c7796509824
Python version: 2.7.16+
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Re: [FIXED] Using undo in Sketcher causes errors after the Big Merge
I just tested the latest official Windows Git build v0.19.18024, and undo worked great there. Which is no surprise, as the relevant bugfix by realthunder has finally been merged to the official master. So, this problem should be permanently fixed in all FreeCAD versions above ~ v0.19.18000. Thanks!
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18024 (Git)
Build type: Release
Branch: master
Hash: 9cc8f6eb666b0a0ae2dc256f7bc0beb8c987710c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18024 (Git)
Build type: Release
Branch: master
Hash: 9cc8f6eb666b0a0ae2dc256f7bc0beb8c987710c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)