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

Problem running the examples/import_stl.py code #7

Open
smurfix opened this issue Jan 19, 2024 · 0 comments
Open

Problem running the examples/import_stl.py code #7

smurfix opened this issue Jan 19, 2024 · 0 comments

Comments

@smurfix
Copy link

smurfix commented Jan 19, 2024

I'm running the STL importer on openscad/examples/Basics/projection.stl.

Unfortunately I get a crash:

Traceback (most recent call last):
  File "/home/smurf/src/openscadq/../cqMore/examples/import_stl.py", line 11, in <module>
    stl = import_stl('/src/openscad/examples/Basics/projection.stl')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/smurf/src/openscadq/../cqMore/examples/import_stl.py", line 9, in import_stl
    return Workplane().polyhedron(points, faces)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/cqmore/_plugin.py", line 246, in polyhedron
    return _solid_each_combine_clean(self, makePolyhedron(points, faces), combine, clean)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/cqmore/_solid.py", line 20, in makePolyhedron
    return Solid.makeSolid(
           ^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/cadquery/occ_impl/shapes.py", line 2944, in makeSolid
    return cls(ShapeFix_Solid().SolidFromShell(shell.wrapped))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: SolidFromShell(): incompatible function arguments. The following argument types aresupported:
    1. (self: OCP.ShapeFix.ShapeFix_Solid, shell: OCP.TopoDS.TopoDS_Shell) -> OCP.TopoDS.TopoDS_Solid

Invoked with: <OCP.ShapeFix.ShapeFix_Solid object at 0x7f3de2624030>, <OCP.TopoDS.TopoDS_Compound object at 0x7f3ddffc1c70>

Any ideas how to fix this?

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