Element widget for Sketcher WB

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
abdullah
Posts: 3253
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Fri Jun 27, 2014 9:52 pm

Hi Jim! Thanks for testing it a reporting back! :)

I am traveling and I do not have access to a real pc, so I can not fix it. In the best case, I may be able to fix it in about 10 days.
1) the different icons for the different icon types only change if you change the element types by pressing the shift key, they do not change if you select the element type from the drop down list. 
Ok. It is very easy to fix...
What I was thinking was a bit different. I was thinking that when you select the element type from the drop down list that the taskview would only list items that contain a valid selection of that type. E.g. if you select start point then any circle element would not be shown in the list or if you selected midpoint the lines would not be listed. One of the reasons I was thinking of this was as a way to reduce the length of the elements list in the taskview, because with a complex sketch this list could get very long. But with more thinking I am now wondering if this would just get confusing for the operator? Hence for at least a simple sketch, I think my other idea of changing the icon (as you have done with the "lock' icon) to represent "no valid selection of this type available for this element" is a better idea. Other may have different opinions?
Your original idea was also my original idea. The "problem" I see, is that because the number of elements change on shift press, you lose the reference of where you are. With the second idea thus does not happen and allows, for example: centering an horizontal line(H) with respect to a vertical construction line (V) (assuming we start with type line) by: hover mouse in widget until H is highlighted, press shift (startpoint), click to select, press shift (endpoint), ctrl+click to add endpoint to selection, press shift (one time with fastforward, two times without, to got to line type), hover V, ctrl+click to add to selection, shortcut for symmetry constraint or right click for context menu and select symmetry constraint. With the original idea, if element1 is a circle, H and V would be different element numbers in Line type and in point type, which might cause confusion. Certainly, it has gain a lot of usability after implementing your idea of the cross icon.
2) the test for valid types seems to look at the pre-selection from the mouse hover over the elements list in the task view and will work if you then use the shift key to change element types but the pre-selection changes if you move the mouse to the drop down list, hence changes the valid types available. 
I have to see it in a real computer...

About the fastforward:
It is currently deliberately only working for midpoint, so skips midpoint if the hovered element does not have it. The reason for not implementing it for all types is that with the current implementation it would be difficult for the user to navigate with shift. Imagine you have an element of type point (which only has type starting point). Pressing shift would do nothing if hovering it. Inagine you want to switch to type midpoint to select the center of a circle. Because the only feedback to the user is the preselection in the inventor view, you will need to hover an element having startpoint and midpoint so that you could change with shift (which can only be an arc and we might not even have one). This would be annoying and frustrating fir the user.

However, thinking about your idea with cross icons, I am considering another usability improvement. Stop with the generic name "element" and give each element the name of the geometry (Line, Arc, Point,...), possibly with more icons, one for each geometry and type. This way, the feedback to the user is not only the inventor view, but the names and icons, so in the previous example with fastforwarding for all types, the user will hover a circle (identifiable by name and/or icon) and press shift, thereby switching to the next allowable type, which is midpoint... that on paper seems nice...

Your ideas and reports are really helping improving this tool! Thanks!
mrlukeparry
Posts: 655
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Element widget for Sketcher WB

Postby mrlukeparry » Sat Jul 05, 2014 9:24 am

Chosing to rise the lines in updateColor function is just for the reason that updateColor is called in several different functions and color and rising are interrelated. There is a repetition of code in the cases where updateColor is called from draw (reiterating an already interating loop for assigning the z height). However, changing this would certainly involve major changes in ViewProviderSketch that at the time I wanted to avoid. Nevertheless, I would aggree there is room for improvement there.
Okay, thanks for the description of that.

I think if we want to do any more we need to reimplement SoLineSet as a custom node. I agree that if we trying having two SoLineSets it will just become complicated and tedious. If you've got the time I'd just suggest experiment copying their code and changing it as you like. It is also good practice to extending functionality in Coin3D. Let me know if you're interested further and I can offer some help.
There are three macros, motivated mainly to be consistent with the first of them, which must generate diffently named objects for each qaction. If you (plural) think I should not use macros for this, please let me know about FreeCADs macro policy. I will use the shell to expand it to normal code.
I don't know if there is macro policy - I just haven't seen it explicitly used much in FreeCAD code except for detected versions of QT and for class or type system.

