Graph to show Part of Model, editable etc. - by Graphviz ?

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
paullee
Posts: 3425
Joined: Wed May 04, 2016 3:58 pm

Graph to show Part of Model, editable etc. - by Graphviz ?

Postby paullee » Tue Mar 16, 2021 6:06 pm

A cross-post of original discussion and was suggested to post here... :)

Graphviz is great. Though using the standard Dependency Graph on an architectural model is not useful at all.

Just imagine if Graphviz can be used, e.g. -
  1. Select portion of the model tree, and created a graph of that part
  2. The 'nodes' can be individually selected and moved into a better composition, coloured, maybe added with an directional arrow
Any idea ? Thanks :D
Screenshot from 2021-03-13 01-30-19.png
Screenshot from 2021-03-13 01-30-19.png (294.85 KiB) Viewed 881 times
Screenshot from 2021-03-13 01-29-35.png
Screenshot from 2021-03-13 01-29-35.png (361.11 KiB) Viewed 881 times
Screenshot from 2021-03-13 01-27-24.png
Screenshot from 2021-03-13 01-27-24.png (355.38 KiB) Viewed 881 times
chrisb
Posts: 34448
Joined: Tue Mar 17, 2015 9:14 am

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby chrisb » Tue Mar 16, 2021 6:59 pm

paullee wrote: Tue Mar 16, 2021 6:06 pm
  1. Select portion of the model tree, and created a graph of that part
  2. The 'nodes' can be individually selected and moved into a better composition, coloured, maybe added with an directional arrow
I have proposed the first point already quite some time ago. I think that could well be doable by giving only limited data to the external program (dot).
The second point would be great too, but that's probably rather not a FreeCAD thing.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Posts: 2082
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby GeneFC » Wed Mar 17, 2021 12:59 am

chrisb wrote: Tue Mar 16, 2021 6:59 pm I have proposed the first point already quite some time ago.
Nearly as effective, perhaps easier to implement, would be the capability to pan the image as well as zoom.

Gene
paullee
Posts: 3425
Joined: Wed May 04, 2016 3:58 pm

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby paullee » Wed Mar 17, 2021 5:08 am

Thanks all :)

So these features needs further implementation and not readily for use at the moment.

Hope it will be on roadmap / to-to-list soon if peoples find useful :D
chrisb
Posts: 34448
Joined: Tue Mar 17, 2015 9:14 am

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby chrisb » Wed Mar 17, 2021 7:43 am

GeneFC wrote: Wed Mar 17, 2021 12:59 am Nearly as effective, perhaps easier to implement, would be the capability to pan the image as well as zoom.
I use Gesture mouse model and can pan and zoom. Pan works only if the image doesn't fit on the screen.

For me it it isn't a replacement for showing only a subset: You cannot arrange the objects and - especially if spreadsheets are involved, there are far too many arrows on the screen to see the connections clearly.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
paullee
Posts: 3425
Joined: Wed May 04, 2016 3:58 pm

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby paullee » Wed Mar 17, 2021 1:34 pm

chrisb wrote: Wed Mar 17, 2021 7:43 am For me it it isn't a replacement for showing only a subset: You cannot arrange the objects and - especially if spreadsheets are involved, there are far too many arrows on the screen to see the connections clearly.
Indeed, the architectural model shown above isn;t complicated in fact, and could have so many lines overlapped and span over a numbers of screens easily :lol:
GeneFC
Posts: 2082
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby GeneFC » Wed Mar 17, 2021 2:33 pm

chrisb wrote: Wed Mar 17, 2021 7:43 am I use Gesture mouse model and can pan and zoom. Pan works only if the image doesn't fit on the screen.
I also use the Gesture model. The pan function of the Dependency Graph only works with scroll bars. Very clunky.

Every other part of FreeCAD allows panning with the mouse.

Gene
chrisb
Posts: 34448
Joined: Tue Mar 17, 2015 9:14 am

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby chrisb » Wed Mar 17, 2021 3:00 pm

I have only a touchpad, where it works with two fingers. That should b the equivalent of holding the middle mouse button.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
paullee
Posts: 3425
Joined: Wed May 04, 2016 3:58 pm

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby paullee » Wed Mar 17, 2021 7:18 pm

BTW, it seems the standard Dependency Graph is not something by python, there is not an API or something similar which can be tweaked and reported in the Python Console?

Code: Select all

Gui.runCommand('Std_DependencyGraph',0)
paullee
Posts: 3425
Joined: Wed May 04, 2016 3:58 pm

Re: Graph to show Part of Model, editable etc. - by Graphviz ?

Postby paullee » Fri Mar 19, 2021 10:35 pm

If not GraphViz, other tools available ?

Thanks :)