MCPcopy
hub / github.com/CadQuery/cadquery / isSolid

Method isSolid

cadquery/occ_impl/shapes.py:4172–4181  ·  view source on GitHub ↗

Returns true if the object is a solid, false otherwise

(obj: Shape)

Source from the content-addressed store, hash-verified

4170
4171 @staticmethod
4172 def isSolid(obj: Shape) -> bool:
4173 """
4174 Returns true if the object is a solid, false otherwise
4175 """
4176 if hasattr(obj, "ShapeType"):
4177 if obj.ShapeType() == "Solid" or (
4178 obj.ShapeType() == "Compound" and len(obj.Solids()) > 0
4179 ):
4180 return True
4181 return False
4182
4183 @classmethod
4184 def makeSolid(cls, shell: Shell) -> Solid:

Callers 1

test_isSolidFunction · 0.80

Calls 2

SolidsMethod · 0.80
ShapeTypeMethod · 0.45

Tested by 1

test_isSolidFunction · 0.64