24 questions
0
votes
1
answer
41
views
How to read custom extras / user data from a GLB file using pythonOCC
I'm exporting a 3D model to GLB format using pythonOCC. During export, I store custom metadata on each face using TDataStd_NamedData:
...
user_data = TDataStd_NamedData.Set(some_shape_label)
user_data....
1
vote
2
answers
179
views
How to fix issue with QtPdf in Conda environment?
I needed to use python occ so I installed anaconda and now I'm not sure why QtPdf is not working while everything else seems to be fine. I haven't used anaconda before.
Steps:
conda create -n xxxx ...
0
votes
0
answers
55
views
Units mismatch between bounding box and triangulation nodes when Importing STEP Files
I am using pythonOCC 7.8.1.1 to compute a bounding cylinder for a shape imported from a STEP file. The shape is axis-aligned and the geometry appears correct. However, when I calculate the bounding ...
1
vote
0
answers
115
views
How can I retrieve step file entity by ID with python-occ?
I have a step file that I am ingesting using python-occ. I want to retrieve all shapes that match a specific name. Currently I am reading the step as raw text and using regex to get the entity id of ...
1
vote
1
answer
221
views
How to fix repeated use of BRepAlgoAPI_Fuse issues?
I am writing some code in Python using OCC that takes a list of gp_Pnt points and then starting at the tip makes a cone followed by a whole bunch of cylinders fused with spheres one after another to ...
2
votes
0
answers
1k
views
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 ...
1
vote
0
answers
194
views
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),...
1
vote
1
answer
189
views
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 ...
0
votes
0
answers
914
views
Extracting text from STEP files
I have a number of STEP files with text embedded in them, which I need to extract. Unfortunately, text in STEP files doesn't come in the form of characters, but in the form of curves, vertexes, ...
2
votes
2
answers
3k
views
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 ...
1
vote
0
answers
1k
views
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 ...
1
vote
1
answer
511
views
stl_writer.Write not saving any file
I am trying to convert from stp to stl. The code is:
rom OCC.Core.STEPControl import STEPControl_Reader
from OCC.Core.StlAPI import StlAPI_Writer
import os
os.chdir(os.path.dirname(os.path.abspath(...
0
votes
1
answer
1k
views
How to get the distance between a point and a shape in pythonocc-core?
I had searched similar questions, With OpenCascade, how to do a collision detection of 2 shapes fast?.
Also ,here is the example srcipts: core_geometry_minimal_distance (code above)
But,It is hard for ...
0
votes
0
answers
641
views
Problem with Python-occ build - error when running make
I'm trying to install Python-occ under ubuntu 18.04.
After installing OCE successfully, I am trying to install py-occ. When I configure and I run cmake commande it is working :
-- The C compiler ...
0
votes
1
answer
1k
views
How to access edge dimensions in pythonocc?
I'm trying to use PythonOCC to read in wireframe data (see this link) that is in IGES or STEP format, for eventual use in building a FE beam-element model.
Where in PythonOCC can I actually extract ...
0
votes
0
answers
348
views
pythonocc identify holes (and it dimension) in surface
I have an object, and I am checking it's faces (for exmaple the attached object).
First I have checked if each of it's faces is a plane/cylinder or Bspline surface.
Now, I need to check if the face ...
1
vote
1
answer
804
views
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 file
...
0
votes
1
answer
2k
views
Failure to install package using Anaconda
I want to install PythonOCC.
From the official documentation (http://www.pythonocc.org/download/), i saw that i have to use:
conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==...
1
vote
0
answers
1k
views
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 ...
0
votes
2
answers
1k
views
Using pythonOCC's render function 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. I have tried to use render() function which in x3dom_renderer.py file ...
4
votes
0
answers
1k
views
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:
$ ...
1
vote
1
answer
3k
views
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 ...
3
votes
0
answers
833
views
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 ...
3
votes
3
answers
7k
views
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 ...