MCPcopy Index your code
hub / github.com/CadQuery/cadquery / enlarge

Method enlarge

cadquery/occ_impl/geom.py:936–950  ·  view source on GitHub ↗

Returns a modified (expanded) bounding box, expanded in all directions by the tolerance value. This means that the minimum values of its X, Y and Z intervals of the bounding box are reduced by the absolute value of tol, while the maximum values are increased by the s

(self, tol: float)

Source from the content-addressed store, hash-verified

934 return BoundBox(tmp)
935
936 def enlarge(self, tol: float) -> "BoundBox":
937 """Returns a modified (expanded) bounding box, expanded in all
938 directions by the tolerance value.
939
940 This means that the minimum values of its X, Y and Z intervals
941 of the bounding box are reduced by the absolute value of tol, while
942 the maximum values are increased by the same amount.
943 """
944 tmp = Bnd_Box()
945 tmp.Add(self.wrapped)
946 tmp.SetGap(self.wrapped.GetGap())
947
948 tmp.Enlarge(tol)
949
950 return BoundBox(tmp)
951
952 @staticmethod
953 def findOutsideBox2D(bb1: "BoundBox", bb2: "BoundBox") -> Optional["BoundBox"]:

Callers 1

testBoundBoxEnlargeMethod · 0.80

Calls 1

BoundBoxClass · 0.85

Tested by 1

testBoundBoxEnlargeMethod · 0.64