def addCage(derivation, height, negatives, positives):
 copyShallow = derivation.elementNode.getCopyShallow()
 copyShallow.attributes['path'] = [Vector3(), Vector3(0.0, 0.0, height)]
 extrudeDerivation = extrude.ExtrudeDerivation(copyShallow)
 roundedExtendedRectangle = getRoundedExtendedRectangle(derivation.demiwidth, derivation.rectangleCenterX, 14)
 outsidePath = euclidean.getVector3Path(roundedExtendedRectangle)
 extrude.addPositives(extrudeDerivation, [outsidePath], positives)
 for bearingCenterX in derivation.bearingCenterXs:
  addNegativeSphere(derivation, negatives, bearingCenterX)

def addCage ( derivation , height , negatives , positives ) : copyShallow = derivation . elementNode . getCopyShallow ( ) copyShallow . attributes [ 'path' ] = [ Vector3 ( ) , Vector3 ( 0.0 , 0.0 , height ) ] extrudeDerivation = extrude . ExtrudeDerivation ( copyShallow ) roundedExtendedRectangle = getRoundedExtendedRectangle ( derivation . demiwidth , derivation . rectangleCenterX , 14 ) outsidePath = euclidean . getVector3Path ( roundedExtendedRectangle ) extrude . addPositives ( extrudeDerivation , [ outsidePath ] , positives ) for bearingCenterX in derivation . bearingCenterXs : addNegativeSphere ( derivation , negatives , bearingCenterX )
add linear bearing cage .