CadQuery / CadQuery/cadquery

Argument type of `cadquery.occ_impl.shapes.Solid.makeSolid`

Open
#1,505 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

I'm calling `cadquery.occ_impl.shapes.Solid.makeSolid` with a `cadquery.occ_impl.shapes.Shell` object.

The body of this function is the one-liner
```
return cls(ShapeFix_Solid().SolidFromShell(shell.wrapped))
```
My problem is that `SolidFromShell` complains that it wants an `OCP.TopoDS.TopoDS_Shell` object as a parameter. `shell.wrapped` however contains an `OCP.TopoDS.TopoDS_Compound`:

```
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: ,
```
Naïvely I'd assume that wrapping a shell returns, well, the appropriate shell object.

Is that a bug? if not how do I call this correctly?

My usecase is importing an STL mesh, using the script at https://github.com/JustinSDK/cqMore/blob/main/examples/import_stl.py – if there's another / better / less-buggy way of doing this I'm all ears.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.