## Center of a Rectangle

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

cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

### Re: Center of a Rectangle

Just updated to newest version and still have the problem. With this message on the terminal

Updating geometry: Error build geometry(1): Both points are equal
Invalid solution from DogLeg solver.
Updating geometry: Error build geometry(1): Both points are equal
Invalid solution from DogLeg solver.

EDIT: Then out of the blue it works, I do not know what i did
EDIT2: Now I only get the problem when referencing with a 3rd. point, if i reference the line the symmetry is OK

OS: "Arch Linux"
Word size of OS: 64-bit
Version: 0.15.4242 (Git)
Branch: master
Hash: 0db3326e68d42588990c89376ebcbb8f5cd06d1f
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 3.1.3
OCC version: 6.7.1
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

### Re: Center of a Rectangle

Here is your Sketch before applying that last Symmetry Constraint you mentioned:
20141204a-cox.png (7.26 KiB) Viewed 995 times
If you apply the Symmetry Constraint to those two leftmost vertices and the bottom edge of the upper rectangle, you'll get the results you are expecting. Note that when applying the Symmetry Constraint to two points and a line, the order in which you select them doesn't matter, and Symmetry Constraint is applied as though the line segment is a ray.

But, if you apply the Symmetry Constraint to those two left vertices and then the lower left vertex of the upper rectangle, you'll squish everything into a vertical line. Using three points for Symmetry causes those three points to align.

After adding that last Symmetry Constraint, do you see how the 3 sets of Symmetry Constraints squish the geometry onto a vertical line segment?

As a side note, your Sketch should not have that overlap in the center.

(Edited to include the image and to provide a more meaningful reply.)
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

### Re: Center of a Rectangle

cox wrote:EDIT: Then out of the blue it works, I do not know what i did
I think you selected two points and the line segment.
cox wrote:EDIT2: Now I only get the problem when referencing with a 3rd. point,
That's not really a problem, it is the intended behavior when using 3 points.
cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

### Re: Center of a Rectangle

Nice explanations.

Understanding the alignment part of the symmetry function really helped me make sense of this.

Thanks.