Part-o-magic [New: Selection tools, container duplication]

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Locked
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again)

Post by DeepSOIC »

nemesis wrote:I also notice that if PoM is here, if you activate a body, the others are hided. Again, without any feature from PoM
This is by design. The idea is to bring you into the context of editing the body, and discourage accidental cross-body linkage.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again)

Post by DeepSOIC »

nemesis wrote:I'm unable to make a boolean between bodies if Pom Is installed.
OK, I fixed it.
* I removed part of the code that was messing with "selectable" property. I adds too much pain for little (if any) benefit. The remaining part of the code is still there to make sure the "damage" from the removed code is undone.
* I added a special handling for when PartDesign Boolean is being edited. It now automatically shows all bodies that can be used for the Boolean operation 8-)
* Part-o-magic now will stop you from editing something in a container that is not active. If you try to, it cancels it, and activates the container instead. If you try again, the feature will open for editing (since the proper container is now active). Unfortunately, I failed to make feature open on first double-click, just activating the necessary container in background, because of a clash between visibility automations of sketcher and part-o-magic.
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Part-o-magic (again)

Post by nemesis »

[quote="DeepSOIC]OK, I fixed it.[/quote]
Cool! :)
I will test it ASAP.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again)

Post by DeepSOIC »

New feature!
* Tree automation
When you enter a container, tree is automatically expanded to show only the stuff in active container. Everything around it is automatically collapsed.

For example. You are in shapegroup deep inside, and you change active container to body. shapegroup is automatically collapsed, and part001 is too, so that the tree view shows the piece you work on in isolation.
tree-automation.png
tree-automation.png (82.77 KiB) Viewed 1916 times
As of now, it is probably overly aggressive. I may change its behavior later, and I'd like to hear opinions on what you think needs to be collapsed automatically and what doesn't.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Part-o-magic (again) [new feature: tree automation]

Post by chrisb »

What happens if I reopen another group again, e.g. Part001. Does it open in the state as before or will I have to reopen all the sub elements again?
If it's the first - just perfect; if it's the latter - I have to test, but I think it is convenient anyway.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again) [new feature: tree automation]

Post by DeepSOIC »

chrisb wrote:What happens if I reopen another group again, e.g. Part001. Does it open in the state as before or will I have to reopen all the sub elements again?
It depends. In the example shown, ShapeGroup was active. And when it is deactivated, it is collapsed. So when you activate Part001, ShapeGroup will be collapsed.

If ShapeGroup was expanded, but active container was Part001, then, after you activate Body, then Part001 again, ShapeGroup will be in expanded state.
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Part-o-magic (again)

Post by nemesis »

DeepSOIC wrote:New feature!
As of now, it is probably overly aggressive. I may change its behavior later, and I'd like to hear opinions on what you think needs to be collapsed automatically and what doesn't.
From my point of view it depends on the situation.
with large model it's can be interesting, but also can be very intrusive.
the perfect solution would be to have the possibility to activate or not this possibility. Also the automatic hide when entering a module can be very disturbing.
This kinf of behaviour is very user-preference-depending.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again) [new feature: Exporter]

Post by DeepSOIC »

HoWil wrote:Could you please provide your wb for/in the "Addon manager" (https://forum.freecadweb.org/viewtopic.php?f=34&t=20091).
Would make it much easier to install/use it.
Wrote a readme (mostly copied the first post of this thread), and added an issue to addon repo: https://github.com/FreeCAD/FreeCAD-addons/issues/24
Now I hope yorik notices it, and finds time to do it :mrgreen:
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Part-o-magic (again) [@yorik: please add me to add-ons]

Post by yorik »

Done! Sorry, github doesn't always notify me, and I forget to look at the addons repo. Good that you mentioned it here :)
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic (again) [@yorik: please add me to add-ons]

Post by DeepSOIC »

Thanks!
Locked