PR #3748 allow multiselection on creation of pattern

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

PR #3748 allow multiselection on creation of pattern

Post by uwestoehr »

While designing with FC last week it annoyed me that to get patterns of more than one feature, I am forced to create a pattern using only one feature. Then in a second step I had to add the other features to the pattern.

Today I had a look and enabled that one can select several features on creation of a pattern. So with this PR this is now possible:
screencast
screencast
bAnyIiXG50.gif (314.29 KiB) Viewed 10496 times

I tested the feature thoroughly (using several bodies, combination of features etc.) and I think it is stable.
Last edited by uwestoehr on Mon Jul 27, 2020 9:45 am, edited 1 time in total.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3748 allow multiselection on creation of pattern

Post by chrisb »

Very helpful! Thanks.

In rare cases a reordering is necessary. Would it be possible to include? If not as workaround the old mechanism can be used, of course.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #3748 allow multiselection on creation of pattern

Post by uwestoehr »

chrisb wrote: Mon Jul 27, 2020 3:38 am In rare cases a reordering is necessary. Would it be possible to include?
What do you mean? If you have e.g. 2 features within a pattern, you can reorder them and the patterns keeps stable.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3748 allow multiselection on creation of pattern

Post by chrisb »

uwestoehr wrote: Mon Jul 27, 2020 10:02 am What do you mean? If you have e.g. 2 features within a pattern, you can reorder them and the patterns keeps stable.
The stability of the pattern is completely out of the range of my thought. I was rather thinking about buttons "Move up", "Move down" which would move a selected feature up or down the list.
The order of the features can be significant.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #3748 allow multiselection on creation of pattern

Post by uwestoehr »

chrisb wrote: Mon Jul 27, 2020 9:46 pm The stability of the pattern is completely out of the range of my thought....
The order of the features can be significant.
Do you think so or you have tested this? A testcase would be nice to have. You can create one since my patch does not introduce the multifeature patterning, it just updates the UI that you can do it directly without the need of creating the pattern first then adding more features to it.

I tested the feature order and cannot see any difference on how the features in the pattern are ordered. To break the pattern, you could at first create a pattern and then move one if its features behind the pattern. Then you will get of course an error.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3748 allow multiselection on creation of pattern

Post by chrisb »

I'm afraid I haven't made myself clear. A testcase should help, but it may have to wait until tonight.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3748 allow multiselection on creation of pattern

Post by chrisb »

Here is the example (didn't have access to FreeCAD sooner). I have a Cube, a padded circle and a rectangular pocket:
Snip macro screenshot-a53ec2.png
Snip macro screenshot-a53ec2.png (1.91 KiB) Viewed 10294 times
Making a polar pattern with Pad before Pocket:
Snip macro screenshot-c772bc.png
Snip macro screenshot-c772bc.png (2.85 KiB) Viewed 10292 times
And here with Pocket before Pad:
Snip macro screenshot-6f57fc.png
Snip macro screenshot-6f57fc.png (3.02 KiB) Viewed 10294 times
The version with Pad before Pocket is attached.
Attachments
pad_before_pocket.FCStd
(22.08 KiB) Downloaded 163 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: PR #3748 allow multiselection on creation of pattern

Post by wmayer »

uwestoehr wrote: Mon Jul 27, 2020 10:02 am While designing with FC last week it annoyed me that to get patterns of more than one feature, I am forced to create a pattern using only one feature.
Part of your PR is this commit: https://github.com/FreeCAD/FreeCAD/pull ... 68f133d0ea
What's the point about it? The commit message is "Merge branch 'master' of github.com:FreeCAD/FreeCAD into PD-patterning". Apparently it's not something you developed but the code is not part of master either. So, where does it come from?
And according to your description the problem is/was a pure GUI thing so I wouldn't expect any changes on feature level.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: PR #3748 allow multiselection on creation of pattern

Post by vocx »

wmayer wrote: Thu Jul 30, 2020 8:17 am ...
What's the point about it? The commit message is "Merge branch 'master' of github.com:FreeCAD/FreeCAD into PD-patterning"....
I think such messages appear when the developer has internal branches that he merges before opening the pull request. Git merge always seems to create a commit like this, even if it just says "merging this branch to another".
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: PR #3748 allow multiselection on creation of pattern

Post by wmayer »

chrisb wrote: Tue Jul 28, 2020 6:33 am I'm afraid I haven't made myself clear. A testcase should help, but it may have to wait until tonight.
With git commit 94ca4388e you can move the items directly with the mouse.
Post Reply