## Best Practice: Centering ?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules

rich61
Posts: 6
Joined: Sat Jul 20, 2019 9:56 am

### Best Practice: Centering ?

I made a mistake in the graphic, the left construction line did not quite reach the point on line constraint, so its wasn't quite centered.

In order to center the circle between the two vertical lines, I created a line from the circle center to the left line and one to the right. Then I set an equal constrain on my two construction ( blue ) lines.

Is this the best way to center my circle ?
Centering.jpg (6.85 KiB) Viewed 223 times
Last edited by rich61 on Sun Jul 21, 2019 2:22 pm, edited 1 time in total.
openBrain
Posts: 2342
Joined: Fri Nov 09, 2018 5:38 pm

### Re: Best Practice: Centering ?

Without more, I'd rather do it using 2 Sketcher CreatePoint (not to be confused with coincident constraint) constrained with a point-on-line on the vertical lines, then add a symmetry between these 2 points and the circle center.
center_circle.png (2.77 KiB) Viewed 209 times
However, as much as you can, the best is probably to use the sketch axis by setting your circle center on the Y axis, and setting a symmetry between the 2 horizontal line endpoints against the Y axis (in that case, the horizontal constraint on the line is redundant and shall be removed) :
center_circle_Y.png (2.54 KiB) Viewed 209 times
Posts: 5989
Joined: Tue Jan 07, 2014 11:10 am
Contact:

### Re: Best Practice: Centering ?

center_circle.gif (258.4 KiB) Viewed 203 times
TheMarkster
Posts: 1061
Joined: Thu Apr 05, 2018 1:53 am

### Re: Best Practice: Centering ?

If you want it centered not just between the 2 vertical lines, but also centered in the rectangle you could select (in this order) the upper left point, the lower right point, then the center of the circle and apply symmetry constraint. No extra points are lines need to be created for that.
chrisb
Posts: 19473
Joined: Tue Mar 17, 2015 9:14 am

### Re: Best Practice: Centering ?

Plese note in freecad-heini-1's post how he avoids creating an automated point-on-line constraint, which would become redundant as soon as the symmetry is applied.
rich61
Posts: 6
Joined: Sat Jul 20, 2019 9:56 am

### Re: Best Practice: Centering ?

Chrisb, I assume you mean creating the point initially off the line before application of symmetry. I didn't try alternatives, but maybe auto remove redundants would remove point-on-line anyway.

So, I do know several ways to center things now.

Seems like it might be possible someday to create a center function where one clicks on the point or element to be centered, then clicks on two elements within which to center. 3 clicks.

It could apply one of the strategies described, behind the scene, sort of like a constraint macro.
chrisb
Posts: 19473
Joined: Tue Mar 17, 2015 9:14 am

### Re: Best Practice: Centering ?

rich61 wrote:
Sun Jul 21, 2019 2:18 pm
Chrisb, I assume you mean creating the point initially off the line before application of symmetry.
yes
I didn't try alternatives, but maybe auto remove redundants would remove point-on-line anyway.
yes.