Use holes as template in other designs?

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
M-a-x-G
Posts: 13
Joined: Sun Apr 24, 2022 12:34 am

Use holes as template in other designs?

Post by M-a-x-G »

Code: Select all

OS: Linux Mint 21.1 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.2.29603 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/Australia (en_AU)
Installed mods: 
  * Assembly4 0.50.2
  * freecad.gears 1.0.0
  * Help 1.0.3

I design mostly project boxes for Arduinos (an electronic micro-controller board)...
The holes for brass inserts to screw the Arduinos on are always the same.
ArduinoHoles.png
ArduinoHoles.png (53.36 KiB) Viewed 784 times
Is there a way that I can make the support hole arrangement a template to then copy into new designs? (or something similar)

Any hints appreciated.
Everything needs to be defined...
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Use holes as template in other designs?

Post by onekk »

- Establish an origin.
- Describe each hole a (x,y,z) position in respect if this origin.
- Store these data on a Spreadsheet.
- Refer to these data in another FCStd file using expressions.

This is a way, very parametric, very technical drawing derived, and reusable, as you could even have a pivot document where you store a couple of master sketches and database data and reuse across different models.

As example you could have a file that holds these data for a family of microcomputers and reuse it in every project that involve these things.

But obviously it involve some planning, but "it is engineering" so a plan is supposed to exist somewhere, better written as data than keep only in your head, usually it is more reliable, as you could keep as example a private GitHub repository with an "All right reserved" copyright (just in case some AI would spy your work to suggest solutions to other users).

Kind Regards
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Use holes as template in other designs?

Post by Shalmeneser »

1) in a new file, create a 'master' sketch with circles* at the right place.
2) copy this sketch (ctrl-C, ctrl-V) in the file you need.
3) modify the attachment of this sketch to set it at the right position.
4) use those circles in new sketches with Sketcher_External.

You can also copy this 'master' sketch with PartDesign_SubShapeBinder.

(* or just (white) points for the centers)
imm
Posts: 250
Joined: Wed Nov 03, 2021 1:00 pm

Re: Use holes as template in other designs?

Post by imm »

Here is an example sketch with Named Constraints showing at the tree level, and 2 separate instances of the 'pattern' extruded onto a sample plane in different orientations.
post-mastersketch-1a.PNG
post-mastersketch-1a.PNG (26.37 KiB) Viewed 623 times
mastersketch103a.FCStd
(47.94 KiB) Downloaded 13 times
Post Reply