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!
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Draft Edit improvements

Post by paullee »

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

Post by marzof »

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
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft Edit improvements

Post by carlopav »

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?
follow my experiments on BIM modelling for architecture design
marzof
Posts: 17
Joined: Sun Apr 23, 2017 5:22 pm

Re: Draft Edit improvements

Post by marzof »

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
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft Edit improvements

Post by yorik »

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

Post by marzof »

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
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Draft Edit improvements

Post by paullee »

Thanks for explanation! Can use it now :)
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft Edit improvements

Post by carlopav »

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
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 »

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

Re: Draft Edit improvements

Post by carlopav »

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!
follow my experiments on BIM modelling for architecture design
Post Reply