I got the following inconsistent behavior: Making first two connected lines and adding a symmetry constraint to the three vertices produces a straight line. Adding a parallel constraint to those lines gives a sketcher warning about redundant constraints. Doing the same in reversed order, gives no warning.
Adding symmetries to polylines with three or more parallel lines freezes the line. There is no warning, that this construct has redundant constraints.
Is this a bug?
Ulrich
edit: changed topic
Sketcher Symmetric constraint hides redundant constraints
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Sketcher Symmetric constraint hides redundant constraint
The symmetric constraint seems to overlook nearly all redundant constraints. At applying a symmetric constraint to certain cases it is possible to produce a sketch with a lot of redundant constraints. First there is no problem. Sometimes a line freezes and is not movable even with reported several degrees of freedom. In other cases those hidden redundant constraints are suddenly detected at changing things at non related objects.
Here is an example of a frozen sketch: Sometimes I could move the object, but it jumps. The reported degree of freedom changes between 4 and 5.
An symmetric constraint was applied between the endpoints of the arc and the horizontal line. After adding the vertical line, the sketch became unmovable.
Hidden redundant constraints are easy constructed with applying a symmetric constraint to:
Two lines with parallel constraint.
Two lines with equality constraint.
Two lines with perpendicular constraint.
Endpoint of arcs with symmetry to a line through the center of the arc.
There may be also other cases.
Ulrich
OS: Debian GNU/Linux 7.5 (wheezy)
Platform: 32-bit
Version: 0.14.3609 (Git)
Branch: master
Hash: 052b628cbf02624f53e5b844e0c92083b83d368e
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
Here is an example of a frozen sketch: Sometimes I could move the object, but it jumps. The reported degree of freedom changes between 4 and 5.
An symmetric constraint was applied between the endpoints of the arc and the horizontal line. After adding the vertical line, the sketch became unmovable.
Hidden redundant constraints are easy constructed with applying a symmetric constraint to:
Two lines with parallel constraint.
Two lines with equality constraint.
Two lines with perpendicular constraint.
Endpoint of arcs with symmetry to a line through the center of the arc.
There may be also other cases.
Ulrich
OS: Debian GNU/Linux 7.5 (wheezy)
Platform: 32-bit
Version: 0.14.3609 (Git)
Branch: master
Hash: 052b628cbf02624f53e5b844e0c92083b83d368e
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
- Attachments
-
- Frozen_sketch.fcstd
- (2.94 KiB) Downloaded 106 times
Re: Sketcher Symmetric constraint hides redundant constraints
Hi!
I have some code that solves this issue, and also those of:
https://forum.freecadweb.org/viewtopic. ... 424#p51775
https://freecadweb.org/tracker/view.php?id=3434
probably more from the tracker GCS project.
I need a/some volunteer(s) for help testing this code modification.
The branch is this:
https://github.com/abdullahtahiriyo/Fre ... mprovement
What is this?
Well, you get the DoF finder (https://github.com/FreeCAD/FreeCAD/pull/1345), and on top of that a new commit intended to improve the detection of redundants.
How does it work internally?
https://github.com/abdullahtahiriyo/Fre ... f846540d8a
What do you need?
Clone that branch. Compile it. Go through the tickets in the tracker in the GCS project relating to problems with redundants or with reporting of redundants or the symmetric constraint, or wrongly indicating is fully constraint. Try to reproduce them. If you can not report it here as solved.
You can also try to force redundants/conflicting with that code and/or use it in a "not very relevant" project and feedback.
I do not anticipate any side effect, but well, you know, a need control groups and administer a dosage of this branch to only some individuals and a placebo to others....
What is in for me?
You are making FreeCAD better. What else?
Making the solver messages way more reliable. Better detection of redundancies.
I have some code that solves this issue, and also those of:
https://forum.freecadweb.org/viewtopic. ... 424#p51775
https://freecadweb.org/tracker/view.php?id=3434
probably more from the tracker GCS project.
I need a/some volunteer(s) for help testing this code modification.
The branch is this:
https://github.com/abdullahtahiriyo/Fre ... mprovement
What is this?
Well, you get the DoF finder (https://github.com/FreeCAD/FreeCAD/pull/1345), and on top of that a new commit intended to improve the detection of redundants.
How does it work internally?
The diff:The solver uses some heuristics to determine the "redundant to remove" and notify it to the user.
Basically it would pick the solver redundant constraint that affects most groups of redundants (popularity contest).
In the simple cases, all the redundants are equally popular and the popularity contest is untied by using the tagid (let say for simplicity it is the number at sketcher level Constraint3, the tagid=3).
This means that in simple cases, the solver systematically decides that the redundant constraint to handle from those showing a linear dependency is the one appearing the last.
This commits changes the way to untie the popularity contest, by giving more priority to those sketcher constraints that need a lower number of solver constraints (in other words,
those constraints that remove a lower amount of DoF). In case of tie, the tagid is then used to break the tie.
See my comment on this, for more details:
https://freecadweb.org/tracker/view.php?id=3434
https://github.com/abdullahtahiriyo/Fre ... f846540d8a
What do you need?
Clone that branch. Compile it. Go through the tickets in the tracker in the GCS project relating to problems with redundants or with reporting of redundants or the symmetric constraint, or wrongly indicating is fully constraint. Try to reproduce them. If you can not report it here as solved.
You can also try to force redundants/conflicting with that code and/or use it in a "not very relevant" project and feedback.
I do not anticipate any side effect, but well, you know, a need control groups and administer a dosage of this branch to only some individuals and a placebo to others....
What is in for me?
You are making FreeCAD better. What else?
Making the solver messages way more reliable. Better detection of redundancies.
Re: Sketcher Symmetric constraint hides redundant constraints
If a MacOS user is willing to create a compiled version I am of course willing to test.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Sketcher Symmetric constraint hides redundant constraints
triplus wrote:...interesting...
I do not know guys if you would be interesting in this.sgrogan wrote:...testing...
ATM, I do not know if anybody else have testing time. I think it would be great if we could give this branch a good run. It could be the "solver improvement" we have been longing for for a long time...
Re: Sketcher Symmetric constraint hides redundant constraints
I will make a win build for testing
"fight the good fight"