Part-o-magic (again)

Need help, or want to share a macro? Post here!
DeepSOIC
Posts: 4689
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic (again)

Postby DeepSOIC » Sat Mar 11, 2017 7:30 pm

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.
DeepSOIC
Posts: 4689
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic (again)

Postby DeepSOIC » Sun Mar 12, 2017 11:54 pm

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: 200
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Part-o-magic (again)

Postby nemesis » Mon Mar 13, 2017 12:07 pm

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

Re: Part-o-magic (again)

Postby DeepSOIC » Tue Mar 14, 2017 11:49 pm

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 299 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
Posts: 1869
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Wed Mar 15, 2017 12:43 am

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.
DeepSOIC
Posts: 4689
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

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

Postby DeepSOIC » Wed Mar 15, 2017 12:51 am

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: 200
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Part-o-magic (again)

Postby nemesis » Wed Mar 15, 2017 11:47 am

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.
DeepSOIC
Posts: 4689
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

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

Postby DeepSOIC » Wed Mar 15, 2017 11:48 pm

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
Site Admin
Posts: 8672
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

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

Postby yorik » Fri Mar 17, 2017 5:12 pm

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

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

Postby DeepSOIC » Fri Mar 17, 2017 6:08 pm

Thanks!