DogLeg solver

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!
User avatar
bambuko
Posts: 222
Joined: Thu Oct 24, 2019 12:53 pm

DogLeg solver

Post by bambuko » Thu Nov 19, 2020 6:56 pm

Code: Select all

18:46:16  Updating geometry: Error build geometry(14): Geom_TrimmedCurve::U1 == U2
18:46:16  Invalid solution from DogLeg solver.
Quick search, only found this:
https://tracker.freecadweb.org/bug_revi ... ev_id=2764

which unfortunately doesn't help me much :oops:

Any ideas? please

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git)
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
kisolre
Posts: 3009
Joined: Wed Nov 21, 2018 1:13 pm

Re: DogLeg solver

Post by kisolre » Thu Nov 19, 2020 7:45 pm

There was a request to report such cases where DogLeg fails but LevenbergMarquard succeeds buy @Abdullah at that time, that is why I created that bug report. Could you provide the file where you get that error?
User avatar
bambuko
Posts: 222
Joined: Thu Oct 24, 2019 12:53 pm

Re: DogLeg solver

Post by bambuko » Thu Nov 19, 2020 8:09 pm

I think I have narrowed down the problem to a couple of fillets (problems started after I added them).
Testing at the moment to see if the problem is eliminated.

As for the file - I will see if can trim it down to just the problem geometry (it's a large one, where most of it doesn't matter and just complicate things)
kisolre
Posts: 3009
Joined: Wed Nov 21, 2018 1:13 pm

Re: DogLeg solver

Post by kisolre » Thu Nov 19, 2020 8:36 pm

Just copy the sketch in question to a new file. With all referenced external geometries and things linket through expressions if there are any. Should give the same result.
User avatar
bambuko
Posts: 222
Joined: Thu Oct 24, 2019 12:53 pm

Re: DogLeg solver

Post by bambuko » Thu Nov 19, 2020 8:42 pm

OK, will try tomorrow and see if the error is repeatable.
User avatar
Kunda1
Posts: 9222
Joined: Thu Jan 05, 2017 9:03 pm

Re: DogLeg solver

Post by Kunda1 » Fri Nov 20, 2020 5:29 am

OP, you're also using an inferior version of v0.19. Please stay up to date and test on the latest revision. Thx!
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bambuko
Posts: 222
Joined: Thu Oct 24, 2019 12:53 pm

Re: DogLeg solver

Post by bambuko » Fri Nov 20, 2020 9:23 am

Kunda1 wrote:
Fri Nov 20, 2020 5:29 am
...Please stay up to date and test on the latest revision. Thx!
Sorry for slacking ;)
Have updated:

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23058 (Git)
Build type: Release
Branch: master
Hash: 6e60870ebcb2df018adb7a1281c00dde87750f11
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)

and tested again - with the same result (i.e. Dogleg warning)

dogleg1.jpg
dogleg1.jpg (420.14 KiB) Viewed 175 times


FreeCAD file:
Dogleg_test.FCStd
(244.67 KiB) Downloaded 10 times

To replicate, open spreadsheet and enter different values for "angle from back dead centre" (cell C4).
Eventually after few times (but not necessarily immediately) it will cause the error message.

I have also tested with fillets in "connecting rod" removed and could not get it to fail.
User avatar
bambuko
Posts: 222
Joined: Thu Oct 24, 2019 12:53 pm

Re: DogLeg solver

Post by bambuko » Sun Nov 22, 2020 4:14 pm

An update since the last post.
I have continued modeling without the "offending" fillets, alas it turns out that I was talking out of my rear orifice :oops: - the model without fillets just reported the same Dogleg error :roll:
dogleg3.jpg
dogleg3.jpg (73.44 KiB) Viewed 115 times

Error message:

Code: Select all

Geom_TrimmedCurve::U1 == U2
is the same as it always was :cry:

So clearly it must be something else...?
Model too large to attach, but if it helps with investigation, happy to share outside of forum.

One thing is constant - it always happens when I change dimension in the spreadsheet and model is recalculated afterwards.

and an hour later update - this is getting more interesting by the minute :mrgreen:
dogleg4.jpg
dogleg4.jpg (88.35 KiB) Viewed 97 times
chrisb
Posts: 30821
Joined: Tue Mar 17, 2015 9:14 am

Re: DogLeg solver

Post by chrisb » Sun Nov 22, 2020 5:44 pm

The problem isn't the DogLeg solver, it's the spreadsheet. If you enter the value in C4 with the correct unit ° , e.g. 91° then it all works.

OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23058 (Git)
Build type: Release
Branch: master
Hash: 6e60870ebcb2df018adb7a1281c00dde87750f11
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bambuko
Posts: 222
Joined: Thu Oct 24, 2019 12:53 pm

Re: DogLeg solver

Post by bambuko » Sun Nov 22, 2020 6:39 pm

chrisb wrote:
Sun Nov 22, 2020 5:44 pm
The problem ...it's the spreadsheet. If you enter the value in C4 with the correct unit ° , e.g. 91° then it all works.
C4 is and always was entered as a degree.
Don't know what gave you the idea that it isn't entered as degrees?

Just for a sanity check I have re-opened the file I have attached in this thread and it clearly is degrees that are entered.

I am puzzled by your statement :cry:
Post Reply

Who is online

Users browsing this forum: alexu, papyblaise, thomas-neemann, wmayer and 13 guests