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

Re: Sketcher WB: moving destroys hexagon

Post by bejant »

uwestoehr wrote: Sat Feb 16, 2019 3:53 pm So if there are still 6 lines after the movement (despite I only see 4), this means that 2 lines have the length zero and thus violated the constraint.
When I followed your instructions, I ended up where there were 3 edges of the same length directly on top of one another. Hovering over each in the Sketcher > Elements widget hi-lights each in the 3D view. I didn't have any segments of zero length.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sketcher WB: moving destroys hexagon

Post by bejant »

uwestoehr wrote: Sat Feb 16, 2019 3:53 pm And what about the undo issue?
(snip)
Maybe this can be improved?
I agree that Undo need some work.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Sketcher WB: moving destroys hexagon

Post by uwestoehr »

bejant wrote: Sat Feb 16, 2019 4:07 pm I agree that Undo need some work.
I created now issue #3842 for the undo part.

bejant wrote: Sat Feb 16, 2019 4:05 pm When I followed your instructions, I ended up where there were 3 edges of the same length directly on top of one another.
I see now. The longer I think about it the more I think there should something be done. These proposals come into my mind:

- The tooltips of the polygon insertion state that regular/equilateral polygons are inserted. Therefore when inserting a hexagon all segment lines have the same length. Therefore FC can also directly apply angular constraints between all segment lines instead of the datum circle. Then any move operation can end up in a visual square and if the user likes to have a distorted hexagon he can quickly change an angle.

- Sketching takes place in a 2D plane, therefore it would help if the solver does not allow solutions where lines and arcs are on their full length onto each other. If there are use cases for lines onto each other with full length, then please ignore this idea.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Sketcher WB: moving destroys hexagon

Post by GeneFC »

uwestoehr wrote: Sat Feb 16, 2019 6:53 pm Therefore FC can also directly apply angular constraints between all segment lines instead of the datum circle.
I would not want to see the datum circle replaced. For the special case of a hexagon the circle radius is the same as the length of a single leg. Easy to go back and forth. However for other shapes, such as a pentagon or a heptagon that trivial conversion does not exist.

Yes, I do use the pentagon and heptagon at times.

I am not sure there is a one-size, fits-all solution here. Many different users will have many different needs. I consider those prebuit polygons to be just starting points, similar to lines or arcs. It will not be easy (or perhaps not even possible) to make an "improvement" that will work for everyone.

If you want to move the entire shape just grab the center and drag it. No need for any other operation. If you want to distort the shape in some manner then an automatic capability is unlikely to work.

Gene
User avatar
HarryGeier
Veteran
Posts: 1231
Joined: Mon Jul 10, 2017 12:36 pm
Location: Hof Germany

Re: Sketcher WB: moving destroys hexagon

Post by HarryGeier »

I am with gene,
it can stay as it is.. we just need to tell that ( possible effects when moveing constrained elements ) in the manual...

Moving was not ment to drag a single line around..afaik.. it´s ment to move a whole bunch on objects

Dragging a single line in these hexa, peta , hepta... gons makes then grow, rotate or shrink.. that is how it works..

Harry
Kaum macht man´s richtig , gehts´s
My Video Tutorials on Youtube: https://www.youtube.com/channel/UCoe3B ... p8Q/videos
My FreeCAD Stuff on Hidrive: https://my.hidrive.com/share/qr3l1yddy6#$/
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher WB: moving destroys hexagon

Post by chrisb »

uwestoehr wrote: Sat Feb 16, 2019 3:53 pm Do you mean this?: https://www.freecadweb.org/wiki/Sketcher_tutorial
I cannot read there something about the movement or line jumping.
That's the topic. See section 19.2, page 42.

Geometric constraints are usually preferred over dimensional constraints for several reasons, one of them being the clutter they generate in a sketch. A common usage - probably the most common usage is modeling hexagon nuts and bolts. And I would very much appreciate it, if these polygons stay as they are. To switch from a hexagonal to an octogonal bolthead, easy now, a nightmare with angular constraints.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Sketcher WB: moving destroys hexagon

Post by uwestoehr »

chrisb wrote: Sun Feb 17, 2019 1:45 am That's the topic. See section 19.2, page 42.
To what do you refer? The Wiki has no "page 42".
chrisb wrote: Sun Feb 17, 2019 1:45 am Geometric constraints are usually preferred over dimensional constraints for several reasons...
I shared 2 possible solutions that came into my mind to solve the issue. Apparently setting angle constraints instead of a circle is not suitable. But what about my second proposal? If this is also not possible, do you have another idea?
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher WB: moving destroys hexagon

Post by chrisb »

:oops: Very sorry, my fault! I had this page https://forum.freecadweb.org/viewtopic.php?f=36&t=30104 opened in a tab as well and followed your link in yet another. On switching tabs I mixed them up. So here is the direct link to my sketcher tutorial: https://owncloud.gwdg.de/index.php/s/HS ... I/download.

Still very sorry for misleading.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher WB: moving destroys hexagon

Post by chrisb »

Concerning your second idea: First I'm not a friend of forbidding everything that has not been foreseen in advance. There is a very simple solution if you don't want colinear lines on top of each other: don't do it.

Furthermore it can be useful for construction geometry or for master sketches. It is not really necessary, but at times it is much easier to create than to use some workaround.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sketcher WB: moving destroys hexagon

Post by bejant »

uwestoehr wrote: Sun Feb 17, 2019 3:28 am But what about my second proposal?
Referencing chrisb's reply:
chrisb wrote: Sun Feb 17, 2019 9:30 am There is a very simple solution if you don't want colinear lines on top of each other: don't do it.
Sometimes we have to do it, for example when using an edge that is a Link To External Geometry. The magenta geometry can't be used directly to create a Feature, so we have to create a white segment on it (@chrisb, is that what you are explaining in the second paragraph of your reply?).

I'd prefer that the Sketcher > Create Polygon tool uses a Construction Circle and Equality Constraints applied to the edges. But, it might be handy if the Sketcher > Create Polygon tool had some toggle where the Polygon would be created with Equality Constraints applied to the edges and Angle Constraints of equal value applied to the edges at each corner except one (I'm not sure).
Post Reply