[Bug] Auto-removing redundant constraint not properly working

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!
openBrain
Posts: 6047
Joined: Fri Nov 09, 2018 5:38 pm

[Bug] Auto-removing redundant constraint not properly working

Postby openBrain » Mon Feb 25, 2019 5:35 pm

Hi,

First let me say that I titled it a bug while it is not vital (despite being quite awkward).
To be clear, I'll explain it calling "preselect" when you first select the items then the operation, and "postselect" when you first select the operation then the items.
Now to demonstrate the issue :
  1. Create a new sketch and check "Auto Remove Redundants" is enabled
  2. Create 2 lines (let's call them A & B, and their respective endpoints x.1 & x.2)
  3. Select line A and endpoint B.1, then add a Point-on-line constraint
  4. (Preselect mode): Select endpoints A.1 & B.1, then add a Coincident constraint => Everything's fine, Point-on-line constraint is removed
  5. Come back to the state at the end of step 3
  6. (Postselect mode): Select Coincident constraint (w/o anything selected), then click on A1 & B1 => Ouch ! Sketch isn't updated and solver displays "Sketch contains redundant constraints". Now just drag any line/endpoint with the mouse => Sketch is now updated and redundant constraint is removed
I tried the same with Tangent constraint and everything runs seamlessly both in preselect & postselect mode thus I guess this problem only affects the Point-on-line constraint.

Thanks for confirming. ;)

---
OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
chrisb
Posts: 35953
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Auto-removing redundant constraint not properly working

Postby chrisb » Mon Feb 25, 2019 7:17 pm

Confirmed. Please create a Sketcher ticket. I hope it is not too daring, if I say you can assign it to Abdullah.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Posts: 6047
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug] Auto-removing redundant constraint not properly working

Postby openBrain » Mon Feb 25, 2019 7:47 pm

Created issue #0003863

EDIT : I can't assign the bug. I even can't edit the bug to fix a typo... Maybe a problem in the BT app...
chrisb
Posts: 35953
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Auto-removing redundant constraint not properly working

Postby chrisb » Mon Feb 25, 2019 8:13 pm

It's probably a question of rights.

As have explained it recently: It is of no help if you use your own notion of "preselect" : In FreeCAD speech "Preselection" is the color change when you hover over an item before clicking something. If you post here in the forum I guess you want others to understand what you are saying, so it is best to use the same semantics for the words.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Posts: 35953
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Auto-removing redundant constraint not properly working

Postby chrisb » Mon Feb 25, 2019 8:20 pm

I can change the ticket and correct your typos. As someone who makes so many of them and hating that so much I can well understand you.
What is I should change
superseing constraint is applied in postselect mode. Solver displays an error message about redundancy instead. Everything become OK if a sketch item is drage
proposal:
superseing -> superseding
postselect mode -> continue mode
drage -> dragged
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Posts: 35953
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Auto-removing redundant constraint not properly working

Postby chrisb » Mon Feb 25, 2019 8:22 pm

To add to my pre-previous post: Your notions of pre- and postselect are sensible, but you should discuss them e.g. in Open discussions forum first.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Posts: 6047
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug] Auto-removing redundant constraint not properly working

Postby openBrain » Mon Feb 25, 2019 8:26 pm

chrisb wrote: Mon Feb 25, 2019 8:13 pm If you post here in the forum I guess you want others to understand what you are saying
Sure. Unfortunately I know a very few softwares supporting both modes, and all others call it "preselect" and "postselect".
But I'll be very pleased that you teach me how it is called in the FC speech, and then use it. ;)

EDIT (chrisb wrote a lot during I also did) :
chrisb wrote: Mon Feb 25, 2019 8:20 pm I can change the ticket and correct your typos. As someone who makes so many of them and hating that so much I can well understand you.
Same for me. All your proposals are accepted. :)
chrisb wrote: Mon Feb 25, 2019 8:22 pm To add to my pre-previous post: Your notions of pre- and postselect are sensible, but you should discuss them e.g. in Open discussions forum first.
Looks like a great idea. I'll do.
GeneFC
Posts: 2305
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: [Bug] Auto-removing redundant constraint not properly working

Postby GeneFC » Mon Feb 25, 2019 8:47 pm

It does not work quite that way for me.

In the "postselect" style (Step 6.) the sketch *does* update, but it shows the redundant constraint error. If I then wiggle the sketch it removes the redundant point-on-line constraint and seems happy. :D

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15969 (Git)
Build type: Release
Branch: master
Hash: 4765b7e2fe6d3609e9fbf3e3eb6648d7af1dd526
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

Gene
chrisb
Posts: 35953
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Auto-removing redundant constraint not properly working

Postby chrisb » Mon Feb 25, 2019 8:53 pm

I have taken the meaning of "preselect" here from the forum. It occurs in Preferences->Display->Colors. "Continue mode" occurs in Preferences->Sketcher->General.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Posts: 6047
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug] Auto-removing redundant constraint not properly working

Postby openBrain » Mon Feb 25, 2019 9:15 pm

chrisb wrote: Mon Feb 25, 2019 8:53 pm I have taken the meaning of "preselect" here from the forum.
A quick search shows me that "preselection/preselected" seems to have an (almost) consistent meaning over some MCAD softwares.
I find "continue mode" (I prefer "continuous") acceptable, but how to call the other mode ?
The open discussion is ready. ;) We'll continue there. :)