Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (11 sloc) 594 Bytes
if isActive:
if not self.repository.retractWithinIsland.value:
locationEnclosureIndex = self.getSmallestEnclosureIndex(location.dropAxis())
if locationEnclosureIndex != self.getSmallestEnclosureIndex(self.oldLocation.dropAxis()):
return None
locationMinusOld = location - self.oldLocation
xyTravel = abs(locationMinusOld.dropAxis())
zTravelMultiplied = locationMinusOld.z * self.zDistanceRatio
return math.sqrt(xyTravel * xyTravel + zTravelMultiplied * zTravelMultiplied)
else:
location = gcodec.getLocationFromSplitLine(location, splitLine)