qobject_cast - I'm not an expert on Qt but like you said it does perform additional checks but doesn't require RTTI- I didn't realise it worked across different libraries. I think it makes more sense to use for anything that inherits from qobject such as QWidget items. Its nothing too worry about but now you know it exists ;)

Code: Select all

Certainly. I know I have this problem with that specific operator. It is a long standing mispractice and I am trying to correct it, but because I am used to see it together I do not always realise. Another one I have is just putting the opening curly brace on a next empty line. I try to correct them. I general if you see in commited FreeCAD code one of those made by me do not hesitate to correct it for readibility.
It's just nice being consistent from the beginning, because we might not be around in the long term so the more we make it readable the better for everyone :)
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Element widget for Sketcher WB

Postby ian.rees » Wed Jul 09, 2014 11:23 am

Hi Abdullah,

Nice addition! I have compiled it and given it a few minutes of experimenting, seems to work well. The new colour to indicate "preselected + selected" is quite nice!

It seems like the problem selecting "further back" items is more general than Sketcher, so I think it might be worth thinking about a solution that will generalise to other parts of FreeCAD. Have you considered putting the elements in the model tree (under the sketch that they live in), rather than the new widget? I think this might be more consistent with the rest of FreeCAD, and could easily represent things like groups in Sketcher if those are added.

Thanks! -Ian-
abdullah
Posts: 3253
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Sat Jul 12, 2014 3:08 pm

Thanks to all for your positive comments, feedback and constructive critics!!

Unfortunately I will be on travel for a longer than expected period, so I have no regular access to a real computer/internet, so forgive me if I am not as reactive as expected...

I have managed to get access to a real computer for a while and I have implemented the "new" idea of my last post, along with fixing the bugs reported by Jim. You can find it in my github, branch: sketch_element_list_named_fastforward

I would appreciate if you could take a look and let me know your impresions...
I think if we want to do any more we need to reimplement SoLineSet as a custom node. I agree that if we trying having two SoLineSets it will just become complicated and tedious. If you've got the time I'd just suggest experiment copying their code and changing it as you like. It is also good practice to extending functionality in Coin3D. Let me know if you're interested further and I can offer some help.
Thanks for taking time to looking into this. It sounds ok. However, to be honest with you, I am not currently aware of all the implications that this would have. So please, allow me some extra time to do my homework, learn about the implications of implementing it as a custom node and I will come back to you (hopefully) soon.
It's just nice being consistent from the beginning, because we might not be around in the long term so the more we make it readable the better for everyone
Sure! :) . Let me rephrase my answer (I am not a native english speaker): I will double check code for readibility before making a pull request. However, in case something bypasses my double check, I have no problem at all with anyone changing my code for aesthetic purposes or readibility. On the contrary, please do it! ;)
It seems like the problem selecting "further back" items is more general than Sketcher, so I think it might be worth thinking about a solution that will generalise to other parts of FreeCAD.
Yes, it is! Graphical selection in the inventor view suffers from this (pickray single element implementation if I recall correctly). I aggree that such a general solution would be nice. Even such a general solution could eventually live together with more specialized solutions, when those specialized solutions have some added-value...

Such a solution could be the representation of a context menu showing the N closest elements to the click or the elements within area around the click...

I think this solution (specially the one published in this post), is a more specialized solution, where you should be able to accelerate further certain common tasks, for example those involving setting constraints to groups of points and lines... or maybe it is just my imagination and noone will use it that way :? :lol:
Have you considered putting the elements in the model tree (under the sketch that they live in), rather than the new widget? I think this might be more consistent with the rest of FreeCAD, and could easily represent things like groups in Sketcher if those are added.
I am not sure I totally follow you.

As far as I understand, you refer to using the Tree that is used for all the WBs, and introducing an additional level for sketches, so that, all the elements of the sketches are showed in this additional level, optionally using the grouping functionality.

Though I think it is indeed a possible solution, I have preliminary reasons why I am not sure it is a good idea:
1. Encapsulation: Maybe it is me, but I am used to see Sketches as C++ Objects and the geometric elements under it as protected/private data members. I like the idea that FreeCAD hides away from me how that beautiful profile (well, not mines, but those of Norman, Jim and company are really beautiful :o ) I am using is done, unless I really want/need to see it. Elements and Constraints are the blocks and glue that are hidden, and somehow I enjoy it is that way. I fear the Tree may become too exhaustive/large. What I would certainly enjoy, is having the named datum constraints listed under the properties of an sketch, without the need of editing the sketch. So I can make copies of an sketch and rapidly change sizes, for example to loft along (across?) different sections. That I am thinking of doing in the future (though I have no problem if someone else likes the idea and wants to code it himself/herself).

