Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
Hey guys,
Ease of life feature today :
What do you think?
I'll make a PR soon.
Cheers
Ease of life feature today :
What do you think?
I'll make a PR soon.
Cheers
Support me on Patreon: https://www.patreon.com/FreeCadDevDiary
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
Looks good.
Will it be able to paste outside sketcher edit mode? Like create a XY mapped sketch under current active Body/Part, add geometry directly to current selected sketch, ...?
Will it be able to paste outside sketcher edit mode? Like create a XY mapped sketch under current active Body/Part, add geometry directly to current selected sketch, ...?
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
Currently it can't. It's working only in edit mode.
I don't understand well the model tree copy paste. I started to write about it and ended up making another topic :
https://forum.freecadweb.org/viewtopic.php?f=10&t=65899
Support me on Patreon: https://www.patreon.com/FreeCadDevDiary
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
I am not quite clear, please, on the behaviour of dimensional constraints between the feature on the sketch and LCS (either axis or point)
When copied these dimensions - do they reattach themselves to LCS when pasted, as they were in original copied sketch?
When copied these dimensions - do they reattach themselves to LCS when pasted, as they were in original copied sketch?
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
Yes they do. Sorry I didn't showed that in the video.
Support me on Patreon: https://www.patreon.com/FreeCadDevDiary
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
no problem
I thought I better ask here rather than on Youtube?
so I guess if you want to copy and re-use elsewhere (i.e. not tied to origin LCS), you better make sure to exclude this dims from your copy selection?
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
What is the branch name for now?
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
Yes forum is probably the best place to discuss things. Though you can still drop the same comment on youtube, it helps thee channel grow (though does that really matter is a good question).
For the constraints to LCS it can be modified easily. I actually hesitate between both behaviours.
Indeed if it's to re-use in the same sketch it will obviously be to be used at another place, so the constraints to LCS doesn't make much sens. Unless you want to position it with them.
Hmm one way would be to offer the user the choice. But how is the question.
1 - Ctrl-V for paste without constraints to LCS, CTRL-ALT-V for paste with. But it my opinion complex shortcuts like that end up being known/used by very few people.
2 - Preference setting : It would be a pain to change between one and another.
3 - Make a SketchHandler instead of just a function called by ViewProviderSketch keypressed function. This way ctrl-V could call a more complex tool. The behaviour of the tool could be as follow :
- Paste geometries at mouse cursor.
- On mousemove make the geometries follow the cursor. (by group dragging)
- Left click 'drop' the geometries and close tool.
- right click cancels.
- Pressing SHIFT would alternate between following mouse cursor and keeping constraints to LCS (so original position)
I feel like option 3 is the best. But that requires group dragging to work, which is currently pending review/debugging.
Last edited by paddle on Wed Feb 02, 2022 12:30 pm, edited 1 time in total.
Support me on Patreon: https://www.patreon.com/FreeCadDevDiary
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
Cleaned up and now based on master:
branch :
https://github.com/PaddleStroke/FreeCAD ... steCtrlCXV
commit :
https://github.com/PaddleStroke/FreeCAD ... a1261ef014
Last edited by paddle on Wed Feb 02, 2022 4:31 pm, edited 2 times in total.
Support me on Patreon: https://www.patreon.com/FreeCadDevDiary
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
Re: Sketcher : Ctrl-C/X Ctrl-V to copy/paste/export/import
with my (obviously subjective ) commentspaddle wrote: ↑Wed Feb 02, 2022 12:27 pm 1 - Ctrl-V for paste without constraints to LCS, CTRL-ALT-V for paste with. But it my opinion complex shortcuts like that end up being known/used by very few people - not for me (bambuko)
2 - Preference setting : It would be a pain to change between one and another - not for me (bambuko)
3 - Make a SketchHandler instead of just a function called by ViewProviderSketch keypressed function. This way ctrl-V could call a more complex tool. The behaviour of the tool could be as follow :
- Paste geometries at mouse cursor - yes (bambuko)
- On mousemove make the geometries follow the cursor. (by group dragging) - yes (bambuko)
- Left click 'drop' the geometries and close tool - yes (bambuko)
- right click cancels - yes (bambuko)
- Pressing SHIFT would alternate between following mouse cursor and keeping constraints to LCS (so original position) - maybe (bambuko)