pythonocc-core icon indicating copy to clipboard operation
pythonocc-core copied to clipboard

`BRepAlgoAPI_Section` section and slicer examples not working in Jupyter

Open YaroslavKormushyn opened this issue 1 year ago • 1 comments

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 avatar Jun 17 '24 09:06 YaroslavKormushyn

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

YaroslavKormushyn avatar Jun 17 '24 11:06 YaroslavKormushyn