Part-o-magic: Active Part/Body reinvented

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
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: Active Part/Body reinvented

Post by DeepSOIC »

I have had a massive bugfix attack on Part-o-magic during this weekend. I hope it has become much better.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Part-o-magic: Active Part/Body reinvented

Post by ickby »

Hello,

I finished the proof of concept regarding the possibility to make every object a group/container. It does not have the Part/Body spliiting but is the general framework only, but it is a start to see if it will make it into freecad. Could you have a look if you can port your split in the proposed Extension structure?
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: Active Part/Body reinvented

Post by DeepSOIC »

ickby wrote: Could you have a look if you can port your split in the proposed Extension structure?
Here? https://github.com/ickby/FreeCAD_sf_mas ... Extensions
I definitely will take a look :D :D but a little bit later. Too much plans for the weekend.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Part-o-magic: Active Part/Body reinvented

Post by ickby »

ah yes forgot the link... this is the correct branch, see also viewtopic.php?f=10&t=16021 for a explanation.

a half day coding in a train makes one really fuzzy...
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Part-o-magic: Active Part/Body reinvented

Post by arcol »

DeepSOIC:
I wanted to try your promising Part-o-matic workbench, I have freecad v0.17.7989, 20160715 (ubuntu 16.04 ppa).
I made a Mod directory in ~/.FreeCAD/Mod, then cloned your project:
git clone https://github.com/DeepSOIC/Part-o-magic,
so I have a
~/.FreeCAD/Mod/Part-o-magic directory.
I started FreeCAD, and there are .pyc files created, so freecad definietly finds the part-o-magic files and even compiles them.

I have no workbench named "Part-o-magic".

I have opened the python console (View->Panels->Python console), and manually tried the same as in the InitGui.py:

Code: Select all

>>> import FreeCAD as App
>>> rev_number = int(App.Version()[2].replace("(Git)",""))
>>> rev_numberimport pomObserverimport pomObserver
7989
>>> import pomObserver
>>> pomObserver.start()
>>> from PySide import QtCore
So it seems there are no errors. But still, I do not have Part-o-magic workbench.

Could you please guide me a bit how to try your project out?
Also adding a Readme.md into your git repository with a short tutorial would be awesome.

Thank you for your attention.
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: Active Part/Body reinvented

Post by DeepSOIC »

arcol wrote:I have no workbench named "Part-o-magic".
There shouldn't be.

Just create a new document. You should get this dumped to Report View (make sure you have Py output redirected to it - right click -> Options , ensure everything checkable is checked):
"container changed from None to Unnamed"
If you get this, Part-o-magic is running. Open demo project, and activate/deactivate some containers, and you should see chages in 3d view as stuff is hidden and shown.

As of now, there is no way to enable or disable Part-o-magic via Gui.
prof7bit
Posts: 8
Joined: Tue Jul 04, 2017 4:00 pm

Re: Part-o-magic: Active Part/Body reinvented

Post by prof7bit »

DeepSOIC wrote: Sun May 22, 2016 2:35 pm * It's merely a GUI tool. It can be thrown away at any moment without any impact on projects created with it.
After uninstalling a lot of things are invisible and cannot be made visible again :-(
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: Active Part/Body reinvented

Post by DeepSOIC »

prof7bit wrote: Thu Jul 27, 2017 5:36 pm After uninstalling a lot of things are invisible and cannot be made visible again :-(
see here: https://forum.freecadweb.org/viewtopic.php?f=22&t=20698
DeepSOIC wrote: Thu Feb 16, 2017 12:33 am Uninstall:
You can disable part-o-magic with buttons on the workbench. If you disable the workbench, all the automation stuff should switch off, but features of part-o-magic can still be recomputed in your projects that have them.

If you completely uninstall the workbench (delete Mod/Part-o-magic folder), part-o-magic features you used in your projects will stop working.

Important. Part-o-magic messes with "DisplayModeBody" properties of PartDesign Body objects, and "Selectable" properties of all objects. If you uninstall Part-o-magic, or disable its automation stuff, it will cause somewhat unusual behavior of any projects that were saved with part-o-magic enabled and had any container objects present. You can reset them manually with property editor, or run this simple snippet in Py console:

Code: Select all

for obj in App.ActiveDocument.Objects:
    if hasattr(obj.ViewObject, "DisplayModeBody"):
        obj.ViewObject.DisplayModeBody = "Through"
    if hasattr(obj.ViewObject, "Selectable"):
        obj.ViewObject.Selectable = True
User avatar
industromatic
Posts: 150
Joined: Thu Mar 27, 2014 4:30 pm
Location: Austin Texas
Contact:

Re: Part-o-magic: Active Part/Body reinvented

Post by industromatic »

To use part-o-magic with v0.17, I should use the part tutorials, or is there more newest version description I should go by?

I'm making part shapes for injection molding with draft angles on everything, and many things referencing a datum plane and edges of a sweep is the goal.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic: Active Part/Body reinvented

Post by freecad-heini-1 »

Part-o-magic, sounds very intersting.

What about top-down design with a skeleton model?

For users who don't know what top-design technique mean, please let me explain.
Imagine your task is to design a device with a bottom, mid- and top plate. With bearing, o-ring, shaft, cooling features and so on.

The base is a skeleton model. There are datum-planes, datum-axis and datum-points with important dimensions integrated.
The skeleton is on top of the assembly. It make sense to design as well a block and cylindar or other shapes to use it's faces and edges for external referencing.

All other parts are below the skeleton model. If you create a new body, you can select a datum-plane oder datum-axis from the skeleton-model, and copy it top down to the new part. This workflow avoid circular referencing and you have a easy to contol skeleton model for all important dimensions.
Please who can explain me how to use the top-down-design technique with Freecad 0.17?
What about the part-o-magic workbench for this workflow?

Sorry, my English is so lala.

Thank you and best regards
Wilfried
Post Reply