Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
Fixed findSolid() so that it handles compounds properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwright committed Oct 12, 2015
1 parent afd186e commit 74b4f00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cadquery/CQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,10 @@ def findSolid(self, searchStack=True, searchParents=True):

if searchStack:
for s in self.objects:
if type(s) == Solid:
if isinstance(s, Solid):
return s
elif isinstance(s, Compound):
return s.Solids()

if searchParents and self.parent is not None:
return self.parent.findSolid(searchStack=True, searchParents=searchParents)
Expand Down

0 comments on commit 74b4f00

Please sign in to comment.