[Sketcher] Pressing bugs before Release

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

[Sketcher] Pressing bugs before Release

Post by abdullah »

Hi folks,

Is there any persisting pressing sketcher bug that we should attempt to fix before release?
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: [Sketcher] Pressing bugs before Release

Post by jnxd »

A lot of issues have been now moved to "out of scope" unless there is an active effort at fixing them. See https://github.com/orgs/FreeCAD/projects/4/views/2.

There are a lot of issues regarding how constraints are not correctly counted. These probably should be handled together by modifying the solver's redundancy check etc. It would be good if we could fix them now but probably we won't have enough time for that. Ideally these should be backported if possible.

One issue that we can look at is https://github.com/FreeCAD/FreeCAD/issues/7520. It seems to be something you would be able to quickly catch.
My latest (or last) project: B-spline Construction Project.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [Sketcher] Pressing bugs before Release

Post by Syres »

abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] Pressing bugs before Release

Post by abdullah »

jnxd wrote: Sat May 20, 2023 7:11 am One issue that we can look at is https://github.com/FreeCAD/FreeCAD/issues/7520. It seems to be something you would be able to quickly catch.
https://github.com/FreeCAD/FreeCAD/pull/9681
jnxd wrote: Sat May 20, 2023 7:11 am There are a lot of issues regarding how constraints are not correctly counted. These probably should be handled together by modifying the solver's redundancy c
If you mean popularity contest algorithm issues (conflict/redundant undetected or wrongly classified), or constraint getting degenerate in a corner case (DoFs do not correspond to actual DoFs)?

For the first, we need to increase the functional test coverage first. I have opened this as an issue:
https://github.com/FreeCAD/FreeCAD/issues/9683

For the second, it is best to tackle these early in the development cycle. Often the solution is to provide a non-zero divergence for the parameter that is zeroed due to combination of constraints (often 1e-13, which would need to be made official by not hard-coding it, but using a named constant). This tiny divergence has not interfered with convergence during DogLeg, yet it allowed the system not to degenerate during QR decomposition. If this is not a general solution, we would need to write two functions per constraint, one for DogLeg and another one for QR decomposition, which I am wary to do as it is much more code to maintain only because of some corner cases.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: [Sketcher] Pressing bugs before Release

Post by jnxd »

abdullah wrote: Sun May 28, 2023 4:56 am
jnxd wrote: Sat May 20, 2023 7:11 am ...
https://github.com/FreeCAD/FreeCAD/pull/9681
jnxd wrote: Sat May 20, 2023 7:11 am There are a lot of issues regarding how constraints are not correctly counted. These probably should be handled together by modifying the solver's redundancy c
If you mean popularity contest algorithm issues (conflict/redundant undetected or wrongly classified), or constraint getting degenerate in a corner case (DoFs do not correspond to actual DoFs)?
Thanks for fixing!

For your question, I think most of the issues reported fall under the first category. By early in the cycle (2nd case), do you mean we move it for a future version?
My latest (or last) project: B-spline Construction Project.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] Pressing bugs before Release

Post by abdullah »

jnxd wrote: Sun May 28, 2023 10:38 pm Thanks for fixing!

For your question, I think most of the issues reported fall under the first category. By early in the cycle (2nd case), do you mean we move it for a future version?
Welcome.

I am not against fixing (or trying to fix) the ones in the first category before release. However, we do need to increase the functional test coverage before we touch that function. I merged lately some code to generate the Python statements to create a sketch from the sketch itself, this is very useful to create these unit tests:
https://github.com/FreeCAD/FreeCAD/issu ... 1566063410

@Jolbas agreed to look into making some of these unit tests, but he cannot do it in the short term. If you have time now and want to help there, I am sure he will welcome some help.

In fact, it would be great to look into closed issues for popularity contest and create as many tests as possible.

Regarding the degenerate cases, the problem is that we may fix them and generate another issue in another corner case. The likelihood of finding that other corner case before release is very low. The impact of the other corner case may be bigger than what we are fixing (bad is that 1 DoF is not detected, worse that 1 extra DoF is reported).

So both issues have a similar problem, with the difference that for the first we have quite some sketches to do good tests to manage the risk. For the second, it is difficult to identify the "other corner case" that may be affected, and thus writing meaningful tests. This is what motivates me to have a different approach to both.
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Re: [Sketcher] Pressing bugs before Release

Post by Jolbas »

abdullah wrote: Mon May 29, 2023 7:45 pm @Jolbas agreed to look into making some of these unit tests,
I don't think that was me. I think you ment @jonasb
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: [Sketcher] Pressing bugs before Release

Post by jnxd »

abdullah wrote: Mon May 29, 2023 7:45 pm If you have time now and want to help there [in adding tests], I am sure he will welcome some help.
Unfortunately I don't think I'd have the time to do this before the release, almost by definition. The priority is to clear out any blocking issues, mainly the toponaming ones. So any time spent on an issue not in the list would only delay the release.
My latest (or last) project: B-spline Construction Project.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] Pressing bugs before Release

Post by abdullah »

Jolbas wrote: Mon May 29, 2023 10:15 pm
abdullah wrote: Mon May 29, 2023 7:45 pm @Jolbas agreed to look into making some of these unit tests,
I don't think that was me. I think you ment @jonasb
My bad. Sorry!
jnxd wrote: Mon May 29, 2023 11:10 pm Unfortunately I don't think I'd have the time to do this before the release, almost by definition. The priority is to clear out any blocking issues, mainly the toponaming ones. So any time spent on an issue not in the list would only delay the release.
Sure. We can do it later on. :)
Post Reply