[Pythonocc] I tried using CAD on jupyter notebook

I want to mess with a file created by CAD with python!

I've heard that .py files are imported into CAD software to extend their functionality, but I wondered if there was something that could be run on jupyter notebook.

Conclusion first

there were. I tried hello world in the cad area. cad.gif

What is pythonocc

pythonocc is a 3D CAD package for python. You can move it on jupyter notebook! !!

gitub: https://github.com/tpaviot/pythonocc

Installation

It was written on github that it can be installed with the following.

conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.18.1 python=3.5

However, in my case, when importing with Jupyter notebooke, I got "OCC not found". For the time being, I could do it by inserting pythonocc-core. I wonder why ... Please tell me the details ...

conda install -c dlr-sc pythonocc-core

Also, it seems that pythreejs and smesh are also required to render on jupyter notebook, so I will put them in.

conda install -c conda-forge pythreejs
conda install -c pythonocc smesh

Try Hello world

There was a demo on github, so let's try it! !! !! pythonocc-demos/jupyter_notebooks/occ_helloworld.ipynb When I try to execute ...

did it! !! !! cad.gif

It works when you play with the mouse!

Try reading the STEP file

When I read the STEP file of a 10x10x10 cube, ... The kernel is dead. Is memory really unreasonable ...? Is it the limit?

Is there a solution ... If anyone comes up with a solution, I would appreciate it if you could comment.

Finally

I'm a beginner so please let me know if you make a mistake! !! Do not bully me........

whoami twitter:@hookhook125 blog: https://hooked-on-mas.hatenablog.

Recommended Posts

[Pythonocc] I tried using CAD on jupyter notebook
Somehow I tried using jupyter notebook
I tried using Jupyter
I tried using PySpark from Jupyter 4.x on EMR
I tried VS Code's Jupyter notebook
I tried to visualize BigQuery data using Jupyter Lab on GCP
I tried using argparse
I tried using Remote API on GAE / J
I tried using anytree
I tried using aiomysql
I tried using Summpy
I tried using coturn
I tried using "Anvil".
I tried using Hubot
I tried launching jupyter nteract on heroku server
I tried using ESPCN
I tried using Ipython
I tried using PyCaret
I tried using cron
I tried using ngrok
I tried using face_recognition
I tried using PyCaret
I tried using Heapq
I tried using doctest
I tried using folium
I tried using jinja2
I tried using folium
I tried using time-window
Using Graphviz with Jupyter Notebook
[I tried using Pythonista 3] Introduction
I tried using easydict (memo).
I tried face recognition using Face ++
I tried using Random Forest
I tried using BigQuery ML
Try using Jupyter Notebook dynamically
I tried using Amazon Glacier
High charts on Jupyter notebook
View PDF on Jupyter Notebook
I tried using git inspector
[Python] I tried using OpenPose
I tried using magenta / TensorFlow
I tried to touch jupyter
Run Jupyter Notebook on windows
I tried MLflow on Databricks
I tried using AWS Chalice
I tried using Slack emojinator
[Images available] I tried using neofetch on various operating systems!
A note when I can't open Jupyter Notebook on Windows
I tried AdaNet on table data
I tried using Rotrics Dex Arm # 2
Formatting with autopep8 on Jupyter notebook
I tried using Rotrics Dex Arm
I tried using GrabCut of OpenCV
Run azure ML on jupyter notebook
I tried Cython on Ubuntu on VirtualBox
I tried using Thonny (Python / IDE)
I tried server-client communication using tmux
I tried reinforcement learning using PyBrain
I tried deep learning using Theano
Try running Jupyter Notebook on Mac
[Kaggle] I tried undersampling using imbalanced-learn