2. The edition mode of the Sketcher: Currently changes to parts of the elements are only performed in edition mode, in which the Sketcher Task is shown (so hidding away the elements). I think it would be counterintuitive to switch back and forth from the Task (needed for constraints, grid,...) and the normal tree, just for selecting objects. That is why I decided to set the qlist in the same Task panel.

If I totally misunderstood you, please let me know!!!

I wait for your impressions and comments on this version...
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Element widget for Sketcher WB

Postby ian.rees » Sun Jul 13, 2014 11:15 pm

Hi Abdullah,

Your sketch_element_list_named_fastforward branch looks good! Minor suggestion: an "All" option might be nice in the Type dropdown, to be consistent with the "Filter" dropdown in the constraints widget.
As far as I understand, you refer to using the Tree that is used for all the WBs, and introducing an additional level for sketches, so that, all the elements of the sketches are showed in this additional level, optionally using the grouping functionality.
Yes, that's exactly what I'm thinking. Whether it's a good idea is obviously up for debate ;).

A compromise might be to add your elements to the model tree, and also have your widget in the task view display just the part of the model tree that's below the active sketch? If any of this doesn't make sense, let me know and I can put together a simulated screenshot.

Regarding point #1 - Sketcher's "edges linked to external geometry" seems to already strain the idea of a sketch being an encapsulated thing (admittedly, I haven't figured out that tool). It's easy to imagine use cases where it would be nice to jump from a 3D "Part Design" view, for example, directly into editing a particular element in a sketch.

I also like your idea about making datum points (and maybe datum lines - eg adjustable axes for revolutions) on the sketch that are accessible to the rest of FreeCAD, and think it would make sense to put those in the model tree.

Loose encapsulation could be handled nicely by making the sketch branch in the model tree default to a collapsed state. The constraints/elements/datums wouldn't need to all be on the same level - they could be grouped together in some logical way to reduce clutter.

Point 2 - I think this actually is a more fundamental UI issue with the "Task" views. For instance: if I want to edit a sketch that's been used as a revolution, I often find myself switching back-and-forth between tabs to toggle the visibility of the 3D part.

Thanks! -Ian-
sponssi
Posts: 15
Joined: Sun Jun 29, 2014 6:24 pm

Re: Element widget for Sketcher WB

Postby sponssi » Wed Jul 16, 2014 8:04 pm

Hi,

I had a quick look at the sketch_element_list_named_fastforward branch and by my first impression, this seems to be a really nice feature. I haven't looked at the code so I really can't comment on that. But here are a few ideas about the usability that came to my mind:

- Right clicking on the list to add constraints to (pre)selected elements is really awesome. You could add more commands under the right click menu e.g. fit (and zoom) the view to the selected elements, select/delete all constraints related to the selected elements, toggle construction etc.

- Does this really need the type filters for edge/start/end/mid? You could simply list only the edges/circles/arc/points and allow selection of endpoints from the right click menu of the list. A shortcut key could be added to switch selection between a selected and preselected line and its endpoints. If an endpoint was selected, preselecting the line would toggle the swapping. Both preselection and selection would allow to swap when multiple elements are selected. The filter could be changed to list all/lines/circles/arcs/poits.

- I think the elements should be named in the list as they are referenced from the command line, e.g. Edge<n>. The type and internal geoid could be appended as additional information, or hidden behind the right click menu or some dialog from confusing the user. I would prefer to see them though, it makes debugging a bit easier, but I doubt the casual user wants to know about internal ids and such.

I noticed also a few issues:

- I don't know if using shift as the type swapper is a good idea since it is used generally as a selection modifier like ctrl. Confusing things happen when trying to select subsequent items from the list while holding down shift.

- After some element has been preselected from the list and the cursor moved to the drawing area, the preselection doesn't seem to be resetted in the widget or whereever it is handled. Tapping shift still swaps the preselection between the points of the previously selected element. The left mouse button has to be clicked in the draw area to get rid of this.

- Minimizing and reopening the task widgets mess up their heights. I guess this is more of a problem/feature with the task bar. Minimizing and reopening the solver messages widget seems to reset the heights of the other open widgets. The constantly changing height is a bit annoying, I'd prefer the heights to stay constant all of the time.

All in all this is a great feature. I sincerely hope you would consider my first two points, they were first and biggest issues I noticed during my quick test.

I'm really looking forward to see this merged.
abdullah
Posts: 3253
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Wed Jul 16, 2014 8:49 pm

Hi Ian!!

Thanks for testing!
Your sketch_element_list_named_fastforward branch looks good! Minor suggestion: an "All" option might be nice in the Type dropdown, to be consistent with the "Filter" dropdown in the constraints widget.
I am not sure I understand the intended use of such an "All" option. Contrary to the case of Constraints, where the combo is a filter of constraint type, in the Elements it is not a filter of type of element (i.e. arc, line, circle), but a selection mode for the type of element (it selects the edge, the starting point, the end point or the center point of a type of element). An "all" option would select all the points and edge? I fail to see a use case for such a feature...
Yes, that's exactly what I'm thinking. Whether it's a good idea is obviously up for debate ;).
Sure, I am open to debate, it is the main purpose of this thread ;)
A compromise might be to add your elements to the model tree, and also have your widget in the task view display just the part of the model tree that's below the active sketch? If any of this doesn't make sense, let me know and I can put together a simulated screenshot.
I see that one can find arguments in one direction and the other. I am not contrary to any of them. However, I understand that such a solution, where the sketch stops being encapsulated is disruptive and should be discussed separately. Not that I do not like disruptive solutions that provide a benefit, but I still fancy encapsulation better...

If I were to implement the Element list under the sketch element, I would certainly choose such a compromise solution, as I almost never leave the Task Dialog during Sketch edition.
Point 2 - I think this actually is a more fundamental UI issue with the "Task" views. For instance: if I want to edit a sketch that's been used as a revolution, I often find myself switching back-and-forth between tabs to toggle the visibility of the 3D part.
Oh! In my opinion this is a different problem and I do agree it is indeed annoying. 3D parts cover often parts of the sketches and it is time-consuming and frustrating to go back a forth (maybe someone knows a shorcut). However, to solve this, I would propose to a button/keyboard shortcut/option in the menu that would simply do that, toggle the visibility of everything but the sketch while remembering how it was before entering in edition mode. Then leaving it as it was before entering in edition mode when going out of sketch edition mode.

In my way of thinking, I see two possible modifications to a sketch:
1) Change the sketch "Elements" (e.g. I did the wrong profile)
2) Change the dimensions of the sketch (e.g. I want different "parameters" like radius of arcs and sizes, so datum type of constraints)

For 1) I prefer to enter a "Sketch Edition Mode" with the Taskbar where I can manipulate at ease Elements and Constraints to build the sketch as efficient as possible (toggling visibility via shortcut is here my preferred option).

For 2) I would make those constraint datums named and would prefer to just go to the data properties under the Sketch and change the values, without having to enter "Edition Mode" and having the Inventor view rotated just to change the value of a constraint... (to be implemented functionlity)

Hi Luke!!
I think if we want to do any more we need to reimplement SoLineSet as a custom node. I agree that if we trying having two SoLineSets it will just become complicated and tedious. If you've got the time I'd just suggest experiment copying their code and changing it as you like. It is also good practice to extending functionality in Coin3D. Let me know if you're interested further and I can offer some help.
Ok I have managed to take a look to custom nodes. It seems promising, though due to my lack of knowledge of Coin3D, I am not sure how much such a solution could improve the implementation from the efficiency point of view. Nevertheless, I am planning to make some effort in this direction (probably in August when I go back home), because I want to learn and because I think it may look a tidier solution.

I also plan to have a deeper look into ViewProviderSketch anyway to improve the current drawing code if possible. I will undertake both actions simultaneously, and certainly I plan to discuss my findings here (hopefully with you as you have a deeper knowledge on the subject).

Nevertheless, I would like to separate that additional work from this Element Widget. In the sense that what I would like to have is the Element Widget committed with the current drawing implementation in ViewProviderSketch and then initiate that additional work. Let me know if you are against this plan.
abdullah
Posts: 3253
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Wed Jul 16, 2014 9:34 pm

Hi sponssi!

Thank you very much for testing and for your valuable feedback.
- Right clicking on the list to add constraints to (pre)selected elements is really awesome. You could add more commands under the right click menu e.g. fit (and zoom) the view to the selected elements, select/delete all constraints related to the selected elements, toggle construction etc.
Yes. I do agree with you (at least in part). For example, I am currently thinking on implementing a "close shape" functionality. So that when you select a bunch of elements, it automatically connect the end point of one element with the starting point of the next one (and the endpoint of the last with the starting point of the first). This would be of much assistance, at least for me. Insert elements in inventor view, apply constraints in Element Widget via shortcut and close the shape (the two last steps may be interchanged).

I keep your list with me in my following visit to the code...
- Does this really need the type filters for edge/start/end/mid? You could simply list only the edges/circles/arc/points and allow selection of endpoints from the right click menu of the list. A shortcut key could be added to switch selection between a selected and preselected line and its endpoints. If an endpoint was selected, preselecting the line would toggle the swapping. Both preselection and selection would allow to swap when multiple elements are selected. The filter could be changed to list all/lines/circles/arcs/poits.
An issue with "points" is that there are two types of points, the points added with the create point tool and the points that are drawn on a line and that do not exist as a separate geometric element. But that could be handled so that it operates as you describe.

Your solution would provide a very extensive list of "Elements", as for each line 3 elements would be added, 4 elements for an arc. The idea with setting a "Type" is precisely making the list more concise. If I would implement an Element Type filter (as in constraints), it would help to reduce the list, however, when switching from one Filter type to the next you would lose the reference of the element you had preselected and you would have to move the mouse to find it again...

I do not see the "Type" like a filter of Element Types (as in constraints), but as a way to select related types of subelements of an Element. The main advantage of this is that you do not lose your reference (the preselected element) if you use the shortcut key to swap among subelements. So, for example for centering a line using a symmetry constraint you do not have to search for starting and end points, you search for the line and select the start and end points just by using the shortcuts (and apply the constraint also using the constraint shortcut).

Your solution is certainly an alternative...
- I think the elements should be named in the list as they are referenced from the command line, e.g. Edge<n>. The type and internal geoid could be appended as additional information, or hidden behind the right click menu or some dialog from confusing the user. I would prefer to see them though, it makes debugging a bit easier, but I doubt the casual user wants to know about internal ids and such.
I think I do not fully understand. When "Edge" type is selected, everything appearing in the list is an edge, so saying it is an Edge provides no additional information. Saying that the Edge belongs to an Arc, Line, ... helps the user to faster find a given element.

The number currently appearing in the list is more of a convenience to have the Elements numbered (for example for longer lists that use scroll). It is unrelated to geoids or any identifier. I think that debugging is better done with gdb or outputing to console. IMHO should not be presented in the UI.
- I don't know if using shift as the type swapper is a good idea since it is used generally as a selection modifier like ctrl. Confusing things happen when trying to select subsequent items from the list while holding down shift.
Here I quite agree with you. It seemed to me a good option at the beginning, as it was near ctrl, which is used for multiple selection. However, I have also realised it is confusing for the reasons you mention. Could you provide me with an alternative? I mean which key you would like to have, that is near the ctrl... I am open to suggestions from anyone...
- After some element has been preselected from the list and the cursor moved to the drawing area, the preselection doesn't seem to be resetted in the widget or whereever it is handled. Tapping shift still swaps the preselection between the points of the previously selected element. The left mouse button has to be clicked in the draw area to get rid of this.
Yes, yes, yes!! This is a bug. I put it on my list of things to correct.
- Minimizing and reopening the task widgets mess up their heights. I guess this is more of a problem/feature with the task bar. Minimizing and reopening the solver messages widget seems to reset the heights of the other open widgets. The constantly changing height is a bit annoying, I'd prefer the heights to stay constant all of the time.
I do not fully understand what you mean by changing height...
All in all this is a great feature. I sincerely hope you would consider my first two points, they were first and biggest issues I noticed during my quick test.
For the first point for sure.

For the second one I really think there is an advantage in the current implementation. Specially if you try to minimize mouse usage and maximize keyboard shortcuts. You can do more things and faster. It requires though some adaptation to the tool. I would prefer to stay with the current form... :cry:
sponssi
Posts: 15
Joined: Sun Jun 29, 2014 6:24 pm

