[Work Around Found] LCS appear to be jumping around as angle changes in Assembly

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
PAS_Drafter
Posts: 338
Joined: Mon Aug 02, 2021 6:29 am
Location: California, USA

[Work Around Found] LCS appear to be jumping around as angle changes in Assembly

Post by PAS_Drafter »

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

I have an assembly built, and it appears to be working okay until I start changing the angle. When I start out at 0degrees (value changed in the DatasSS spreadsheet), it looks right.
0degGood.PNG
0degGood.PNG (19.78 KiB) Viewed 2774 times
I Change the angle to 45 degrees, everything still lines up right.

45degGood.PNG
45degGood.PNG (22.61 KiB) Viewed 2774 times

However when I change the angle to 60degrees, the cylinders all of the sudden shift around.

60degBad.PNG
60degBad.PNG (31.8 KiB) Viewed 2774 times

At 90 Degrees, definitely not right.

90degBad.PNG
90degBad.PNG (19.15 KiB) Viewed 2774 times

You can that the cylinders are no longer attached to the right Master line. it is as if the LCS points have changed which line they belong to. The cylinder parts have basically switch position with the rotating bracket.

I've tried connecting the LCS in different ways, but it keeps coming back. I've also started getting this error in the log

08:47:49 PartDesign::CoordinateSystem / LCS_Model_RAM: Links go out of the allowed scope
08:47:49 PartDesign::CoordinateSystem / LCS_Model_Base: Links go out of the allowed scope
08:47:49 PartDesign::CoordinateSystem / LCS_Model_Wing: Links go out of the allowed scope

Those are the links associated with the slipping items. In the past I would get rid of this error by creating a ShapeBinder and then linking the LCS to that, I'm not sure how to do that with a Master Sketch or if that is necessary.

Any idea what I'm doing wrong here?

I know we are not suppose to send zip files, but since this is an assembly, I needed to send multiple files for the assembly

Thanks
Attachments
Angle.zip
(996.44 KiB) Downloaded 54 times
Last edited by PAS_Drafter on Fri Jan 28, 2022 5:36 pm, edited 2 times in total.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: LCS appear to be jumping around as angle changes in Assembly

Post by chrisb »

Related: https://forum.freecadweb.org/viewtopic.php?f=3&t=65716 ?

Zip files are ok, but not for single FreeCAD files.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
PAS_Drafter
Posts: 338
Joined: Mon Aug 02, 2021 6:29 am
Location: California, USA

Re: LCS appear to be jumping around as angle changes in Assembly

Post by PAS_Drafter »

That "
chrisb wrote: Thu Jan 27, 2022 6:51 pm Related: https://forum.freecadweb.org/viewtopic.php?f=3&t=65716 ?
post was for a different issue (at least in my mind :D ). In that post, the problem was that the sketch was giving me an unsolvable solution when I changed large values. If I changed the degrees values by small increments, I could go to both extremes (0 and 90) with no problems. If I changed directly from 0 to 90 or 90 to 0 then the Sketch would give the "Unsolvable" error. I put a Check in the "Sketch Size Multiplier" option you suggested and that seemed to fix the problem. Now I could change the value with no problems.

In this "new" case, the Master sketch "lines" are moving in the right way no matter what angle I put in. However the LCS that I have attached to the lines are jumping from one line to another after I reach a certain angle. Going at small increments makes no difference this time. In fact It works perfectly until I put anything over 55.27 degrees. Anything above that value and now the LCS are attached to different lines and the parts I have the LCS referenced to end up going to the wrong place physically.

I can "fix" the LCS linkage to the right lines and it will work again until I move the degrees below that threshold and now everything gets screwed up again.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: LCS appear to be jumping around as angle changes in Assembly

Post by chrisb »

So this is an Assembly question. I move the topic.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
PAS_Drafter
Posts: 338
Joined: Mon Aug 02, 2021 6:29 am
Location: California, USA

Re: LCS appear to be jumping around as angle changes in Assembly

Post by PAS_Drafter »

