def setSVGCarvingCorners(cornerMaximum, cornerMinimum, layerHeight, loopLayers):
 for loopLayer in loopLayers:
  for loop in loopLayer.loops:
   for point in loop:
    pointVector3 = Vector3(point.real, point.imag, loopLayer.z)
    cornerMaximum.maximize(pointVector3)
    cornerMinimum.minimize(pointVector3)
 halfLayerThickness = (0.5 * layerHeight)
 cornerMaximum.z += halfLayerThickness
 cornerMinimum.z -= halfLayerThickness

def setSVGCarvingCorners ( cornerMaximum , cornerMinimum , layerHeight , loopLayers ) : for loopLayer in loopLayers : for loop in loopLayer . loops : for point in loop : pointVector3 = Vector3 ( point . real , point . imag , loopLayer . z ) cornerMaximum . maximize ( pointVector3 ) cornerMinimum . minimize ( pointVector3 ) halfLayerThickness = ( 0.5 * layerHeight ) cornerMaximum . z += halfLayerThickness cornerMinimum . z -= halfLayerThickness
parse svg text and store the layers .