Links go out of the allowed scope - warning mystery

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!
mantheakis
Posts: 17
Joined: Sun Feb 23, 2020 7:08 pm
Location: London, UK

Links go out of the allowed scope - warning mystery

Post by mantheakis »

Hello

My project (a chassis for a small scale locomotive model) on FC 0.19 keeps logging over 20 "Links go out of the allowed scope" warnings.

This is the current list of warnings:

09:39:25 Sketcher::SketchObject / Sketch002: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch: Links go out of the allowed scope
09:39:25 PartDesign::Body / Body002: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch013: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch014: Links go out of the allowed scope
09:39:25 Part::Part2DObjectPython / InvoluteGear: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch015: Links go out of the allowed scope
09:39:25 Part::Part2DObjectPython / InvoluteGear001: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch016: Links go out of the allowed scope
09:39:25 Part::Part2DObjectPython / InvoluteGear002: Links go out of the allowed scope
09:39:25 Part::Part2DObjectPython / InvoluteGear003: Links go out of the allowed scope
09:39:25 Part::Part2DObjectPython / InvoluteGear004: Links go out of the allowed scope
09:39:25 Part::Part2DObjectPython / InvoluteGear005: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch017: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch018: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch019: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch020: Links go out of the allowed scope
09:39:25 Sketcher::SketchObject / Sketch021: Links go out of the allowed scope
09:39:25 PartDesign::Plane / DatumPlane007: Links go out of the allowed scope
09:39:25 PartDesign::Plane / DatumPlane008: Links go out of the allowed scope
09:43:29 Sketcher::SketchObject / Sketch: Links go out of the allowed scope
09:43:31 Sketcher::SketchObject / Sketch: Links go out of the allowed scope
09:50:06 Sketcher::SketchObject / Sketch: Links go out of the allowed scope
09:51:01 Sketcher::SketchObject / Sketch: Links go out of the allowed scope


I examined the SECOND warning that refers to a sketch originally named "Sketch" that is also labelled "BaseTopSketch":

FreeCAD-0.19-SS1.jpg
FreeCAD-0.19-SS1.jpg (29.97 KiB) Viewed 4296 times
FreeCAD-0.19-SS2.jpg
FreeCAD-0.19-SS2.jpg (52.47 KiB) Viewed 4296 times


The "Sketch/BaseTopSketch" sketch is very simple - it only has THREE constraints, of which only ONE is set with an expression that is linked to a spreadsheet named "Spreadsheet":

FreeCAD-0.19-SS3.jpg
FreeCAD-0.19-SS3.jpg (173.64 KiB) Viewed 4296 times


Both the sketch and the spreadsheet are located outside any Body objects.

What have I done to generate that particular "Links go out of the allowed scope" warning?

Thank you for your time.

Harry

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 Kingdom (en_GB)
Harry Mantheakis
London, UK
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Links go out of the allowed scope - warning mystery

Post by GeneFC »

Without a file to examine it is hard to say for certain. However it appears from the Combo view that you are freely mixing Part WB with Part Design WB.

Unless done carefully by the rules that is a predictable cause of "links go out of the allowed scope."

Gene
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Links go out of the allowed scope - warning mystery

Post by Zolko »

mantheakis wrote: Fri Oct 22, 2021 9:35 am What have I done to generate that particular "Links go out of the allowed scope" warning?
That :
mantheakis wrote: Fri Oct 22, 2021 9:35 am Both the sketch and the spreadsheet are located outside any Body objects.
You're referencing objects in different coordinate systems
try the Assembly4 workbench for FreCAD — tutorials here and here
mantheakis
Posts: 17
Joined: Sun Feb 23, 2020 7:08 pm
Location: London, UK

Re: Links go out of the allowed scope - warning mystery

Post by mantheakis »

GeneFC wrote: Fri Oct 22, 2021 1:57 pm Without a file to examine it is hard to say for certain. However it appears from the Combo view that you are freely mixing Part WB with Part Design WB.

Unless done carefully by the rules that is a predictable cause of "links go out of the allowed scope."
Thank you, Gene. I think I understand what you are referring to. I shall be happy to upload my file if you are interested.

The sketch and spreadsheet I referred to in my post are both outside of any Body objects - which is what puzzles me.
Harry Mantheakis
London, UK
mantheakis
Posts: 17
Joined: Sun Feb 23, 2020 7:08 pm
Location: London, UK

Re: Links go out of the allowed scope - warning mystery

Post by mantheakis »

Zolko wrote: Fri Oct 22, 2021 3:00 pm You're referencing objects in different coordinate systems
Thank you @Zolko.

I am not sure what the solution (if any) would be.

