Creating repeated parameterized geometry in Sketcher

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
kafab
Posts: 2
Joined: Thu Sep 16, 2021 10:09 pm

Creating repeated parameterized geometry in Sketcher

Post by kafab »

Hello all! I'm a relatively new FreeCAD user hoping for some help creating a simple geometry. It's a 2D rectangle with triangle recesses in one side, like a comb. I've figured out how to parameterize the width, height, and spacing of the recesses so that they are easily modifiable by altering a single constraint, and I'm trying to figure out how to do the same for the number of recesses in order to quickly scale up from the 3 recesses shown here to, say, 25 recesses while preserving the parameterized height, width, and spacing. Any suggestions on how to do this would be appreciated.

The basic workflow I've been using to create the recessed features is: sketch entire edge using polyline, set parameters for center feature, use formulas referencing center feature parameters to constrain right-hand features, use symmetric constraints to constrain left-hand features symmetric to right-hand features. This works fine for a few features but it'll get unwieldy for larger numbers since I still have to add constraints individually to every feature. I've tried using the Clone and RectangularArray tools, and found they didn't preserve enough of the constraints to really streamline this process and also introduced the need to add more coincident constraints to link the features together. Is there a more elegant way of doing this? Thanks in advance everyone.
Screenshot 2021-09-16 152118.png
Screenshot 2021-09-16 152118.png (41.67 KiB) Viewed 749 times
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
simple mold.FCStd
(4.93 KiB) Downloaded 16 times
chrisb
Veteran
Posts: 54190
Joined: Tue Mar 17, 2015 9:14 am

Re: Creating repeated parameterized geometry in Sketcher

Post by chrisb »

You cannot do this in Sketcher. The proper way would be:
- Create the rectangle and pad it
- create one single recess
- use a linear pattern.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kafab
Posts: 2
Joined: Thu Sep 16, 2021 10:09 pm

Re: Creating repeated parameterized geometry in Sketcher

Post by kafab »

Thanks! I appreciate the quick response. I'll stop trying to make this work in Sketcher and just use the LP.
Post Reply