How to re-use sketches in different bodies or parts?

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!
MrSurly
Posts: 16
Joined: Mon May 03, 2021 3:53 am

How to re-use sketches in different bodies or parts?

Post by MrSurly »

The end goal

Design for a simple frame made from steel tubing.

What I want to do

  • Have a single sketch that defines the tubing profile. This would be in a "library" body of sorts that could have other sketches.
  • Have a clone (that tracks changes in the original) of that sketch in different parts or bodies.
  • Offset (translate) that sketch based on another sketch.
Example

Let's say I want to design a steel table frame; let's ignore the tabletop for now, and just do the frame. Simplest form for a 4-legged table is 4 tubes for the top, making a rectangle, and then 4 tubes coming downwards from the corners for the legs.

Only thing is, I'm not sure if I'm going to use 1x1 tubes, or 1x2, etc. I create a sketch defining the profile of the tube.

For the legs, I then want to have linked copies (clones) of that sketch that are translated to the 4 corners. I would want a separate sketch that defines the dimensions that would be used to set the location of the 4 clones sketches, by maybe having a point be concurrent in each sketch.

For the top bars, something similar, although obviously the bars have to be in an orthogonal plane to the legs.

Ideally, if I need to refine the tube dimensions, I can change that single first sketch, and it would update everything else.

What I've tried

  • Sketch carbon copy. Despite what the documentation says, I cannot do this across parts/bodies.
  • Draft clone. I can't see how to set the clone translation location based on a sketch.
  • Several other things from Google searches trying to accomplish this, that ultimately didn't really work.
FreeCAD version:

OS: Ubuntu 20.10 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.19.1)
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Last edited by MrSurly on Tue May 04, 2021 1:05 pm, edited 1 time in total.
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: How to re-use sketches in different bodies or parts?

Post by chrisb »

Hi and welcome to the forum!
MrSurly wrote: Mon May 03, 2021 5:00 am Sketch carbon copy. Despite what the documentation says, I cannot do this across parts/bodies.
Draft clone. I can't see how to set the clone translation location based on a sketch.
Several other things from Google searches trying to accomplish this, that ultimately didn't really work.
CarbonCopy follows only the change in dimensions, not in structure. Why didn't it work for you?
Clones can be moved by changing their Placement or Attachment or Attachment Offset.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Bance
Veteran
Posts: 4256
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to re-use sketches in different bodies or parts?

Post by Bance »

Have a look at this video:-

https://www.youtube.com/watch?v=1qszeRDmpvg

There are more by the same provider, who is incidently a forum member.

Also DODO WB:-

https://www.youtube.com/watch?v=oh0OG81R8Kw
User avatar
thomas-neemann
Veteran
Posts: 11921
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: How to re-use sketches in different bodies or parts?

Post by thomas-neemann »

MrSurly wrote: Mon May 03, 2021 5:00 am
I could show you a completely different way with arch. are you interested?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
MrSurly
Posts: 16
Joined: Mon May 03, 2021 3:53 am

Re: How to re-use sketches in different bodies or parts?

Post by MrSurly »

chrisb wrote: Mon May 03, 2021 6:47 am Hi and welcome to the forum!
MrSurly wrote: Mon May 03, 2021 5:00 am Sketch carbon copy. Despite what the documentation says, I cannot do this across parts/bodies.
Draft clone. I can't see how to set the clone translation location based on a sketch.
Several other things from Google searches trying to accomplish this, that ultimately didn't really work.
CarbonCopy follows only the change in dimensions, not in structure. Why didn't it work for you?
Clones can be moved by changing their Placement or Attachment or Attachment Offset.
By "didn't work," I mean it simply does the error beep and doesn't do it. I'm guessing because they're not in the same body / part.
User avatar
Vincent B
Veteran
Posts: 4734
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: How to re-use sketches in different bodies or parts?

Post by Vincent B »

How to re-use sketches in different bodies or parts?
It's easy: make a first sketch outside any body then make a clone or binder to use it for external geometry.
(first sketch must be hiden)
Attachments
Capture.JPG
Capture.JPG (19.22 KiB) Viewed 536 times
MrSurly
Posts: 16
Joined: Mon May 03, 2021 3:53 am

Re: How to re-use sketches in different bodies or parts?

Post by MrSurly »

Bance wrote: Mon May 03, 2021 6:55 am Have a look at this video:-

https://www.youtube.com/watch?v=1qszeRDmpvg

There are more by the same provider, who is incidently a forum member.

Also DODO WB:-

https://www.youtube.com/watch?v=oh0OG81R8Kw
Watched both of these, but it doesn't really cover what I'm trying to do parametrically with sketches.
MrSurly
Posts: 16
Joined: Mon May 03, 2021 3:53 am

Re: How to re-use sketches in different bodies or parts?

Post by MrSurly »

GlouGlou wrote: Mon May 03, 2021 9:00 pm How to re-use sketches in different bodies or parts?
It's easy: make a first sketch outside any body then make a clone or binder to use it for external geometry.
(first sketch must be hiden)
I've tried this, but how would I then use a sketch to position it?
MrSurly
Posts: 16
Joined: Mon May 03, 2021 3:53 am

Re: How to re-use sketches in different bodies or parts?

Post by MrSurly »

thomas-neemann wrote: Mon May 03, 2021 8:29 am
MrSurly wrote: Mon May 03, 2021 5:00 am
I could show you a completely different way with arch. are you interested?
Absolutely.
User avatar
Vincent B
Veteran
Posts: 4734
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: How to re-use sketches in different bodies or parts?

Post by Vincent B »

MrSurly wrote: Mon May 03, 2021 9:08 pm
GlouGlou wrote: Mon May 03, 2021 9:00 pm How to re-use sketches in different bodies or parts?
It's easy: make a first sketch outside any body then make a clone or binder to use it for external geometry.
(first sketch must be hiden)
I've tried this, but how would I then use a sketch to position it?
may be with datumline and datumplane?
Post Reply