def getPositionRelativeToBehind( self ): aheadMinusBehind = self.circleNodeAhead.circle.minus( self.circleNodeBehind.circle ) aheadMinusBehind.scale( 0.5 ) halfChordWidth = math.sqrt( self.circleNodeAhead.radiusSquared - aheadMinusBehind.length2() ) rotatedClockwiseQuarter = euclidean.getRotatedClockwiseQuarterAroundZAxis( aheadMinusBehind ) rotatedClockwiseQuarter.scale( halfChordWidth / rotatedClockwiseQuarter.length() ) aheadMinusBehind.add( rotatedClockwiseQuarter ) return aheadMinusBehind
def getIntersectionAtInset( ahead, behind, inset ): "Get circle intersection loop at inset from segment." aheadMinusBehind = ahead.minus( behind ) aheadMinusBehind.scale( 0.5 ) rotatedClockwiseQuarter = euclidean.getRotatedClockwiseQuarterAroundZAxis( aheadMinusBehind ) rotatedClockwiseQuarter.scale( inset / rotatedClockwiseQuarter.length() ) aheadMinusBehind.add( rotatedClockwiseQuarter ) aheadMinusBehind.add( behind ) return aheadMinusBehind
def getIntersectionAtInset(ahead, behind, inset): "Get circle intersection loop at inset from segment." aheadMinusBehind = ahead.minus(behind) aheadMinusBehind.scale(0.5) rotatedClockwiseQuarter = euclidean.getRotatedClockwiseQuarterAroundZAxis( aheadMinusBehind) rotatedClockwiseQuarter.scale(inset / rotatedClockwiseQuarter.length()) aheadMinusBehind.add(rotatedClockwiseQuarter) aheadMinusBehind.add(behind) return aheadMinusBehind
def getPositionRelativeToBehind(self): aheadMinusBehind = self.circleNodeAhead.circle.minus( self.circleNodeBehind.circle) aheadMinusBehind.scale(0.5) halfChordWidth = math.sqrt(self.circleNodeAhead.radiusSquared - aheadMinusBehind.length2()) rotatedClockwiseQuarter = euclidean.getRotatedClockwiseQuarterAroundZAxis( aheadMinusBehind) rotatedClockwiseQuarter.scale(halfChordWidth / rotatedClockwiseQuarter.length()) aheadMinusBehind.add(rotatedClockwiseQuarter) return aheadMinusBehind