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

Method isInside

cadquery/occ_impl/geom.py:1007–1019  ·  view source on GitHub ↗

Is the provided bounding box inside this one?

(self, b2: "BoundBox")

Source from the content-addressed store, hash-verified

1005 return cls(bbox)
1006
1007 def isInside(self, b2: "BoundBox") -> bool:
1008 """Is the provided bounding box inside this one?"""
1009 if (
1010 b2.xmin > self.xmin
1011 and b2.ymin > self.ymin
1012 and b2.zmin > self.zmin
1013 and b2.xmax < self.xmax
1014 and b2.ymax < self.ymax
1015 and b2.zmax < self.zmax
1016 ):
1017 return True
1018 else:
1019 return False
1020
1021
1022class Location(object):

Callers 4

_extrudeMethod · 0.45
testBoundBoxEnlargeMethod · 0.45
testIsInsideMethod · 0.45
testIsInsideSolidMethod · 0.45

Calls

no outgoing calls

Tested by 3

testBoundBoxEnlargeMethod · 0.36
testIsInsideMethod · 0.36
testIsInsideSolidMethod · 0.36