High level advice how to draw a part that depends on another part

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!
Post Reply
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

High level advice how to draw a part that depends on another part

Post by run_the_race »

There are many great tutorials on how to design a part with Part Design and then use TechDraw to document it, and so far it has gone pretty well. I modeled 3 separate parts in Part Design, I then cominbed them together by copying and pasting them into one document, and using the Draft WB Move tool to assemble them. So far so good (unless there is a better way?).

Now I have the assembly of 3 parts, I wish to design an enclosure to go around the assembly. Ideally I would like to parametrically design the enclosure in Part Design by linking dimensions to the assembly (like in sketcher when you "create an edge linked to external geometry"), is that even possible?

Question: Any high level advice on the approach or documentation I should read up on?

Code: Select all

OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United Kingdom (en_GB)
Bance
Veteran
Posts: 4184
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: High level advice how to draw a part that depends on another part

Post by Bance »

jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: High level advice how to draw a part that depends on another part

Post by jmaustpc »

You can get quite creative with Expressions. Store and if needed calculate other values in a spreadsheet, if not reading directly from something else.

I don't know about your model specifically but as an example, an Expression could be placed wherever needed to define the width of the enclosure by reading the width value of three items, add them all together with a clearance value, for example.
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: High level advice how to draw a part that depends on another part

Post by run_the_race »

Bance wrote: Thu Apr 22, 2021 9:20 am Use shapebinders.

PartDesign_ShapeBinder

PartDesign_SubShapeBinder
Preliminary reading shows I think this is exactly what I was looking for thank you!
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: High level advice how to draw a part that depends on another part

Post by run_the_race »

jmaustpc wrote: Thu Apr 22, 2021 11:27 am You can get quite creative with Expressions. Store and if needed calculate other values in a spreadsheet, if not reading directly from something else.

I don't know about your model specifically but as an example, an Expression could be placed wherever needed to define the width of the enclosure by reading the width value of three items, add them all together with a clearance value, for example.
Thanks for the answer. This approach was going to be my plan B ;)
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: High level advice how to draw a part that depends on another part

Post by run_the_race »

Bance wrote: Thu Apr 22, 2021 9:20 am Use shapebinders.

PartDesign_ShapeBinder

PartDesign_SubShapeBinder
ShapeBinder does not seem to work with linked part or with assembly parts, but sub shape binder does seem to work. I don't quite understand the diff from the wiki, and why there are 2 tools to do what appears to me to be the same job.
Last edited by run_the_race on Sun Apr 25, 2021 10:39 pm, edited 1 time in total.
Bance
Veteran
Posts: 4184
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: High level advice how to draw a part that depends on another part

Post by Bance »

Provide an example.
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: High level advice how to draw a part that depends on another part

Post by run_the_race »

I read the wiki, and I watched this tutorial: https://www.youtube.com/watch?v=MCY5IrWrHrU
But I dont understand the difference between shapebinder and subhapebinder.
Is the conceptual difference:
  • ShapeBinder is more like "lifting external edges/geometry" as to create construction/reference geometry.
  • Subshapebinder is about copying geometry into a body that can be treated as if they are part of the active bodies geometry.
?
Last edited by run_the_race on Tue Apr 27, 2021 8:50 am, edited 2 times in total.
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: High level advice how to draw a part that depends on another part

Post by run_the_race »

Bance wrote: Sun Apr 25, 2021 10:36 pm Provide an example.
I attached test_shapebinder.7z.
  1. Extract it.
  2. Inside it is `Example_test_shapebinder.FCStd`
  3. Open it, and it contains an assembly which links to 2 external models in `3d_models` dir: `raspberry_pi_7inch_touchscreen.FCStd` and `raspberry_pi_4b.FCStd`.
  4. Try to make a body and place a shapebinder link to `raspberry_pi_7inch_touchscreen.FCStd`. In the image below I have `Body in File` as the active body, and selected `raspberry_pi_7inch_touchscreen` in the tree, then clicked the ShapeBinder button.
  5. I get the error `10:41:58 <Exception> PropertyLinkSubList does not support external object`
As you can see I have tried to make bodies in the following places (highlighted by yellow/red rectangles):
shapebinder.png
shapebinder.png (178.88 KiB) Viewed 725 times
Attachments
test_shapebinder.7z
(598.51 KiB) Downloaded 7 times
Post Reply