Constrain sketch on a face to a parameter.

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
CarbonMan
Posts: 2
Joined: Tue Nov 08, 2022 7:28 am

Constrain sketch on a face to a parameter.

Post by CarbonMan »

Hi,
In the attached there is a box and a lid. It is parameterized.

Sketch006 is a hole in one of the box's sides. I am trying to make it constrain to the center of the side. The width of the box is specified by params.width.
I would like the hole to align using this formula
(params.width - params.micro_b_cutout_width)/2

The first problem I have is that I have added micro_b_cutout_width to the params list but it only appears when the list is edited. It doesn't appear when editing formulas.

The second problem is the sketch has 1 dof (horizontal) but I don't seem to be able to constrain it to the box face even as a simple set distance from the edge.

Thanks.
Attachments
esp32 box parametric.FCStd
(100.16 KiB) Downloaded 13 times
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Constrain sketch on a face to a parameter.

Post by Bance »

The first problem the name not appearing, was caused by the fact that you didn't enter a formula for that parameter (13mm was not a formula/entered as a formula.) There is no alias for it in params either.

I can set a horizontal distance from the ext geom no problem ( this is not a good idea TNP!)

Don't place sketches on faces TNP, instead use std planes and offset them.

Besides that it would be much easier if the model was centred on the origin. There is probably no need for a STD part here.
Attachments
esp32 box parametricbance.FCStd
(104.14 KiB) Downloaded 7 times
User avatar
Shalmeneser
Veteran
Posts: 9560
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Constrain sketch on a face to a parameter.

Post by Shalmeneser »

Fillet or Chamfer can work on multiple edges (with the same values) : less features in the construction tree, less tnp risk.
It's better to fillet inside the sketch for TNP reasons.

Try to use axis.
Attachments
esp32 box parametricbance.FCStd
(104.14 KiB) Downloaded 4 times
Capture d’écran 2022-11-27 141037.jpg
Capture d’écran 2022-11-27 141037.jpg (68.92 KiB) Viewed 377 times
User avatar
dprojects
Posts: 722
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: Constrain sketch on a face to a parameter.

Post by dprojects »

CarbonMan wrote: Sun Nov 27, 2022 6:36 am In the attached there is a box and a lid. It is parameterized.
Sketch006 is a hole in one of the box's sides
Why you want to have parametrized such a simple box? Why you use Chamfer at hole edge if there is Countersink option for that?

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
User avatar
papyblaise
Veteran
Posts: 8001
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Constrain sketch on a face to a parameter.

Post by papyblaise »

A few tools well used it goes faster
Attachments
boxPPB.FCStd
(80.68 KiB) Downloaded 8 times
BoxPPB.JPG
BoxPPB.JPG (16.44 KiB) Viewed 331 times
CarbonMan
Posts: 2
Joined: Tue Nov 08, 2022 7:28 am

Re: Constrain sketch on a face to a parameter.

Post by CarbonMan »

Thanks for the replies

A couple of points;
This is my first project, after going through some of the training material.
The box isn't my design, I am just trying to modify it.
Chamfer was done prior to me putting a hole in the side.

I think I stuck in the ways of thinking from other packages. I'll try again by ading a plane.
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Constrain sketch on a face to a parameter.

Post by Bance »

Don't go adding planes... There's no need for that.
Post Reply