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

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
kryptokommunist
Posts: 66
Joined: Fri Mar 27, 2020 6:29 pm
Location: Berlin
Contact:

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

Postby kryptokommunist » Mon May 04, 2020 8:08 pm

Hi everyone who might be interested in this topic. I was accepted for GSOC 2020 and this means I will implement the proposal for an IPython/Jupyter Notebook integration during the next 3 months and I'm looking forward to work together with all of you out there :)

Here's the link to my orginal proposal. I will post updates here during the project. And here's the outline of the idea:

Currently FreeCADs IPython and Jupyter Notebook integration can only provide visualization by running the entire FreeCAD GUI alongside the notebook. Besides not being elegant it brings many problems with it, like not being able to save the visualizations inside the notebook for sharing or bringing visual complexity of the entire GUI into the view instead of just displaying the 3D model. It is therefore important to find a way to visualize FreeCAD's 3D scene in the IPython display system as supported by Jupyter Notebook.

Tackling the open issue “IPython / Jupyter support” I aim to implement a IPython compatible visualization of FreeCAD’s 3D Open Inventor scene graph. To achieve this I intend to choose a suitable JavaScript library able to render a 3D scene graph and to implement a mapping between it and the Open Inventor scene graph. After this as a byproduct I want to implement a better WebGL export based on the scene graph instead of document objects as currently found in FreeCAD. For this I can reuse and integrate the scene graph mapping component. Lastly I want to document the results in the Wiki and create an example Jupyter notebook.
Last edited by Kunda1 on Mon May 04, 2020 8:15 pm, edited 1 time in total.
Reason: Added 'GSoC 2020' to thread title to distinguish it.
User avatar
Kunda1
Posts: 7976
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Mon May 04, 2020 8:16 pm

Congrats! Please communicate with us for whatever you need. This project is very exciting. Good luck!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
sgrogan
Posts: 5954
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » Mon May 04, 2020 8:37 pm

kryptokommunist wrote:
Mon May 04, 2020 8:08 pm
Hi everyone who might be interested in this topic.
Congrats!
You or others may be interested in this https://forum.freecadweb.org/viewtopic. ... 52#p395004
I will try to setup an environment to follow your work using the linked guide.
User avatar
looo
Posts: 3424
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » Tue May 05, 2020 6:42 am

Great! This is a really promising proposal. Actually I have a big interest in this to become a success story. So I will try to help wherever I can.
User avatar
Zolko
Posts: 994
Joined: Mon Dec 17, 2018 10:02 am

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

Postby Zolko » Tue May 05, 2020 8:07 am

kryptokommunist wrote:
Mon May 04, 2020 8:08 pm
I was accepted for GSOC 2020 and this means I will implement the proposal for an IPython/Jupyter Notebook integration during the next 3 months
Hello Marcus, congratulations for that.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
User avatar
yorik
Site Admin
Posts: 11997
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

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

Postby yorik » Tue May 05, 2020 9:31 am

Hi Marcus,
Happy that your project got accepted! Me and @kkremitzki will be your official mentors, and I also asked @ickby to co-mentor with us, since the original idea was his. Really excited about this project!
User avatar
kkremitzki
Posts: 2102
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

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

Postby kkremitzki » Sat May 09, 2020 12:16 am

Congratulations on getting accepted! As you're a bit newer to the community I wanted to offer a bit of advice as a former GSoC student. One of the things I think is the most important is to work in the open and to have a working method where you can share your findings easily. This will result in people in the community following along and providing help to get over obstacles, and to avoid spinning your wheels on something that could be easy for a more veteran contributor or someone who even worked on that thing in particular. For me at least it was a bit difficult. The phrasing I'd like to suggest you keep in mind is this is a "low shame environment" :D
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Kunda1
Posts: 7976
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Wed May 13, 2020 6:27 pm

kryptokommunist wrote:
Mon May 04, 2020 8:08 pm
:bell:
Hey @kryptokommunist how are things going ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
kryptokommunist
Posts: 66
Joined: Fri Mar 27, 2020 6:29 pm
Location: Berlin
Contact:

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

Postby kryptokommunist » Fri May 15, 2020 8:36 pm

Hey there, sorry for the longer silence, I was all over the place and didn't feel I had a good "result" to update you with. But I think @kkremitzki is right in that I should just write what I do regardless :lol:.

So the first thing I did was reading into the FreeCAD history and I followed some of the original sources. Very convenient to be a historian when everything is recorded on the web. I didn't really find out much beyond what is in the history Wiki page though. It was very interesting to read into OpenCascade. Originally my idea was to write a post on the history but right now it would just be a rephrasing of the Wiki, so I abandoned the idea. Also I found this unfortunately very short talk online. Maybe there are more extensive ones out there?

Aside from that I've gone through some materials in The Missing Semester of Your CS Education that seemed relevant for the project and also I worked through parts of the FreeCAD manual to get more familiarity with the user side of the software.

For the next step I thought about documenting the development process. Do you think this might be useful? I started a rough sketch:

development_process.png
development_process.png (223.55 KiB) Viewed 1248 times

And after that I thought that submitting another small patch that falls in the area of the project would be good. So if you know of any 3D-bug or feature request that is not too hard let me know! I considered this one.
vocx
Posts: 4940
Joined: Thu Oct 18, 2018 9:18 pm

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

Postby vocx » Sat May 16, 2020 3:02 am

kryptokommunist wrote:
Fri May 15, 2020 8:36 pm
So if you know of any 3D-bug or feature request that is not too hard let me know! I considered this one.
I'm not sure how this is related to your project (IPython), but there's plenty of things to tackle. For example, you could extend the task panel of the Draft PolarArray and Draft CircularArray tools to use the new AxisReference property.

Or create a single tool for Draft PathArray and Draft PathLinkArray, similar to the other tools. For example, you would create a .ui file and then tie it to a command that loads it, and allows you to select the base object and the path, and then a simple switch to create or not the Link version.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.