## Sketcher WB: moving destroys hexagon

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!
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

### Re: Sketcher WB: moving destroys hexagon

chrisb wrote:
Sun Feb 17, 2019 10:21 pm
There is a square in the polygon list,
I even looked before I posted, I don't know how I missed it.

chrisb wrote:
Sun Feb 17, 2019 10:21 pm
but especially for that it would be good to have a specially constrained with verticals and horizontals.
That one has its own place in the Sketcher Geometries toolbar...
chrisb
Posts: 29095
Joined: Tue Mar 17, 2015 9:14 am

### Re: Sketcher WB: moving destroys hexagon

GeneFC wrote:
Sun Feb 17, 2019 5:26 pm
This is a really important concept that probably should be featured in the comprehensive tutorial Chris has authored.
You are very right. I thought it was there, but it isn't
NormandC wrote:
Sun Feb 17, 2019 4:57 pm
The sketcher solver has no idea that it is a polygon, it just analyzes the constraints together with the move operation and computes a solution that conforms with the constraints.
Polyline, Rectangle, Polygon and Slot are only Shortcuts, and I see absolutely no need to change that. However, I see that it might be useful to have different sets of constraints for these constructs.
A Sketcher Lecture with in-depth information is available in English, auf deutsch, en français, en español.
chrisb
Posts: 29095
Joined: Tue Mar 17, 2015 9:14 am

### Re: Sketcher WB: moving destroys hexagon

bejant wrote:
Sun Feb 17, 2019 10:47 pm
That one has its own place in the Sketcher Geometries toolbar...
You mean the rectangle? That lacks the equality to be a square - easy to add manually, but it still has to be done.
A Sketcher Lecture with in-depth information is available in English, auf deutsch, en français, en español.
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

### Re: Sketcher WB: moving destroys hexagon

NormandC wrote:
Sun Feb 17, 2019 4:57 pm
The sketcher solver has no idea that it is a polygon, it just analyzes the constraints together with the move operation and computes a solution that conforms with the constraints.
GeneFC wrote:
Sun Feb 17, 2019 5:26 pm
The appearance of shapes is just a convenient grouping of elements with constraints and has little or no impact on the sketch solving process.
Well, I can move a Regular Hexagon by dragging any white edge and it maintains the hexagonal shape without collapsing into something else, so I don't think that using the Sketcher > Move Geometry tool should permit the hexagon to morph into some other shape. From what I see the Sketcher > Move Geometry tool by itself doesn't delete or add Constraints, in the OP example no Constraints have been deleted or added, so I think it is reasonable that the user expects the polygon to remain a polygon of the same shape.

Sketcher > Move Geometry wiki page, while I have it handy:
https://www.freecadweb.org/wiki/Sketcher_Move
GeneFC
Posts: 1654
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

### Re: Sketcher WB: moving destroys hexagon

I think this is closely related to the mostly eliminated problem of "sketch flipping." Moving a short distance seems to work, even when grabbing a single element. Moving a large distance fails.

If you read the wiki carefully it says nothing about maintaining the original shape, only the constraints. Also, it says the operation moves the selected elements and says nothing about the unselected elements.

I agree that in many cases the user would expect the move to keep the shape intact, but that is not what the description says.

If I select all the elements of the hexagon it can be moved completely intact, any distance or direction.

Sounds like a feature request, or at least an expanded description in the wiki, rather than a bug report.

Gene
chrisb
Posts: 29095
Joined: Tue Mar 17, 2015 9:14 am

### Re: Sketcher WB: moving destroys hexagon

GeneFC wrote:
Mon Feb 18, 2019 12:24 am
I think this is closely related to the mostly eliminated problem of "sketch flipping." Moving a short distance seems to work, even when grabbing a single element. Moving a large distance fails.
That's exactly what is happening. If you draw a hexagon and take a point at the right and you apply a distance constraint which moves it far to the left, you experience the same collapsing into a square.

So it has nothing to do with the move tool.
A Sketcher Lecture with in-depth information is available in English, auf deutsch, en français, en español.
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

### Re: Sketcher WB: moving destroys hexagon

GeneFC wrote:
Mon Feb 18, 2019 12:24 am
I think this is closely related to the mostly eliminated problem of "sketch flipping." Moving a short distance seems to work, even when grabbing a single element. Moving a large distance fails.
chrisb wrote:
Mon Feb 18, 2019 12:33 am
That's exactly what is happening. If you draw a hexagon and take a point at the right and you apply a distance constraint which moves it far to the left, you experience the same collapsing into a square.
Ok, now I agree.
abdullah
Posts: 3583
Joined: Sun May 04, 2014 3:16 pm

### Re: Sketcher WB: moving destroys hexagon

The moving of geometry has already been discussed above. I can only confirm that if a geometric element is moved so that the solver fulfils the constraints, then the software is doing what the user is asking it to do. Of course, it shall be possible to come back to the original situation undoing the action. That is a bug.

PR:
https://github.com/FreeCAD/FreeCAD/pull/3536
uwestoehr
Posts: 1964
Joined: Sun Jan 27, 2019 3:21 am

### Re: Sketcher WB: moving destroys hexagon

abdullah wrote:
Sun May 31, 2020 7:23 am
PR:
https://github.com/FreeCAD/FreeCAD/pull/3536
Many thanks, it fixes the Undo issue for me.