Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a shell out of a tapered box causes an "BRep_Tool:: no parameter on edge" error #1670

Open
knower-to-be opened this issue Sep 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@knower-to-be
Copy link

To Reproduce

I am trying to make a box with tapered walls using the following code, however I get an error OCP.Standard.Standard_NoSuchObject: BRep_Tool:: no parameter on edge.

import cadquery as cq

result = (
    cq.Workplane('XY')
    .rect(10, 10)
    .extrude(10, taper=-10.0)
    .faces(">Z")
    .shell(-0.5)
)
# cq.exporters.export(result, 'issue.stl')
show_object(result)

Backtrace

Traceback (most recent call last):
  File "issue.py", line 8, in <module>
    .shell(-0.5)
     ^^^^^^^^^^^
  File ".venv\Lib\site-packages\cadquery\cq.py", line 1276, in shell
    s = solidRef.shell(faces, thickness, kind=kind)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv\Lib\site-packages\cadquery\occ_impl\shapes.py", line 2848, in shell
    shell_builder.MakeThickSolidByJoin(
OCP.Standard.Standard_NoSuchObject: BRep_Tool:: no parameter on edge

What I have tried as a workaround to this error

Strangely, no such error occurs when I change the taper from -10deg to +10deg and select the bottom face instead of the top face. The resulting model is exactly the same, as the expected result from the first code block, but upside down.
As a result, I do not understand by the first code does not work

import cadquery as cq

result = (
    cq.Workplane('XY')
    .rect(10, 10)
    .extrude(10, taper=10.0)
    .faces("<Z")
    .shell(-0.5)
)
cq.exporters.export(result, 'issue.stl')
show_object(result)

box

Environment

OS: Windows 10
Was CadQuery installed using Conda?: No, I installed it using pip.
Output of conda list from your active Conda environment:

> python --version
Python 3.11.7

> pip list
Package           Version
----------------- -------
cadquery          2.4.0
cadquery-ocp      7.7.2
casadi            3.6.6
ezdxf             1.3.3
fonttools         4.53.1
multimethod       1.9.1
nlopt             2.8.0
nptyping          2.0.1
numpy             1.23.5
path              17.0.0
pip               23.2.1
pyparsing         3.1.4
setuptools        68.2.0
typing_extensions 4.12.2
typish            1.9.3
wheel             0.41.2

Using: PyCharm, CQ-Editor

@knower-to-be knower-to-be added the bug Something isn't working label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant