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 ?
Best Practice: Centering ?
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Best Practice: Centering ?
Last edited by rich61 on Sun Jul 21, 2019 2:22 pm, edited 1 time in total.
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.
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) :
-
- Veteran
- Posts: 7788
- Joined: Tue Jan 07, 2014 11:10 am
- Contact:
-
- Veteran
- Posts: 5505
- 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.
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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
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.
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.
Re: Best Practice: Centering ?
yes
yes.I didn't try alternatives, but maybe auto remove redundants would remove point-on-line anyway.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.