Draft Edit improvements

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft Edit improvements

Post by carlopav »

Thinking improving the tool with the experiments i did with multi object editing... what about this behaviour?
  • activating Draft Edit from the toolbar;
  • taskpanel shows "Draft Edit mode activated" and the "finish/close" option. Maybe some info on the available keyboard shortcuts;
  • a selection observer is set up, so every selected object is processed and edit trackers are displayed over it (the edit tracker should be improved to remember which object it belong);
  • user can select multiple trackers (maybe with SHIFT+CLICK), and the tool should auto-set editing for every coincident node;
  • the user click the tracker he wants to edit and editing is activated
  • the tool remains active until the user press ESC or click close on the taskpanel, so the selection observer is removed
  • options for every tracker (to edit parameters, change the editing mode, change bezier curve knot continuity) could be displayed with right click on the tracker
follow my experiments on BIM modelling for architecture design
User avatar
benjaminwharton
Posts: 46
Joined: Mon Feb 25, 2019 1:03 am

Re: Draft Edit improvements

Post by benjaminwharton »

Regarding editing a wire with draft edit, is there any way to snap to another point in the wire? So that for example I can constrain one axis and snap one point to another horizontally or vertically.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft Edit improvements

Post by carlopav »

benjaminwharton wrote: Sun May 05, 2019 9:57 pm is there any way to snap to another point in the wire?
Short answer: no.
Long answer: the tool toggle object selectability off (I guess to prevent selecting and deselecting it when editing points) so ATM it's impossible to snap on the object itself. I experimented in letting it selectable but I had to check and restore the selected state every mouse click, and due to a small lag in the prpcess this didn't look so nice.
follow my experiments on BIM modelling for architecture design
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft Edit improvements

Post by yorik »

There are also potential problems with this, if you have a wire that contains two points at the same location, many opencascade operations will fail.
We could workaround this, though, for ex. adding a dummy temporary object, or any other method, but then we also need code to check that there aren't two coincident points next to one another.

Your plan looks good @carlopav! I think the Draft edit tool could definitely become more like the sketcher, with a bit slower workflow, but with additional options.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft Edit improvements

Post by carlopav »

yorik wrote: Wed May 08, 2019 12:25 am if you have a wire that contains two points at the same location, many opencascade operations will fail.
Currently there Draft edit checks if this happens before applying transformation. Anyway i'll keep experimenting a bit with it.
I'm experimenting also with the selection observer, but this is taking a bit longer :)

With PR : https://github.com/FreeCAD/FreeCAD/pull/2188 i tried to refactor a bit the whole tool.
Before, everything was carried on inside two methods:
- proceed: did set editpoints
- update: apply the transformation to the object.

I tried to bring the most i could at the end of the class, dividing into "groups" what is supposed to work on the same object type.

In the meantime i discovered some bugs on dimensions that i'll try to correct as soon as i have some more time.

Also I tried to divide methods as much as i can, because i want to add the preview to Draft edit, so point list calculation should be separated from object updating. This will also help with multiple object editing.
At the moment just the bezier curve editing works with the preview, but who ever know what the future will bring. =)

@moult I tried subelement modifiers and it work great, i wonder how to integrate Draft Edit in your "D, E" command that works like a charm :)
follow my experiments on BIM modelling for architecture design
User avatar
Moult
Posts: 321
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: Draft Edit improvements

Post by Moult »

Looking forward to seeing the results of your work carlopav, have you got a short video summary showing some of the features?

As for modify subelements, actually it works completely independently of enabling the "Draft edit" (D, E) feature. However, enabling the D,E feature can make it easier to see and select the wires.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft Edit improvements

Post by carlopav »

Moult wrote: Sun May 19, 2019 9:22 pm Looking forward to seeing the results of your work carlopav, have you got a short video summary showing some of the features?
Me too... I did throw away most of my experiments on a new node editing tool and started again modifying the old one. It a big monster and I'm trying to split it in pieces so maybe they could be used by other tools too. I hope I'm not getting stucked again and to be able to show you something!
follow my experiments on BIM modelling for architecture design
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft Edit improvements

Post by carlopav »

Moult wrote: ping
Hi Moult, I had a bit of time to work again on the old draft Edit. Here is the PR:
https://github.com/FreeCAD/FreeCAD/pull/2430
In brief i used pivy graphics to improve node selection. More have to be done, but I hope this will solve many issues we had.
I also almost completed a general reordering of the code, so now it's a lot easier to extend the tool to new objects, also from other workbenches. Here is an example with part box:
yiNH494fcM.gif
yiNH494fcM.gif (908.32 KiB) Viewed 1534 times
Also with the general reordering @Vox will do on the draft code, many functions of the draft edit could go in each object module (this could be the case of the code that handle bezier curve editing, and the code that handle editing arcs). Do you think that Subobject editing via DraftEditImproved could benefit from it? I'm thinking expecially on arc, bezcurve, rectangle, dimensions?
Maybe when we activate the command "DraftEditImproved" we can also place some editpoints on the objects and remove them with ESC?
follow my experiments on BIM modelling for architecture design
ABeton
Posts: 150
Joined: Tue Sep 03, 2019 6:39 pm

Re: Draft Edit improvements

Post by ABeton »

Great work on Draft Edit :D What other ideas did you have in mind for it if any? :)
User avatar
Moult
Posts: 321
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: Draft Edit improvements

Post by Moult »

Your work looks absolutely great carlopav! I love it!
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
Post Reply