Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.20] Draft: allow items to be skipped in draft array #4430

Closed

Conversation

davidosterberg
Copy link
Contributor

@davidosterberg davidosterberg commented Feb 11, 2021

Implemented for Array, Polar array, and Circular array.

Motivation for feature:
Often when you make pattern (e.g a bolt pattern), there will by one or two items that should be skipped for some reason.

Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=23&t=55459

If you consider this interesting, I will add support for the other Array types.
At a later stage this can also be exposed in the GUI

skip_otho
draft_array_skip

Advanced indexing:
Skip expressions are expanded in a python/matlab like way

    Example 1: skip_expression = 1:5
        Will be expanded to [1, 2, 3, 4]

    Example 2: skip_expression = [2:5, 9]
        Will be expanded to [2, 3, 4, 9]

    Example 3: skip_expression = [1, 3:7:2, 9]
        Will be expanded to [1, 3, 5, 9]

advanced_indexing

@davidosterberg davidosterberg changed the title [0.20] Draft: allow items to be skipped in polar array [0.20] Draft: allow items to be skipped in draft array Feb 12, 2021
@davidosterberg davidosterberg force-pushed the draft-array-skip branch 4 times, most recently from 24f6414 to c99905e Compare February 13, 2021 11:52
For now this is only implemented in the property view. At a later stage
this can also be exposed in the GUI.
syntax aligned with Part_CompoundFilter syntax. With the extension that
index patterns can be intermixed with manual enumeration in a matlab style:
	[1, 3:6:2] -> [1. 3, 5]

Negative indexes are not supported currently
@davidosterberg
Copy link
Contributor Author

davidosterberg commented Feb 26, 2021

There is already a way (perhaps not so discoverable) to skip items in draft array. Simply expand the array, the hide the item you don't want. Then the array can be un-expanded. Therefore I close this PR.

wwmayer added a commit that referenced this pull request Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants