Skip to content

shell() fails on spheres created on a rotated Workplane (XZ, YZ, ZX, ZY) #2074

Description

@DillwynKnox

shell() raises StdFail_NotDone for any sphere created on a Workplane whose
normal is not ±Z. The same sphere, in the same world pose, works fine when the rotation is
baked into the geometry instead of carried as a TopLoc_Location. Two conditions must both
hold: a located (not baked) shape, and a sphere that retains at least one pole.

To Reproduce

import cadquery as cq

cq.Workplane("XY").sphere(13).shell(-1)   # OK
cq.Workplane("XZ").sphere(13).shell(-1)   # StdFail_NotDone

Backtrace

  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/bug.py", line 4, in <module>
    cq.Workplane("XZ").sphere(13).shell(-1)
  File "/.venv/lib/python3.12/site-packages/cadquery/cq.py", line 1215, in shell
    s = solidRef.shell(faces, thickness, kind=kind)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/cadquery/occ_impl/shapes.py", line 3814, in shell
    s1 = self.__class__(shell_builder.Shape()).Shells()[0].wrapped
                        ^^^^^^^^^^^^^^^^^^^^^
OCP.OCP.StdFail.StdFail_NotDone: BRep_API: command not done

Environment

OS: Fedora 44

Was CadQuery installed using Conda?: No uv and pip where used

>uv pip list
❯ uv pip list
Package                 Version     Editable project location
----------------------- ----------- -----------------------------------------
aiohappyeyeballs        2.7.1
aiohttp                 3.14.3
aiosignal               1.4.0
asttokens               3.0.2
attrs                   26.1.0
blinker                 1.9.0
cachetools              5.5.2
cadquery                2.8.0
cadquery-ocp            7.9.3.1.1
cadquery-ocp-proxy      7.9.3.1.1
casadi                  3.7.2
certifi                 2026.7.22
charset-normalizer      3.4.9
click                   8.4.2
comm                    0.2.3
contourpy               1.3.3
cycler                  0.12.1
dataclasses-json        0.6.7
debugpy                 1.8.21
decorator               5.3.1
deprecated              1.3.1
executing               2.2.1
ezdxf                   1.4.4
flask                   3.1.3
flask-sock              0.7.0
fonttools               4.63.0
frozenlist              1.8.0
h11                     0.16.0
idna                    3.18
imagesize               2.0.0
ipykernel               7.3.0
ipython                 9.15.0
ipython-pygments-lexers 1.1.1
itsdangerous            2.2.0
jedi                    0.20.0
jinja2                  3.1.6
jupyter-client          8.9.1
jupyter-core            5.9.1
kiwisolver              1.5.0
llvmlite                0.48.0
markupsafe              3.0.3
marshmallow             3.26.2
matplotlib              3.11.1
matplotlib-inline       0.2.2
more-itertools          11.1.0
msgpack                 1.2.1
multidict               6.7.1
multimethod             1.12
mypy-extensions         1.1.0
nest-asyncio2           1.7.2
nlopt                   2.11.0
numba                   0.66.0
numpy                   2.4.6
ocp-tessellate          3.4.1
ocp-vscode              4.0.1
orjson                  3.11.9
packaging               26.2
parso                   0.8.7
pexpect                 4.9.0
pillow                  12.2.0
platformdirs            4.11.0
prompt-toolkit          3.0.53
propcache               0.5.2
psutil                  7.2.2
ptyprocess              0.7.0
pure-eval               0.2.3
pyaml                   26.7.0
pygltflib               1.16.5
pygments                2.20.0
pyparsing               3.3.2
pyperclip               1.9.0
python-dateutil         2.9.0.post0
pyyaml                  6.0.3
pyzmq                   27.1.0
questionary             2.1.1
requests                2.34.2
runtype                 0.5.3
scipy                   1.18.0
simple-websocket        1.1.0
six                     1.17.0
stack-data              0.6.3
threejs-materials       1.2.2
tornado                 6.5.7
traitlets               5.15.1
trame                   3.13.2
trame-client            3.13.2
trame-common            1.2.4
trame-components        2.5.0
trame-server            3.12.5
trame-vtk               2.11.15
trame-vuetify           3.2.5
typing-extensions       4.16.0
typing-inspect          0.9.0
urllib3                 2.7.0
vtk                     9.6.2
watchdog                6.0.0
wcwidth                 0.8.2
webcolors               24.8.0
websockets              16.1.1
werkzeug                3.1.8
wrapt                   2.3.0
wslink                  2.5.7
wsproto                 1.3.2
yarl                    1.24.5

Using: vscode with OCP CAD VIEWER

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions