Draft Edit improvements
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Draft Edit improvements
Sorry for being late to the party, there are currently too many posts to follow every single topic.
I just realized that the "AddPoint" and "RemovePoint" buttons which were present in 0.18 have vanished from the Edit dialog. I will not discuss if it was sensible to remove them, but it would be great if the handling was consistent with with other common usage, especially in FreeCAD. A very common way to delete something is to use the dedicated "Del" key. That's the way how it is done in Sketcher, in the tree, and probably in other places too. This is so standard even beyond FreeCAD, that it often doesn't have to be mentioned at all.
Than we have the possibility of selecting one or more things and use a "Remove/Delete" button, that's how it is done e.g. in Path workbench.
Here we have another way of removing something, which is very well hidden compared to the other deletion methods. To improve consistency e.g. with the Sketcher - and editing sketches could be seen as a counterpart to editing wires - it would be great if the delete key would be enabled to remove vertices.
I couldn't find out yet how to add a vertex or line segment, so I cannot well comment on this function - except that this fact is a sort of comment by itself.
I just realized that the "AddPoint" and "RemovePoint" buttons which were present in 0.18 have vanished from the Edit dialog. I will not discuss if it was sensible to remove them, but it would be great if the handling was consistent with with other common usage, especially in FreeCAD. A very common way to delete something is to use the dedicated "Del" key. That's the way how it is done in Sketcher, in the tree, and probably in other places too. This is so standard even beyond FreeCAD, that it often doesn't have to be mentioned at all.
Than we have the possibility of selecting one or more things and use a "Remove/Delete" button, that's how it is done e.g. in Path workbench.
Here we have another way of removing something, which is very well hidden compared to the other deletion methods. To improve consistency e.g. with the Sketcher - and editing sketches could be seen as a counterpart to editing wires - it would be great if the delete key would be enabled to remove vertices.
I couldn't find out yet how to add a vertex or line segment, so I cannot well comment on this function - except that this fact is a sort of comment by itself.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Draft Edit improvements
Here an explanation about this... https://forum.freecadweb.org/viewtopic.php?f=23&t=44335
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Re: Draft Edit improvements
Hi chrisb, you are not late: I agree that the current behaviour is not so satisfying, also if I find it way better than the previous.
The usage is explained in the command tooltip (DelPoint and AddPoint were removed because multiobject editing was introduced, and there are object where those subcommands are not suitable).
The Del key it's a good suggestion. What is different from sketcher is the selection method. In Draft_Edit you do not select vertexes at the moment, because when you click on them you activate the editing on the clicked tracker. Perhaps we can use the highlighting to delete the highlighted vertex when pressing Del key. Would that be enough? (I have to check I'm able to capture the Del key exclusively with Draft_Edit, because it would be annoying if it also delete the selected object).
What I'm still missing is how to add the Tracker options to the context menu... I'm a real noob and I'm really not able to do that also If i kept trying for a whole year long... (this I think would make clear the interaction options to the user)
follow my experiments on BIM modelling for architecture design
Re: Draft Edit improvements
Here is a little attempt... It works, and it's really intuitive BUT : if an object is selected, FreeCAD catch the DEL key pressed and delete it... I have to check how the sketcher handle this... Any hints?
follow my experiments on BIM modelling for architecture design
Re: Draft Edit improvements
I cannot really see what happens when a point becomes red, did you click it? That would be ok, only hovering is rather uncommon.
I see the difficulty to distinguish where the del key should go: The wire, the vertex or if you are in an input field, the typed text.
I wouldn't care if it is in edit mode. If you hit the del key I would delete the vertex.
I see the difficulty to distinguish where the del key should go: The wire, the vertex or if you are in an input field, the typed text.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Draft Edit improvements
It's just hovering.
In Draft_Edit, this is the default editing behaviour:
- Start Editing with a selected object or select one object after launching the command;
- Edit Trackers appears on editable points;
- When you hover a Tracker, it becomes red (its kind of preselection);
- when you click a point you start editing;
- next click will be the destination point of the Tracker displacement.
So, selecting a Tracker and deleting it, it's just not possible at the moment. Even if I would be able to capture exclusively the del key pressed event.
If you are not in Edit Mode the Draft_Edit command is just not active, and none can be done to delete a vertex...
Perhaps I should consider refactoring the whole command again to better integrate looo pivy graphics...
Last edited by carlopav on Sat May 23, 2020 4:21 pm, edited 1 time in total.
follow my experiments on BIM modelling for architecture design
Re: Draft Edit improvements
Before you make radical changes, what about :
Code: Select all
if key == 65535 and Draft.getType(self.obj) == None: # "Delete but only if something is not selected"
Edit: I've attached my modified gui_edit.py file located in src\Mod\Draft\draftguitools if anyone wants to try it, using the convention Insert key for Add and Delete key for Delete/Remove. Just make sure to test for regressions in other areas that Draft>Edit works, I'm sure it won't take too much work to meet most people's expectations.
- Attachments
-
- gui_edit.py
- (76.48 KiB) Downloaded 39 times
Re: Draft Edit improvements
The idea is good, but it will not work. Imagine the usecase where an user have one object selected, he hover the Tracker and press DEL: the object will be deleted (cause we do not have the exclusive ownership of the keyboard events), and the Tacker will not be deleted...Syres wrote: ↑Sat May 23, 2020 4:08 pmCode: Select all
if key == 65535 and Draft.getType(self.obj) == None: # "Delete but only if something is not selected"
With the refactor of this summer I substituted almost all the interaction code with looo graphics module, but I had to adapt it to work with Snapper. It worked, but I also discarded many other useful features, like the setup of an interaction separator... I guess this is the main problem when editing, because FreeCAD itself does not know that we are in this edit-mode. So I will try this way first or later...
follow my experiments on BIM modelling for architecture design