App::Links in Part workbench

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Post Reply
TheMarkster
Veteran
Posts: 4511
Joined: Thu Apr 05, 2018 1:53 am

App::Links in Part workbench

Post by TheMarkster »

You will need a very recent build for this as it was only recently merged.

App::Link support in Part workbench has been fixed for many dialogs. This needs testing before the 0.20 release so if there are any major issues (such as crashes) these can be addressed now.

Also possible, in addition to using App::Links, is using App::Part containers in these functions.

The way the App::Part support works is the Part container must have a visible Part::Feature, which is used for the function. (While visibility matters for objects inside the App::Part, the App::Part's visibility is unimportant for functions that use it.) For example, put a Sketch into an App::Part and use the App::Part for extruding. Put another sketch into the same App::Part. Notice how the App::Part is treated as a compound. Make a sketch invisible and see the effect on the extrude. Using the Part itself as Base of the Extrude avoids links out of scope warnings if the Extrude is not in the Part container. (Expect self-intersection errors quite often where these sketches intersect. This can be remedied by using Part::Union on the Extrude object.)

Edit: I should have added: only the visibility of top level objects will matter for the purposes of the App::Part's compound shape.
Last edited by TheMarkster on Mon Apr 11, 2022 4:54 pm, edited 1 time in total.
chrisb
Veteran
Posts: 43447
Joined: Tue Mar 17, 2015 9:14 am

Re: App::Links in Part workbench

Post by chrisb »

TheMarkster wrote: Mon Apr 11, 2022 4:13 am You will need a very recent build for this as it was only recently merged.
Can you give a revision number?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Zolko
Veteran
Posts: 1794
Joined: Mon Dec 17, 2018 10:02 am

Re: App::Links in Part workbench

Post by Zolko »

TheMarkster wrote: Mon Apr 11, 2022 4:13 am You will need a very recent build for this as it was only recently merged.

App::Link support in Part workbench has been fixed for many dialogs. This needs testing before the 0.20 release so if there are any major issues (such as crashes) these can be addressed now.

Also possible, in addition to using App::Links, is using App::Part containers in these functions.
This looks like now, one can use links to a sketch as base for functions (like Extrusion) in the Part workbench with Part containers. I tested and it seems to work. This is really great news, thank-you very much. This should definitively be incorporated into v0.20

Next step would be to place the resulting function into the Part where the sketch or the link to the sketch is: if I create a Part and in that part I create a sketch, and then I extrude the sketch, the solid "Extrude" is outside the Part with the following strange warning message:

Code: Select all

Part::Extrusion: Link(s) to object(s) 'Sketch_1' go out of the allowed scope 'Extrude'. Instead, the linked object(s) reside within 'Part'.

Code: Select all

OS: Debian GNU/Linux 10 (buster) (KDE//usr/share/xsessions/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.28633 (Git)
Build type: Unknown
Branch: master
Hash: 35913fc695a504bc287c34cddd622835e369a205
Python 3.7.3, Qt 5.11.3, Coin 4.0.0a, OCC 7.3.0
Locale: English/UnitedKingdom (en_GB)
Installed mods: 
  * A2plus
  * CurvedShapes 1.0.1
  * fcgear 1.0.0
  * sheetmetal 0.2.49
  * TabBar
  * Render 2022.1.0
  * fasteners 0.3.40
  * Curves 0.4.1
  * WeldingWB_GitHub 0.0.1
  * Assembly4_GitHub 0.11.10
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
wmayer
Founder
Posts: 18784
Joined: Thu Feb 19, 2009 10:32 am

Re: App::Links in Part workbench

Post by wmayer »

chrisb wrote: Mon Apr 11, 2022 7:05 am Can you give a revision number?
git commit 731ed820b5ec24a. Revision number must be 28659.
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: App::Links in Part workbench

Post by openBrain »

wmayer wrote: Mon Apr 11, 2022 12:22 pm git commit 731ed820b5ec24a. Revision number must be 28659.
28660 ;)
TheMarkster
Veteran
Posts: 4511
Joined: Thu Apr 05, 2018 1:53 am

Re: App::Links in Part workbench

Post by TheMarkster »

Zolko wrote: Mon Apr 11, 2022 11:04 am
Next step would be to place the resulting function into the Part where the sketch or the link to the sketch is: if I create a Part and in that part I create a sketch, and then I extrude the sketch, the solid "Extrude" is outside the Part with the following strange warning message:
That seems sensible, to put new objects into the active App::Part, if there is one. I have noticed when creating a new primitive it does go into the active App::Part, so evidently some work has been done in this direction already. Cyclic dependencies must be checked for, and if there is an active PartDesign::Body, then any new PartDesign::Feature should go into it instead of the App::Part, including Sketches.
Post Reply