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
Veteran
Posts: 2167
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

DogLeg solver

Post by bambuko »

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)
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: DogLeg solver

Post by kisolre »

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
Veteran
Posts: 2167
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: DogLeg solver

Post by bambuko »

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)
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: DogLeg solver

Post by kisolre »

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
Veteran
Posts: 2167
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: DogLeg solver

Post by bambuko »

OK, will try tomorrow and see if the error is repeatable.
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: DogLeg solver

Post by Kunda1 »

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
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
User avatar
bambuko
Veteran
Posts: 2167
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: DogLeg solver

Post by bambuko »

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 707 times


FreeCAD file:
Dogleg_test.FCStd
(244.67 KiB) Downloaded 18 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.
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
bambuko
Veteran
Posts: 2167
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: DogLeg solver

Post by bambuko »

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 647 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 629 times
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: DogLeg solver

Post by chrisb »

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)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bambuko
Veteran
Posts: 2167
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: DogLeg solver

Post by bambuko »

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:
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
Post Reply