Hole Pattern

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
EgeJuul
Posts: 1
Joined: Wed Mar 29, 2023 8:00 am

Hole Pattern

Post by EgeJuul »

Hey
I want to make a item, retangular with rounded corners, thats no problem, then i want to make holes ofset from the edeg al the way round in eaqual apacing. Can i do that our do i have to construct them all :?:
Bedst regards Ege Juul Nielsen
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Hole Pattern

Post by chrisb »

Hi and welcome to the forum!

Please tell us a bit more: which workbench do you use (Part, PartDesign), and upload an example of what you try to do.
On first sight: what you want to do sounds like asking for trouble caused by the topological naming problem.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Hole Pattern

Post by thomas-neemann »

EgeJuul wrote: Wed Mar 29, 2023 8:18 am ...
If you want, I can link you to a video here or via pm where it can be seen
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Hole Pattern

Post by Shalmeneser »

Draft_PathArray ?

You should provide a Minimal Working Example (MWE).
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Hole Pattern

Post by Syres »

Attached is a fully parametric file achieving IMHO what you asked for.

The only changes you need to make are the dimensional constraints in Plate_Sketch, size of hole in Hole_Sketch, the thickness of the plate in Plate_Extrude>LengthForward and the Expression in Holes_PathArray > Count >

Code: Select all

trunc(Sketch002.Shape.Length / 100)
where 100 is spacing in millimetres between hole centres inorder to calculate the number of holes. I'm sure you'll try and break it but give it a whirl.

Code: Select all

OS: Linux Mint 20.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.2.29690 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 05a5df264a52e5799c8a4de90be8c1cb5d00ed1e
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.3.0
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * Silk 1.0.0
  * A2plus 0.4.60k
  * CurvedShapes 1.0.4
  * MakerWorkbench 1.0.1
  * freecad.gears 1.0.0
  * Curves 0.6.8
  * PieMenu 1.2.4
  * toSketch 1.0.1
  * Plot 2022.4.17
  * AirPlaneDesign 0.4.0
  * fasteners 0.4.54
  * sheetmetal 0.2.63

Edit: trunc is a better function than round as it always goes towards zero.
Attachments
OffsetHolesInRectangle.FCStd
(21.25 KiB) Downloaded 7 times
Workshop_Notes
Posts: 590
Joined: Wed Sep 29, 2021 8:35 am

Re: Hole Pattern

Post by Workshop_Notes »

Syres wrote: Wed Mar 29, 2023 5:52 pm Attached is a fully parametric file achieving IMHO what you asked for.
Please, the 'count' in the path array is 11 but only 10 holes are shown.

It is my understanding that when you do a path array, an object is placed at both the beginning and end of the path. When the path is a closed loop, will that not result in a duplicate object?

If it is true that there is a duplicate, is it undesirable that this should be so?

Thanks.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Hole Pattern

Post by Roy_043 »

Workshop_Notes wrote: Wed Mar 29, 2023 9:33 pm the 'count' in the path array is 11 but only 10 holes are shown.
11_holes.png
11_holes.png (1.25 KiB) Viewed 237 times
I see 11 holes.

Workshop_Notes wrote: Wed Mar 29, 2023 9:33 pm will that not result in a duplicate object?
No.
Post Reply