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 #451

Closed
knower-to-be opened this issue Sep 22, 2024 · 1 comment

Comments

@knower-to-be
Copy link

Problem Statement

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)


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

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 model renders normally and it is exactly the same, as the expected result from the first example, but upside down.

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

I am not sure why the negative taper is causing the issue. Am I doing something wrong or is this a bug?

Python libraries
python==3.11.7
cadquery==2.4.0
cadquery-ocp==7.7.2
numpy==1.23.5 (not using numpy 2.1.1 because of currently unresolved issue #442)

@knower-to-be
Copy link
Author

Wrong repository, sorry...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant