Questions tagged [pythonocc]
24 questions
4
votes
0 answers
Conda and Anaconda errors when installing a package (pythonOCC)
I am trying to install pythonOCC.
Their website says in order to download use conda/anaconda.
Instructions are here: http://www.pythonocc.org/download/
Specifically it says to type this command:
$ conda install -c conda-forge -c dlr-sc -c pythonocc…

user1584421
- 3,499
- 11
- 46
- 86
3
votes
0 answers
docker - ModuleNotFoundError after installing modules
I'm installing pythonocc without conda environment in Docker.
After it shows "Installing: /usr/lib/python3/dist-packages/OCC/Wrapper/__init__.py" implying that I've successfully installed OCC module in /usr/lib/python3/dist-packages. It still went…

Joseph lzd
- 41
- 4
3
votes
3 answers
pyOCCT vs PythonOCC for new project (2020)
I am starting a new project with some 3D CAD objects to be generated from a specific domain data. I can code it with c++ using OpenCascade but I prefer to use Python if possible. There are two popular occ python bindings: pyOCCT and PythonOCC, both…

mnesarco
- 2,619
- 23
- 31
2
votes
2 answers
Access STEP Instance ID's with PythonOCC
Let's suppose I'm using this STEP file data as input:
#417=ADVANCED_FACE('face_1',(#112),#405,.F.);
#418=ADVANCED_FACE('face_2',(#113),#406,.F.);
#419=ADVANCED_FACE('face_3',(#114),#407,.F.);
I'm using pythonocc-core to read the STEP file.
Then the…

Florian Ludewig
- 4,338
- 11
- 71
- 137
1
vote
0 answers
Access .STP egde coordinates with PythonOCC
I have a .STP file where I marked an edge to be welded using Solidworks, and then I exported the file as step 242.
The exported.STP file has this line:
#30=TESSELLATED_SHELL('Weld Bead1',(#27,#28,#29),$);
When I open the file on e-drawing the…

Jorge Fernandes
- 11
- 3
1
vote
1 answer
There is some problent with windowHandle().startSystemResize(edges) and pythonocc
This is my code
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox
from OCC.Display.OCCViewer import rgb_color
from OCC.Display.backend import…

Tim
- 11
- 3
1
vote
0 answers
Is there a way to extract geometric information out of cad model for feature recognition?
I am really new to this so any help is appreciated so basically I am trying to use PyTorch geometric to identify topological features within 3D CAD models (i.e. slots, pockets, holes, etc) but in order to do that I need to represent the cad model…

Shubham Verma
- 19
- 3
1
vote
1 answer
Wrong BoundingBox dimension extraction pythonocc
I am trying to extract box dimensions from the STP file and it's worked for a some of the samples, but unfortunately, I got the wrong extraction for the other samples for example below zipped STP…

nom kml
- 11
- 2
1
vote
0 answers
How to render a 3D object to HTML file by using pythonOCC in Django?
I have a Django application and I'm using pythonOCC package in it. I have to display the 3D .stl, .stp, .igs files in my template. Normally, when I call the render() function, the following outputs appear on my vscode console and since flask app…

Aslı Kök
- 616
- 8
- 19
1
vote
1 answer
ImportError: libGL.so.1: cannot open shared object file: No such file or directory while importing OCC
I have a Django application which it's deployed to Amazon Elastic Beanstalk(Python 3.7 running on 64bit Amazon Linux 2/3.0.3). I have installed anaconda and pythonocc-core package by creating a 10_anaconda.config file in .ebextensions…

Aslı Kök
- 616
- 8
- 19
0
votes
0 answers
I want when user clicks on the part in the displayed model, only that part should be visible
I want when user clicks on the part on the displayed model, only that part should be visible. but the code is not selecting the part
I tried the below code
``from OCC.Display.SimpleGui import init_display
from OCC.Extend.DataExchange import…

Abhinav Kumar
- 1
- 1
0
votes
0 answers
Missing Qt-Platform-Plugin "wayland" - pySide / pyQt / visualization
I'm getting started with pythonOCC for my thesis and I'm already struggling at the installation-part.
I managed to install pythonOCC (7.7.0) inside a venv with python 3.9 via Anaconda (took me longer than I want to admit...) on my Ubuntu 22.04…

MrJ
- 1
0
votes
0 answers
Not able to get the total volume of the model using PythonOCC
I am trying to print the total volume of my model in the terminal, but it is not showing anything. I referred to "https://stackoverflow.com/questions/66929762/extract-volume-from-a-step-file" but was not helpul. Below is my code
from…
user13533843
0
votes
0 answers
PythonOCC: Adding a tooltip to display text about a 3D object when a mouse clicks on it
I want to display text about a sphere when the mouse clicks on it. I figured a tooltip in PythonOCC would be able to do this but I'm not sure about how I should write the code for it.
The code for the sphere is as follows. The resulting window is…

James Lee
- 61
- 3
0
votes
0 answers
Pythonocc. How can i get cursor coordinates in 3d space?
I need to get the coordinates of the cursor in the 3d space of the scene when I put it on some surface. How can I do that?
I tried to use the ConvertWithProj function to get at least the ray and then find its intersection with the surface. The…

Alex
- 23
- 4