示例#1
0
	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
示例#2
0
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
示例#3
0
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
示例#4
0
 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