Perhaps I should I ignore that particular warning?

I can imagine that some of the other "Links go out of the allowed scope" warnings may be because of objects being located in different coordinate systems - but how do I control the coordinate system of a spreadsheet? Perhaps I am overlooking something? I am learning on my own, so it is quite possible I have overlooked something fundamental here.
Harry Mantheakis
London, UK
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Links go out of the allowed scope - warning mystery

Post by chrisb »

mantheakis wrote: Fri Oct 22, 2021 3:44 pm Perhaps I should I ignore that particular warning?
No, sure not. You should first learn how to work solely with PartDesign and then solely with Part workbench (or vice versa) and then start mixing them.
You get this warning as soon as you reference across the body border.
In Part workbench you should always use the whole body, not any feature or sketch from inside. In PartDesign workbench you must use a ShapeBinder as a proxy of something living outside of the body.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mantheakis
Posts: 17
Joined: Sun Feb 23, 2020 7:08 pm
Location: London, UK

Re: Links go out of the allowed scope - warning mystery

Post by mantheakis »

chrisb wrote: Fri Oct 22, 2021 9:42 pm No, sure not. You should first learn how to work solely with PartDesign and then solely with Part workbench (or vice versa) and then start mixing them.
You get this warning as soon as you reference across the body border.
In Part workbench you should always use the whole body, not any feature or sketch from inside. In PartDesign workbench you must use a ShapeBinder as a proxy of something living outside of the body.
Thank you, Chris - I appreciate the tips and pointers. I also understand that I need to be careful when using both Part and PartDesign objects in the same project.

The fact that a spreadsheet and sketch - both outside of any workbench-generated body - should cause a "Links go out of the allowed scope" warning still puzzles me.

Are sketches and spreadsheets not meant to be located outside of Part or PartDesign workbench bodies?

I deliberately declared the sketch and spreadsheet in question (as well as others) before I created any Part of PartDesign objects - the intention was that they would act as 'master' references. (One of the other 'external' sketches, for example, is used via a ShapeBinder in a PartDesign object.)

So, was it a mistake to declare sketches and spreadsheets in 'limbo'?

Must they always be located within Part or PartDesign bodies?

I am sorry to harp on about this - I am happy to abide by rules and conventions, but in this case I do not understand what rule or convention I have contravened.
Harry Mantheakis
London, UK
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Links go out of the allowed scope - warning mystery

Post by GeneFC »

The Combo panel view above shows a single body with several other elements in addition to sketches and spreadsheets. Lots of possibilities for errors.

Do you have the Dependency Graph installed? That would quickly show where the illegal links are being attempted.

Gene
mantheakis
Posts: 17
Joined: Sun Feb 23, 2020 7:08 pm
Location: London, UK

Re: Links go out of the allowed scope - warning mystery

Post by mantheakis »

GeneFC wrote: Sat Oct 23, 2021 2:25 pm The Combo panel view above shows a single body with several other elements in addition to sketches and spreadsheets. Lots of possibilities for errors.

Do you have the Dependency Graph installed? That would quickly show where the illegal links are being attempted.
Thank you, Gene - I will look into that and get back to you again.
Harry Mantheakis
London, UK
mantheakis
Posts: 17
Joined: Sun Feb 23, 2020 7:08 pm
Location: London, UK

Re: Links go out of the allowed scope - warning mystery

Post by mantheakis »

GeneFC wrote: Sat Oct 23, 2021 2:25 pm Do you have the Dependency Graph installed? That would quickly show where the illegal links are being attempted.
Wow, Dependency Graph looks pretty cool - but in this project the results are very complex:

FreeCAD-0.19-SS5.jpg
FreeCAD-0.19-SS5.jpg (61.14 KiB) Viewed 3967 times


One small part of the graph has most of the naughty 'red arrow' links that are causing the "Links go out of the allowed scope" warnings:

FreeCAD-0.19-SS4.jpg
FreeCAD-0.19-SS4.jpg (175.16 KiB) Viewed 3967 times


It looks like attaching sketches to the "Origin" planes is the main culprit. (See bottom-right part of the graph above.)

So... I need to re-think how to set the "Support" and "Map Mode" Attachment properties for sketches that are not actually mapped to any PartDesign Datums or object surfaces.

I shall be mighty grateful if someone could tell me how the "Support" and "Map Mode" Attachment properties should be set for sketches that are not mapped to any datum or object-surface.

Perhaps the sketch attachments should simply be set as "Deactivated"?

I am happy to research this - I just need to be pointed in the right direction :)

PS: If anyone is interested, I am prepared to upload the project.
Harry Mantheakis
London, UK
Post Reply