GSoC 2020: A better IPython and Jupyter Notebook Integration for FreeCAD

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
kryptokommunist
Posts: 70
Joined: Fri Mar 27, 2020 6:29 pm
Location: Berlin
Contact:

Re: GSoC 2020: A better IPython and Jupyter Notebook Integration for FreeCAD

Post by kryptokommunist »

vocx wrote: Sun Sep 20, 2020 9:59 pm Make sure you install with pip3 and install python3-pivy versions. Otherwise you may get the Python 2 version and won't find the required Python 3 modules.

Also try to get the packages from kkremitzki's PPA. This is what is suggested in Compile on Linux.
I ran it again with pip3 and the result does not change. The machine shouldn't even have python 2.


By kkremitzkis PPA you mean freecad-daily? His name is not mentioned on the page.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: GSoC 2020: A better IPython and Jupyter Notebook Integration for FreeCAD

Post by vocx »

kryptokommunist wrote: Sun Sep 20, 2020 11:59 pm By kkremitzkis PPA you mean freecad-daily? His name is not mentioned on the page.
Oh, yes, he maintains the Ubuntu PPA from Debian's salsa packages.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: GSoC 2020: A better IPython and Jupyter Notebook Integration for FreeCAD

Post by wmayer »

Everything is possible. Yes, I would add it specifically for type checking. Do you want a PR?
No, I will add them shortly.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: GSoC 2020: A better IPython and Jupyter Notebook Integration for FreeCAD

Post by looo »

The function FreeCADGui.subgraphFromObject(obj) does not return the correct result for FeaturePython objects. Comparing this to the sceneinspector it seems like the SoSwitch is missing it's children.

Code: Select all

import FreeCAD
import FreeCADGui
import Draft


doc = App.newDocument()
circle = Draft.makeCircle(1)
doc.recompute()
root = Gui.subgraphFromObject(circle)
for child in root:
    print("child: {}".format(child))
    try:
        for subchild in child:
            print("subchild of {}: {}".format(child, subchild))
    except TypeError:
        pass
wmayer wrote: Mon Sep 21, 2020 8:50 am
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: GSoC 2020: A better IPython and Jupyter Notebook Integration for FreeCAD

Post by looo »

wmayer wrote: Sat Sep 26, 2020 8:40 pm git commit 6d0326572
thanks, tested and works correctly now. But now something jupyter-related was updated and I can't reproduce the example. The three.js view is shown but no object is rendered.
Post Reply