Draft Edit improvements

A forum dedicated to the Draft, Arch and BIM workbenches development.
paullee
Posts: 1826
Joined: Wed May 04, 2016 3:58 pm

Re: Draft Edit improvements

Postby paullee » Sun Apr 14, 2019 9:11 am

marzof wrote:
Sat Apr 13, 2019 7:39 pm
ately this option doesn't handle the copy of the objects (but just their bases) so I think that maybe my work can be useful.

I post here two animation where you can see how it works. If you want to test it you can get it from https://github.com/marzof/FreeCAD_Macros

Marco
Hi, thanks and looks great!

I download the bimEdit.FCMacro, but haven't figured out from the the animation what keystroke / mouse actions that exactly needs to do what you demonstrate :oops:

Can you give more details, thanks!

p.s.
Does it need the other 3 Marcro in your github?
marzof
Posts: 17
Joined: Sun Apr 23, 2017 5:22 pm

Re: Draft Edit improvements

Postby marzof » Sun Apr 14, 2019 9:40 am

Hi,

sorry for not having detailed how it works! :oops: (I wrote it down in the header of the script and I forgot to mention it in the forum post).

You can select the elements before or after launching the command.
Then you can:
  • cycle between selection types pressing Ctrl + Space
  • Press q to stop the selection cycle and quit the command
  • when selection is ok you can launch the transformation pressing:
    • g -> to move
    • r -> to rotate
    • (scale, mirror and stretch will be come)
The other 3 macro are just some test I've done before, so you don't need them.
carlopav
Posts: 352
Joined: Mon Dec 31, 2018 1:49 pm

Re: Draft Edit improvements

Postby carlopav » Sun Apr 14, 2019 1:07 pm

Hi Marco, thx for sharing your work!
Good job, i find this really intuitive: when I copy a wall my main purpose is to obtain a new wall, not a wall linked to the same base object of the old one. (same with mirror modifier)
I was thinking... Since ATM we have a copy tool in bim WB that is actually a move tool with copy option toggled, why dont we update that tool with your work? We could integrate it in the draft WB: the new copy tool will differs from the "move tool with the copy option toggled" because it create a fully indipendent copy also of nested objects. What do u think?
marzof
Posts: 17
Joined: Sun Apr 23, 2017 5:22 pm

Re: Draft Edit improvements

Postby marzof » Sun Apr 14, 2019 1:52 pm

Thanks carlopav.

I think that updating the current Draft Copy tool with this one could be a good idea.
In that case, if the main developers agree, I'd like to have some opinion and suggestion to lead the development towards the right direction.
For instance:
  • What's the scope of the tools? just Arch objects or every type of entities?
  • Should it be a "copy only" tools? In that case we'll lose, for instance, the ability to move automatically all the additions of selected elements
I'm sure other doubts will raise and I'll be glad to discuss them here to improve this tool.
User avatar
yorik
Site Admin
Posts: 11574
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Draft Edit improvements

Postby yorik » Sun Apr 14, 2019 3:51 pm

Very cool work @marzof !

This is an interesting discussion, because there is no such thing as simply "copy" in FreeCAD. There is a series of questions that come together: Do we copy only the shape? Do we clone? Do we copy the baseline too? And what if the baseline is not just a baseline but a complex series of boolean operations, etc.

I pretty much like the "transform" approach here, that with one selection you can perform several tasks like rotate, etc.. But I also still think some people will prefer a simple, direct move tool separated from rotate, etc. But since we are open-source here, and we can do whatever we want, why not have both? ;) So I would suggest you make your tool a kind of general "transform" tool, like a swiss knife, and not a replacement of the simple move, rotate tools. I guess users from other workbenches would also be very glad with such a tool.
marzof
Posts: 17
Joined: Sun Apr 23, 2017 5:22 pm

Re: Draft Edit improvements

Postby marzof » Sun Apr 14, 2019 5:27 pm

Thank you @yorik,

I perfectly agree! It's a very complex subject and not just for copying but also for basic transformations on parametric entities: for instance, I was reflecting on how to treat rotations around a non-Z axis for walls (if their normal have to change or not) or how to handle scaling of walls (if their width and height have to scale too)...

I'll continue working on it: numeric input has to be implement yet. Then I want to add scaling and mirroring.

For every question, suggestion or idea you can write here or open an issue on my repository on github.
paullee
Posts: 1826
Joined: Wed May 04, 2016 3:58 pm

Re: Draft Edit improvements

Postby paullee » Sun Apr 14, 2019 6:06 pm

Thanks for explanation! Can use it now :)
carlopav
Posts: 352
Joined: Mon Dec 31, 2018 1:49 pm

Re: Draft Edit improvements

Postby carlopav » Sun Apr 28, 2019 1:02 pm

yorik wrote:
Sun Apr 07, 2019 8:28 pm
It seems to work okay so far...
Hello! I did some small improvements with https://github.com/FreeCAD/FreeCAD/pull/2108.
The tool is expected to works like this on user click:
- check with getObjectsInfo if an object is clicked (this miss the case of a node in the free space, like the arc center or bezier handles)
-> if a vertex is clicked checks if the distance between vertex and node is < 0.01 mm
-> if an edge or a face is clicked, find the nearest edit node, then check if distance between clicked point and node is <= 20 mm to avoid clicking on very distant objects (this should be improved)
- if no object is clicked -> check with getObjectInfo if a node that is non coincident with an object was clicked
User avatar
yorik
Site Admin
Posts: 11574
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Draft Edit improvements

Postby yorik » Mon Apr 29, 2019 3:19 pm

Looks perfect, thanks! Waiting for the CI builds to finish and I merge it.
carlopav
Posts: 352
Joined: Mon Dec 31, 2018 1:49 pm

Re: Draft Edit improvements

Postby carlopav » Wed May 01, 2019 7:17 am

yorik wrote:
Mon Apr 29, 2019 3:19 pm
Looks perfect, thanks! Waiting for the CI builds to finish and I merge it.
thx for merging, i'm going to keep working a bit on parametric arch objects editing!