Jupyter ❤️ FreeCAD

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
SylvainCorlay
Posts: 6
Joined: Fri Aug 14, 2020 12:40 pm

Re: Jupyter ❤️ FreeCAD

Post by SylvainCorlay »

Regarding the openscad support, this is not what we have in mind. The current grant should allow us to streamline this demonstrator.

We would really like to engage with folks on the FreeCAD developer community (as it is the first file format that we decided to support) also to identify potential next steps and collaborations.
User avatar
chennes
Veteran
Posts: 3910
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Jupyter ❤️ FreeCAD

Post by chennes »

Next month we will be having our first (virtual) all-developer meetup -- maybe you could join us? It's going to be on the first Sunday of May at 19h00 CET.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Jupyter ❤️ FreeCAD

Post by jnxd »

@SylvainCorlay thanks for this great initiative. I tried it out and managed to open the CAD "tab" in JupyterLab, and new drawings are possible. However, any models that I load are not rendered. Could you help me out with figuring out what may be going on?

So far this is what I have:
JupyterLab 4.0.0b2
jupytercad (through pip)
freecad 0.20.2 (through snap)
trungleduc
Posts: 4
Joined: Tue Mar 14, 2023 2:27 pm
Contact:

Re: Jupyter ❤️ FreeCAD

Post by trungleduc »

jnxd wrote: Mon Apr 03, 2023 4:55 am @SylvainCorlay thanks for this great initiative. I tried it out and managed to open the CAD "tab" in JupyterLab, and new drawings are possible. However, any models that I load are not rendered. Could you help me out with figuring out what may be going on?

So far this is what I have:
JupyterLab 4.0.0b2
jupytercad (through pip)
freecad 0.20.2 (through snap)
Thanks for trying it out, we're working on supporting jupyterlab 4 beta, currently, it only works with jupyterlab 4.0.0a32.
SylvainCorlay
Posts: 6
Joined: Fri Aug 14, 2020 12:40 pm

Re: Jupyter ❤️ FreeCAD

Post by SylvainCorlay »

FYI, JupyterCAD 0.1 was released last week, following the final release of JupyterLab 4.0.
User avatar
kwahoo
Posts: 687
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Jupyter ❤️ FreeCAD

Post by kwahoo »

trungleduc wrote: Tue Apr 04, 2023 8:28 am
jnxd wrote: Mon Apr 03, 2023 4:55 am @SylvainCorlay thanks for this great initiative. I tried it out and managed to open the CAD "tab" in JupyterLab, and new drawings are possible. However, any models that I load are not rendered. Could you help me out with figuring out what may be going on?

So far this is what I have:
JupyterLab 4.0.0b2
jupytercad (through pip)
freecad 0.20.2 (through snap)
Thanks for trying it out, we're working on supporting jupyterlab 4 beta, currently, it only works with jupyterlab 4.0.0a32.
I have a similar issue, trying to open the "example1.FCStd", nothing is displayed

Code: Select all

FREECADPATH = "/usr/lib64/freecad/lib64"
import sys
sys.path.append(FREECADPATH)
import FreeCAD as freecad
from jupytercad import CadDocument
doc = CadDocument('example1.FCStd')
display(doc)
Console output:

Code: Select all

[I 2023-06-03 17:36:06.801 ServerApp] Request for Y document '/home/adi/freecad-projekty/example1.FCStd' with room ID: 6fe6d683-e706-41f7-a97a-8a8a9b243945
[I 2023-06-03 17:36:06.813 YDocExtension] Creating FileLoader for: freecad-projekty/example1.FCStd
[I 2023-06-03 17:36:06.814 YDocExtension] Watching file: freecad-projekty/example1.FCStd
[I 2023-06-03 17:36:06.816 ServerApp] Initializing room base64:FCStd:6fe6d683-e706-41f7-a97a-8a8a9b243945
[I 2023-06-03 17:36:06.822 ServerApp] Content in room base64:FCStd:6fe6d683-e706-41f7-a97a-8a8a9b243945 loaded from file freecad-projekty/example1.FCStd
JupiterLab 4.0.1
jupytercad-extension 0.2.0-alpha.0

Code: Select all

OS: Fedora Linux 37 (KDE Plasma) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.0.pre_33348.fc37 (Git)
Build type: Unknown
Python 3.11.3, Qt 5.15.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: Polish/Poland (pl_PL)
Installed mods: 
  * freecad.gears 1.0.0
trungleduc
Posts: 4
Joined: Tue Mar 14, 2023 2:27 pm
Contact:

Re: Jupyter ❤️ FreeCAD

Post by trungleduc »

kwahoo wrote: Sat Jun 03, 2023 3:44 pm
trungleduc wrote: Tue Apr 04, 2023 8:28 am
jnxd wrote: Mon Apr 03, 2023 4:55 am @SylvainCorlay thanks for this great initiative. I tried it out and managed to open the CAD "tab" in JupyterLab, and new drawings are possible. However, any models that I load are not rendered. Could you help me out with figuring out what may be going on?

So far this is what I have:
JupyterLab 4.0.0b2
jupytercad (through pip)
freecad 0.20.2 (through snap)
Thanks for trying it out, we're working on supporting jupyterlab 4 beta, currently, it only works with jupyterlab 4.0.0a32.
I have a similar issue, trying to open the "example1.FCStd", nothing is displayed

Code: Select all

FREECADPATH = "/usr/lib64/freecad/lib64"
import sys
sys.path.append(FREECADPATH)
import FreeCAD as freecad
from jupytercad import CadDocument
doc = CadDocument('example1.FCStd')
display(doc)
Console output:

Code: Select all

[I 2023-06-03 17:36:06.801 ServerApp] Request for Y document '/home/adi/freecad-projekty/example1.FCStd' with room ID: 6fe6d683-e706-41f7-a97a-8a8a9b243945
[I 2023-06-03 17:36:06.813 YDocExtension] Creating FileLoader for: freecad-projekty/example1.FCStd
[I 2023-06-03 17:36:06.814 YDocExtension] Watching file: freecad-projekty/example1.FCStd
[I 2023-06-03 17:36:06.816 ServerApp] Initializing room base64:FCStd:6fe6d683-e706-41f7-a97a-8a8a9b243945
[I 2023-06-03 17:36:06.822 ServerApp] Content in room base64:FCStd:6fe6d683-e706-41f7-a97a-8a8a9b243945 loaded from file freecad-projekty/example1.FCStd
JupiterLab 4.0.1
jupytercad-extension 0.2.0-alpha.0

Code: Select all

OS: Fedora Linux 37 (KDE Plasma) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.0.pre_33348.fc37 (Git)
Build type: Unknown
Python 3.11.3, Qt 5.15.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: Polish/Poland (pl_PL)
Installed mods: 
  * freecad.gears 1.0.0
Hi, could you upgrade to JupyterCAD 0.2.3? The alpha version does not work with JupyterLab 4.x
User avatar
kwahoo
Posts: 687
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Jupyter ❤️ FreeCAD

Post by kwahoo »

trungleduc wrote: Mon Jun 05, 2023 2:21 pm
Hi, could you upgrade to JupyterCAD 0.2.3? The alpha version does not work with JupyterLab 4.x
Thank you for your reply! Unfortunately, no luck. Tried both JupyterCAD 0.2.3 and JupiterLab extension. I can create a JCAD with new solids, but cannot open a FreeCAD file.
trungleduc
Posts: 4
Joined: Tue Mar 14, 2023 2:27 pm
Contact:

Re: Jupyter ❤️ FreeCAD

Post by trungleduc »

kwahoo wrote: Mon Jun 05, 2023 3:35 pm
trungleduc wrote: Mon Jun 05, 2023 2:21 pm
Hi, could you upgrade to JupyterCAD 0.2.3? The alpha version does not work with JupyterLab 4.x
Thank you for your reply! Unfortunately, no luck. Tried both JupyterCAD 0.2.3 and JupiterLab extension. I can create a JCAD with new solids, but cannot open a FreeCAD file.
Could you open an issue here https://github.com/QuantStack/jupytercad/issues with more detail about your Python environment? Since you can work with a JCAD file, the issue may be related to importing FreeCAD
Post Reply