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!
Post Reply
User avatar
kryptokommunist
Posts: 70
Joined: Fri Mar 27, 2020 6:29 pm
Location: Berlin
Contact:

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

Post by kryptokommunist »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

Congrats! Please communicate with us for whatever you need. This project is very exciting. Good luck!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

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

Post by sgrogan »

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.
"fight the good fight"
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 »

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
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

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

Post by Zolko »

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 — tutorials here and here
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

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

Post by yorik »

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
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

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

Post by kkremitzki »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

kryptokommunist wrote: Mon May 04, 2020 8:08 pm:bell:
Hey @kryptokommunist how are things going ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
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 »

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 7950 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
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: 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. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply