[Re-Open] [Solved] Sketcher + Expression Engine - 'over-deleting' BUG

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
paullee
Veteran
Posts: 4967
Joined: Wed May 04, 2016 3:58 pm

[Re-Open] [Solved] Sketcher + Expression Engine - 'over-deleting' BUG

Post by paullee »

Hi, I am not sure i find a problem which is related to expression engine or sketcher only ...https://forum.freecadweb.org/viewtopic.php?f=3&t=24604

I attach an example in which I have a nos. of expression engines (say 12 in the example below) in constraints of a (dependent) sketch linking to a (master) sketch.

Select a few, say 4 of those constraints with expressions to delete (constraints 5 - 8 say) , I found the remaining constraints has more expressions got deleted. In the example attached, there is 1 more expression in a constraint get deleted ( the remaining constraint 5 out of the remaining 1 to 8).

(NOTE - not more constraints got deleted, just 'extra' expression in remaining constraints got deleted, in this example the 'now' constraint 5).

(In my previous file, I get another 4 expression deleted after I delete my selected 4).


Example - 'Dependent' sketch has 12 expression in 12 constraints
Screenshot from 2017-10-30 07-04-02.png
Screenshot from 2017-10-30 07-04-02.png (203.46 KiB) Viewed 2440 times
_

Select 4 constraints (w/ expression), say 5 to 8 to delete
Screenshot from 2017-10-30 07-04-17.png
Screenshot from 2017-10-30 07-04-17.png (204.39 KiB) Viewed 2440 times
_

8 remains. Another 1 expression in 'now' constraint 5 get deleted, blanked
(In my previous file, another 4 expressions get deleted - NOTE: no 'extra' constraint get deleted, just expression(s) disappeared)
Screenshot from 2017-10-30 07-04-30.png
Screenshot from 2017-10-30 07-04-30.png (211.84 KiB) Viewed 2440 times


FC_0.17_pre on AppImage

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12495 (Git)
Build type: None
Branch: master
Hash: a16f5bf9aabaeaf82048d773d1ed3ed4e2f5d704
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Attachments
Test _ Sketch - Expression Engine _ bug __ before.fcstd
(10.86 KiB) Downloaded 31 times
Test _ Sketch - Expression Engine _ bug __ after.fcstd
(11.14 KiB) Downloaded 34 times
Last edited by paullee on Mon Nov 20, 2017 5:54 pm, edited 2 times in total.
paullee
Veteran
Posts: 4967
Joined: Wed May 04, 2016 3:58 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by paullee »

With latest AppImage 12527 git and further test video results, still bugs:-

The following actions results in slightly different bug results - see videos attached

Example sketch + expressions
  • 3 edges in a sketch
  • each edge has - 4 constraints & 4 Expressions Formulas
  • total 12 expressions in 12 constraints
Steps to produce bug

Deleting 1 edge - w/ 4 constraints & 4 Expression Formulas
  1. Deleting 2nd edge - constraints 5~8 & 4 Expressions
  2. Original 3rd edge become 2nd edge... etc. -ok
  3. Result: - 3rd edge's (now is 2nd edge) 4 expressions in 4 constraints got deleted also - Should not be deleted
Deleting directly 4 selected constraints w/ 4 Expressions
  1. Select 2nd edge's - constraints 5~8 w/ 4 Expressions
  2. Delete the 4 constraints 5~8 (w/ 4 Expressions)
  3. Result: - 3rd edge's 1st expressions (out of 4) got deleted - Should not be deleted

Deleting 1 edge w/ 4 constraints w/ 4 Expression Formulas
phpBB [video]



Deleting directly the 4 selected constraints w/ 4 Expressions
phpBB [video]




OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12527 (Git)
Build type: None
Branch: master
Hash: ea4f6f2b2d59911026ff2d8d88c731a7873b612d
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Attachments
Test _ Sketch - Expression Engine _ bug __ after.fcstd
(11.14 KiB) Downloaded 30 times
Test _ Sketch - Expression Engine _ bug __ before.fcstd
(10.86 KiB) Downloaded 34 times
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by eivindkvedalen »

paullee wrote: Sun Oct 29, 2017 11:29 pm Hi, I am not sure i find a problem which is related to expression engine or sketcher only ...https://forum.freecadweb.org/viewtopic.php?f=3&t=24604

I attach an example in which I have a nos. of expression engines (say 12 in the example below) in constraints of a (dependent) sketch linking to a (master) sketch.
I can confirm this in latest master branch. Please register a ticket in the bug tracker, and link to this thread.

Eivind
paullee
Veteran
Posts: 4967
Joined: Wed May 04, 2016 3:58 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by paullee »

eivindkvedalen wrote: Sun Nov 05, 2017 9:06 pm
paullee wrote: Sun Oct 29, 2017 11:29 pm Hi, I am not sure i find a problem which is related to expression engine or sketcher only ...https://forum.freecadweb.org/viewtopic.php?f=3&t=24604

I attach an example in which I have a nos. of expression engines (say 12 in the example below) in constraints of a (dependent) sketch linking to a (master) sketch.
I can confirm this in latest master branch. Please register a ticket in the bug tracker, and link to this thread.

Eivind

Thanks, first time making a report in the bug tracker. Hope it is done properly.

https://www.freecadweb.org/tracker/view.php?id=3245
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by eivindkvedalen »

paullee wrote: Mon Nov 06, 2017 5:48 pm Thanks, first time making a report in the bug tracker. Hope it is done properly.

https://www.freecadweb.org/tracker/view.php?id=3245
Thank you for you report! I've created a fix (link in tracker), and if you have the possibility to compile and test yourself, that would be great. If not, maybe someone else here could test for you?

Eivind
paullee
Veteran
Posts: 4967
Joined: Wed May 04, 2016 3:58 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by paullee »

eivindkvedalen wrote: Mon Nov 06, 2017 7:25 pm
paullee wrote: Mon Nov 06, 2017 5:48 pm Thanks, first time making a report in the bug tracker. Hope it is done properly.

https://www.freecadweb.org/tracker/view.php?id=3245
Thank you for you report! I've created a fix (link in tracker), and if you have the possibility to compile and test yourself, that would be great. If not, maybe someone else here could test for you?

Eivind
Thanks! But can't compile myself :oops:

Latest AppImag would have this incorporated?
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by Kunda1 »

paullee wrote: Tue Nov 07, 2017 3:08 pm Latest AppImag would have this incorporated?
Nope. You need to manually build it.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by eivindkvedalen »

Kunda1 wrote: Thu Nov 09, 2017 5:17 pm
paullee wrote: Tue Nov 07, 2017 3:08 pm Latest AppImag would have this incorporated?
Nope. You need to manually build it.
Well, I issued a pull request today... https://github.com/FreeCAD/FreeCAD/pull/1079

Eivind
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by Kunda1 »

@eivindkvedalen sweet!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
paullee
Veteran
Posts: 4967
Joined: Wed May 04, 2016 3:58 pm

Re: Sketcher + Expression Engine - 'over-deleting' BUG

Post by paullee »

eivindkvedalen wrote: Thu Nov 09, 2017 7:58 pm
Well, I issued a pull request today... https://github.com/FreeCAD/FreeCAD/pull/1079

Eivind
Thanks again!
Post Reply