def getToothProfileRack(derivation):
 addendumSide = (derivation.quarterWavelength - (derivation.addendum * derivation.tanPressure))
 addendumComplex = complex(addendumSide, derivation.addendum)
 dedendumSide = (derivation.quarterWavelength + (derivation.dedendum * derivation.tanPressure))
 dedendumComplex = complex(dedendumSide, (- derivation.dedendum))
 toothProfile = [dedendumComplex]
 if (derivation.rootBevel > 0.0):
  mirrorPoint = complex((derivation.wavelength - dedendumSide), (- derivation.dedendum))
  toothProfile = getBevelPath(addendumComplex, derivation.rootBevel, dedendumComplex, mirrorPoint)
 if (derivation.tipBevel > 0.0):
  mirrorPoint = complex((- addendumComplex.real), addendumComplex.imag)
  bevelPath = getBevelPath(dedendumComplex, derivation.tipBevel, addendumComplex, mirrorPoint)
  bevelPath.reverse()
  toothProfile += bevelPath
 else:
  toothProfile.append(addendumComplex)
 return euclidean.getMirrorPath(getWidthMultipliedPath(toothProfile, derivation.toothWidthMultiplier))

def getToothProfileRack ( derivation ) : addendumSide = ( derivation . quarterWavelength - ( derivation . addendum * derivation . tanPressure ) ) addendumComplex = complex ( addendumSide , derivation . addendum ) dedendumSide = ( derivation . quarterWavelength + ( derivation . dedendum * derivation . tanPressure ) ) dedendumComplex = complex ( dedendumSide , ( - derivation . dedendum ) ) toothProfile = [ dedendumComplex ] if ( derivation . rootBevel > 0.0 ) : mirrorPoint = complex ( ( derivation . wavelength - dedendumSide ) , ( - derivation . dedendum ) ) toothProfile = getBevelPath ( addendumComplex , derivation . rootBevel , dedendumComplex , mirrorPoint ) if ( derivation . tipBevel > 0.0 ) : mirrorPoint = complex ( ( - addendumComplex . real ) , addendumComplex . imag ) bevelPath = getBevelPath ( dedendumComplex , derivation . tipBevel , addendumComplex , mirrorPoint ) bevelPath . reverse ( ) toothProfile += bevelPath else : toothProfile . append ( addendumComplex ) return euclidean . getMirrorPath ( getWidthMultipliedPath ( toothProfile , derivation . toothWidthMultiplier ) )
get profile for one rack tooth .