-
Notifications
You must be signed in to change notification settings - Fork 4
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
Automatically make physical groups from existing tags #2
Comments
Added to the next release TODO |
@nicola-sorace Changes are here: Let me know if this works for you |
@afshawnlotfi Looks good. In the case of overlapping tags it seems that the more recently defined ones win, which works pretty well. Could still add the "skip tags that start with underscores", but it doesn't seem as necessary now since I can just reorder them. |
This skips tags that start with underscores: def _transfer_tags_to_physical_groups(self, skip_underscored=True):
for tag, workplane in self._pre_split_workplane.ctx.tags.items():
if skip_underscored and tag[0] == '_':
continue
self._add_physical_groups_for_objects(workplane.vals(), tag) |
Yeah might just make the function publicly accessible and you can pass the underscore option in through the func params, instead of having a top-level option on |
It is common to create gmsh physical groups from existing cadquery tags:
It would often make sense for all tags to be transferred automatically. In cases where this is not desirable it could be enabled/disabled via a flag. Could also ignore tags that start with
_
.The text was updated successfully, but these errors were encountered: