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

Method largestDimension

cadquery/cq.py:2769–2782  ·  view source on GitHub ↗

Finds the largest dimension in the stack. Used internally to create thru features, this is how you can compute how long or wide a feature must be to make sure to cut through all of the material :raises ValueError: if no solids or compounds are found :return

(self)

Source from the content-addressed store, hash-verified

2767 return self.wire()
2768
2769 def largestDimension(self) -> float:
2770 """
2771 Finds the largest dimension in the stack.
2772
2773 Used internally to create thru features, this is how you can compute
2774 how long or wide a feature must be to make sure to cut through all of the material
2775
2776 :raises ValueError: if no solids or compounds are found
2777 :return: A value representing the largest dimension of the first solid on the stack
2778 """
2779 # Get all the solids contained within this CQ object
2780 compound = self.findSolid()
2781
2782 return compound.BoundingBox().DiagonalLength
2783
2784 def cutEach(
2785 self: T,

Callers 4

cboreHoleMethod · 0.95
cskHoleMethod · 0.95
holeMethod · 0.95
testLargestDimensionMethod · 0.95

Calls 2

findSolidMethod · 0.95
BoundingBoxMethod · 0.45

Tested by 1

testLargestDimensionMethod · 0.76