So it looks like it is the same issue as: https://forum.freecadweb.org/viewtopic.php?f=20&t=65721. I see that the Edge ID changes as the angle changes. The line I have the LCS attached to changes from Edge 4 to Edge 5 and back again as soon as the angle gets past the limit.

AngleProblem.gif
AngleProblem.gif (1008.36 KiB) Viewed 2653 times

So it is the Topographical Naming problem again. So how do I work around that in this case? The other post just identified the problem, but didn't give any solutions as to how to "fix" it.

I understand there is a version out there by RealThunder that seems to have a solution for this. However, I'm hesitant about going to a branch version when it is not known if it will be supported by the main branch down the road. I'd hate to create a bunch of work and then find out that I have to go back and redo it later if this gets fixed by the main branch.

Does anyone have any idea when this serious bug is going to be resolved in the main branch? I thought I saw that version .20 was due to be released last December somewhere, but it doesn't appear to have happened. Is Version .20 going to have a solution for Topographical Naming problem? If so, it will be well worth the wait. I've loved what I can do with FreeCAD, but that one bug makes the process of learning the program and using it VERY frustrating, even when you try to use the practices mentioned to work around it.
Last edited by PAS_Drafter on Fri Jan 28, 2022 1:30 am, edited 1 time in total.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: LCS appear to be jumping around as angle changes in Assembly

Post by Zolko »

chrisb wrote: Thu Jan 27, 2022 10:12 pm So this is an Assembly question.
as usual, this is a TNP issue. It's useless to move it to this forum, there is nothing we can do about it here.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: LCS appear to be jumping around as angle changes in Assembly

Post by Zolko »

PAS_Drafter wrote: Thu Jan 27, 2022 10:34 pm So it is the Topographical Naming problem again. So how do I work around that in this case? The other post just identified the problem ...
yes, you're right. This only proves what I have been saying for a very long time: the topological naming should be "fixed" first for sketches, and only then should we look for a generic solution that will cure cancer covid, wars and famine. Sketches are ALWAYS root objects without any prior dependencies, so it should be much easier to fix than 3D functions that are built on top of each other.

... but didn't give any solutions as to how to "fix" it.
there is no generic solution, but as it happens it is ALWAYS possible to build sketches and LCS in such a way that you can avoid the TNP. You have to think mathematically: if there are 2 solutions to the problem, then at some point the solver will find the wrong one. So you have to build your model in such a way that there is only 1 solution. ALWAYS. Murphy is your friend.
try the Assembly4 workbench for FreCAD — tutorials here and here
PAS_Drafter
Posts: 338
Joined: Mon Aug 02, 2021 6:29 am
Location: California, USA

Re: LCS appear to be jumping around as angle changes in Assembly

Post by PAS_Drafter »

Zolko wrote: Thu Jan 27, 2022 10:54 pm You have to think mathematically
I'm not afraid of doing that or of math, but it is hard for me to "think mathematically" for a solution, when I really don't understand what math is causing the problem to begin with. :D If I knew that I wouldn't have done it the wrong way in the first place. :lol: Additionally, I realize if it was an easy solution, someone would have fixed FreeCAD already to avoid it.

I'll play around with some different geometries and see what I can come up with. Thanks
PAS_Drafter
Posts: 338
Joined: Mon Aug 02, 2021 6:29 am
Location: California, USA

Re: LCS appear to be jumping around as angle changes in Assembly

Post by PAS_Drafter »

Zolko wrote: Thu Jan 27, 2022 10:54 pm So you have to build your model in such a way that there is only 1 solution. ALWAYS. Murphy is your friend.
I figured out how to fix it. I shortened the Master sketch line that was intercepting the one the rams was attached to.

Thanks for the pointers


AngleFix.zip
(489.98 KiB) Downloaded 61 times
Attachments
VideoFixed.gif
VideoFixed.gif (517.07 KiB) Viewed 2466 times
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: LCS appear to be jumping around as angle changes in Assembly

Post by Zolko »

PAS_Drafter wrote: Fri Jan 28, 2022 5:29 pm I figured out how to fix it. I shortened the Master sketch line that was intercepting the one the rams was attached to.
nice, well done !
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply