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

Re: Sketcher WB: moving destroys hexagon

Post by chrisb »

bejant wrote: Sun Feb 17, 2019 10:32 am 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?).
No, I was thinking of blue construction geometry, but your example is far better, because there is no workaround.
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).
In fact you need only 3 angles for a hexagon. It can be explained geometrically, but we could do some DOF math instead

- a hexagon - as created now - has 4 DOF
- a (construction) circle has 3 DOF
- each point-on-object, of which we have 6, has one DOF

If we remove the construction circle we add 6 DOF for the now missing point-on-object constraints and subtract 3 DOF for the circle

So to reach the same number of DOF we have to add 3 angular constraints, where each consumes 1 DOF.

(Boy I'm glad I did all this DOF stuff in my document).
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 7:57 am So here is the direct link to my sketcher tutorial: https://owncloud.gwdg.de/index.php/s/HS ... I/download.
Hi Chris, very nice tutorial! Am I allowed to link it in the Wiki?

Since I developed the LaTeX editor www.lyx.org for 15 years and see that you use pdfteX to create your document, I cannot resist to make a proposal:
The icons and all images look a bit pixeled on screen. Since you use pdfTeX you should convert the SVG of the icons to PDF and then put the PDFs into your document. For the larger images the resolution should be higher. In the FC forum the user easyw-fc showed me the program https://en.wikipedia.org/wiki/ShareX to make sreenshots quickly and with the same resolution as you see it on screen. I love it and used it already for the documentation of the a2plus WB. So maybe this could also be a useful tool for your tutorials.
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: Sun Feb 17, 2019 10:32 am Sometimes we have to do it, for example when using an edge that is a Link To External Geometry.
OK, then this proposal cannot be applied.

To summarize:
- moving polygons inserted via the FC toolbar can be "destroyed" by movement actions
- this will most probably lead to confusions for many users and so the situation should be improved if possible

You are much more familiar with FC than I am and thus I hope that someone has an idea how the situation could be improved.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sketcher WB: moving destroys hexagon

Post by bejant »

chrisb wrote: Sun Feb 17, 2019 11:50 am but your example is far better, because there is no workaround.

I've read in the forum that at least one commercial Sketch-based CAD program does allow Link To External Geometry edges to be directly used to create a Feature. Maybe FreeCAD should allow that but, even if it were to happen, I think there will still be times where regular Sketcher geometry will need to be placed on top of Link To External Geometry edges.

chrisb wrote: Sun Feb 17, 2019 11:50 am (Boy I'm glad I did all this DOF stuff in my document).
I'm glad you did too; I'm not used to thinking about how many DOF any particular Constraint consumes. BTW, I followed your instructions and saw that only 3 included angles need to be applied to create a regular hexagon. Looking at the result of that experiment a bit more, I still think it would be handy to be able to create Sketcher > Polygons this way (no construction circle). It also reminds me that it would be nice to have a Square in the Polygon list, so that I don't always have to make a rectangle with horizontal and vertical edges, then having to delete those 4 Constraints, in order to spin it.
uwestoehr wrote: Sun Feb 17, 2019 1:10 pm To summarize:
- moving polygons inserted via the FC toolbar can be "destroyed" by movement actions
Yes.

uwestoehr wrote: Sun Feb 17, 2019 1:10 pm this will most probably lead to confusions for many users and so the situation should be improved if possible
I agree that it will cause confusion, but I have to note that I've never used the Sketcher > Move tool that way. To move a Polygon I'm used to dragging either the center or, much less often, a white edge. Even so, my opinion is that using the Sketcher > Move tool shouldn't cause a polygon to become a different kind of polygon, nor cause a polygon to be folded over onto itself.

uwestoehr wrote: Sun Feb 17, 2019 1:10 pm I hope that someone has an idea how the situation could be improved.
I'm just offering ides; I really don't know what coding would have to be done. One improvement would be that Undo takes me back to where I was right before I clicked the toolbar icon - thanks for writing that ticket.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sketcher WB: moving destroys hexagon

Post by NormandC »

uwestoehr wrote: Sun Feb 17, 2019 1:06 pm https://en.wikipedia.org/wiki/ShareX to make sreenshots quickly and with the same resolution as you see it on screen. I love it and used it already for the documentation of the a2plus WB. So maybe this could also be a useful tool for your tutorials.
chrisb, like a lot of us on the forum, doesn't use Windows at home. ShareX is a Windows-only program which makes it a no-go.

Linux FTW. ;)
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sketcher WB: moving destroys hexagon

Post by NormandC »

bejant wrote: Sun Feb 17, 2019 4:24 pm To move a Polygon I'm used to dragging either the center
Which is the way to do it, no need to use the Move tool, as GeneFC already replied.

bejant wrote: Sun Feb 17, 2019 4:24 pm using the Sketcher > Move tool shouldn't cause a polygon to become a different kind of polygon, nor cause a polygon to be folded over onto itself.
The problem, as already mentioned here, is that you try to move one single element of a set of geometry that are constrained together. 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.

I'm baffled that this topic has reached 3 pages for a "problem" that is just an inappropriate use of the Move tool.

To me it makes perfect sense to select all items that I want to move, and is illogical to only select one of them. How far do the devs have to go to program for all possibilities? How much energy will that require? How much would this bog down the solver? I'd rather abdullah spent his development time on more useful things.
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 »

chrisb wrote: Sun Feb 17, 2019 11:50 am
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.
This is a really important concept that probably should be featured in the comprehensive tutorial Chris has authored. There may be some exceptions, but virtually everything in the sketcher is an element, a constraint, or a method. The appearance of shapes is just a convenient grouping of elements with constraints and has little or no impact on the sketch solving process.

Gene
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sketcher WB: moving destroys hexagon

Post by NormandC »

Thanks Gene. In my day job, I work with a mature commercial parametric CAD program that has benefited from unknown man-hours of development, but understandably much more than FreeCAD. Yet, from time to time I still get similar issues than the one mentioned in this topic. Part of becoming proficient with a program is learning and understanding its limitations, and which tool is the right one for a task. I'd wager that making a program 100% "bulletproof" in a CAD context would be almost impossible, unless you'd drastically restrict its functionality to the most basic tasks.
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher WB: moving destroys hexagon

Post by chrisb »

uwestoehr wrote: Sun Feb 17, 2019 1:06 pm Hi Chris, very nice tutorial! Am I allowed to link it in the Wiki?
You can link the tutorial in the wiki, although I still think it is somewhat preliminary.

I have not yet optimized the images, but all SVGs are indeed converted to pdf using inkscape, it was the best I could find.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher WB: moving destroys hexagon

Post by chrisb »

bejant wrote: Sun Feb 17, 2019 4:24 pm It also reminds me that it would be nice to have a Square in the Polygon list
There is a square in the polygon list, but especially for that it would be good to have a specially constrained with verticals and horizontals.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply