tpaviot / pythonocc-core

Python package for 3D geometry CAD/BIM/CAM
GNU Lesser General Public License v3.0
1.39k stars 379 forks source link

`BRepAlgoAPI_Section` section and slicer examples not working in Jupyter #1343

Open YaroslavKormushyn opened 5 months ago

YaroslavKormushyn commented 5 months ago

Hello!

I've tried running the binder examples in Jupyter Lab for BRepAlgoAPI_Section usages. However, the slicer and the section examples don't work as expected.

Expectation: the displayed shape has lines where the sections or slices should be. Actual result: the shapes are displayed as-is, without any intersections or slices.

I've also tried uncommenting the part, where the sections should be displayed in the renderer, e.g.:

for section_ in sections:
        rnd.DisplayShape(section_.Shape())

I've added some transparency for the original torus shape in the section example, if the sections are conflicting with the shape itself, but with no results.

For the slicer example, the renderer throws a runtime error:

RuntimeError: Standard_ConstructionErrorBnd_Box is void raised from method ShapeTesselator of class ShapeTesselator

image Screenshot 2024-06-17 122356

What am I doing wrong?

YaroslavKormushyn commented 5 months ago

Just checked if it works on my local machine using a different render engine, and it works perfectly: image

Examples used: https://github.com/tpaviot/pythonocc-demos -> core_topology_boolean.py