Best Practice: Centering ?

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
rich61
Posts: 156
Joined: Sat Jul 20, 2019 9:56 am

Best Practice: Centering ?

Post by rich61 »

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
Centering.jpg (6.85 KiB) Viewed 5429 times
Last edited by rich61 on Sun Jul 21, 2019 2:22 pm, edited 1 time in total.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Best Practice: Centering ?

Post by openBrain »

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
center_circle.png (2.77 KiB) Viewed 5415 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
center_circle_Y.png (2.54 KiB) Viewed 5415 times
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Best Practice: Centering ?

Post by freecad-heini-1 »

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

Re: Best Practice: Centering ?

Post by TheMarkster »

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
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Best Practice: Centering ?

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
rich61
Posts: 156
Joined: Sat Jul 20, 2019 9:56 am

Re: Best Practice: Centering ?

Post by rich61 »

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
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Best Practice: Centering ?

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply