this post was submitted on 11 Jul 2023
6 points (100.0% liked)

FreeCAD

813 readers
1 users here now

Your own 3D parametric modeler.

www.freecadweb.org

FreeCAD is an open-source parametric 3D modeler made primarily to design real-life objects of any size. Parametric modeling allows you to easily modify your design by going back into your model history and changing its parameters.

founded 2 years ago
MODERATORS
 

I have the following:

I want the center rectangle to be concentric with the outer rectangle (the separation of each edge should be equal). What's the best way to do this?

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 1 year ago

I’d do either 45 degree lines of equal length on 2 corners with the same length, or 2 boxes with equal lengths.

It depends on what method would be easiest for you to implement and what your using to determine the distance between the rectangles.

[–] [email protected] 3 points 1 year ago

Should the horizontal and vertical edges have the same separation?

Add construction lines connecting rectangle A's top right corner and rectangle B's top right corner, repeat for each corner, constrain the 4 lines to be equal in length.

[–] [email protected] 1 points 1 year ago (1 children)

There are several ways to do it!

Assuming you already have rectangle contraints -- horizontal, vertical, width, height, etc. -- then I'd probably constrain the centers to be coincident.

Personally, I hate defining the same thing more than once, so I'd use parameters (variables). Constrain one with height and width equal to parameters, and constrain the other based on 80% of the dimensions. Then you offset two adjacent edges by 10% of the size, and you're golden. (Keep in mind kerf, etc, if necessary).

[–] Kalcifer 1 points 1 year ago (1 children)

Assuming you already have rectangle contraints – horizontal, vertical, width, height, etc. – then I’d probably constrain the centers to be coincident.

Yeah, you can see all those constraints in the picture.

Constrain one with height and width equal to parameters, and constrain the other based on 80% of the dimensions.

Ah, okay - this is more or less the way that I usually do it. If its a box, the concentric separation, or "wall thickness" would be the same, so I would set a vertical and horizontal distance constraint between the outer and inner rectangles. This just felt sort of hacky to me, so I was wondering if there was a dedicated constraint so that I could, for example, select the outer rectangle, and the inner rectangle, then click a "Constrain concentric" option. Then I would only need one constraint for the wall thickness.

[–] [email protected] 1 points 1 year ago

I'm by no means a FreeCAD expert, so it's possible there are better options.

If you're using parameters -- specifically the same parameters for both rectangles -- then it should be as simple as making a coincident contraint on the center points.