Re: Element widget for Sketcher WB

Postby sponssi » Thu Jul 17, 2014 5:59 pm

Sorry, I wasn't quite clear on some of my points, I'll hope to clarify them a bit:
Your solution would provide a very extensive list of "Elements", as for each line 3 elements would be added, 4 elements for an arc
My idea was not to list any of the line endpoints or circle/arc centerpoints, only the lines and specifically drawn points (with the tool) so the list wouldn't become too extensive. The end/centerpoits would be selected the way I described.
The main advantage of this is that you do not lose your reference (the preselected element) if you use the shortcut key to swap among subelements.
After a second try I now realized what bothers me in the current implementation: To select some subelement of interest, I first want to preselect the line and then swap to the endpoint I wish to select. This works fine for the first subelement. But when I begin selecting the next subelement, the filter is on the type of the first subelement, although to be consistent with the first element selection, I would expect to be preselecting a line first. This leads to a lot of confusion and tapping of the swap button...

I believe the current method would work just fine if the subelement filter would be reset to line after every preselction change.
I think the elements should be named in the list as they are referenced from the command line
I hope the following image explains this better than me :)
snapshot3.png
snapshot3.png (24.76 KiB) Viewed 2184 times
Unnamed.Sketch.Edge2 vs. 2-Circle is a bit confusing, that was my point.
I mean which key you would like to have, that is near the ctrl... I am open to suggestions from anyone...
"Z" seems unused is sketcher, I'd go with that for now.
I do not fully understand what you mean by changing height...
The height on the rightmost snapshot have been reduced from the original height on the left.
height.png
height.png (49.61 KiB) Viewed 2184 times
Some other comments:
Oh! In my opinion this is a different problem and I do agree it is indeed annoying. 3D parts cover often parts of the sketches and it is time-consuming and frustrating to go back a forth (maybe someone knows a shorcut). However, to solve this, I would propose to a button/keyboard shortcut/option in the menu that would simply do that, toggle the visibility of everything but the sketch while remembering how it was before entering in edition mode. Then leaving it as it was before entering in edition mode when going out of sketch edition mode.
This has bugged mee too and I could try to implement it. I think this is worth a ticket in the issue tracker so I'll add one (if I can't find one already there).
For 2) I would make those constraint datums named and would prefer to just go to the data properties under the Sketch and change the values, without having to enter "Edition Mode" and having the Inventor view rotated just to change the value of a constraint... (to be implemented functionlity)
I remember reading some long topics about effort in controlling properties and datums by spreadsheet controllers (a new module in the old assembly branch?) and some expressions.
I also plan to have a deeper look into ViewProviderSketch anyway to improve the current drawing code if possible. I will undertake both actions simultaneously, and certainly I plan to discuss my findings here (hopefully with you as you have a deeper knowledge on the subject).

Nevertheless, I would like to separate that additional work from this Element Widget. In the sense that what I would like to have is the Element Widget committed with the current drawing implementation in ViewProviderSketch and then initiate that additional work. Let me know if you are against this plan.
ian.rees had some ideas about improving ViewProviderSketch too. It might be a good idea to discuss these in a separate topic to avoid duplicate work and design them properly. I haven't had the time to study Coin or the ViewProvider stuff yet, so I can't help much on this.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Element widget for Sketcher WB

Postby ian.rees » Fri Jul 18, 2014 2:21 am

However, I understand that such a solution, where the sketch stops being encapsulated is disruptive and should be discussed separately. Not that I do not like disruptive solutions that provide a benefit, but I still fancy encapsulation better...
OK, I'll finish up the changes I'm currently working on (see Disable automatic constraints & snap to grid in Sketcher), then will have a look at this. FWIW, I don't think that FreeCAD currently "encapsulates" the Sketcher. For instance, I can highlight a single element in the sketch from the main FreeCAD, and I can modify objects outside of Sketcher while editing a sketch.
However, to solve this, I would propose to a button/keyboard shortcut/option in the menu that would simply do that, toggle the visibility of everything but the sketch while remembering how it was before entering in edition mode. Then leaving it as it was before entering in edition mode when going out of sketch edition mode.
This is now being discussed in another thread started by sponssi here.