Exemple #1
0
	def createSkirtLoops(self):
		'Create the skirt loops.'
		points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
		points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
		loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
		outerLoops = getOuterLoops(loops)
		outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.skirtOutset-self.edgeWidth*(self.repository.brimWidth.value+1))
		self.outsetLoops = getOuterLoops(outsetLoops)
		if self.repository.convex.value:
			self.outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(self.outsetLoops))]

		self.outsetBrimLoops = []
		for self.brimLine in xrange( self.repository.brimWidth.value-1, self.brimLine, -1 ):
			points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
			points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
			loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
			outerLoops = getOuterLoops(loops)
			outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.edgeWidth*(self.brimLine+0.5))
			outsetLoops = getOuterLoops(outsetLoops)
			if self.repository.convex.value:
				outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(outsetLoops))]
			self.outsetBrimLoops += outsetLoops
	
		if self.repository.brimWidth.value > 0:	
			points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
			points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
			loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
			outerLoops = getOuterLoops(loops)
			outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.edgeWidth*0.5)
			outsetLoops = getOuterLoops(outsetLoops)
			if self.repository.convex.value:
				outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(outsetLoops))]
			self.outsetBrimLoops += outsetLoops
Exemple #2
0
	def createSkirtLoops(self):
		'Create the skirt loops.'
		points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
		points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
		loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
		outerLoops = getOuterLoops(loops)
		outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.skirtOutset-self.edgeWidth*(self.repository.brimWidth.value+1))
		self.outsetLoops = getOuterLoops(outsetLoops)
		if self.repository.convex.value:
			self.outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(self.outsetLoops))]
	
		if self.repository.brimWidth.value > 0:	
			points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
			points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
			loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
			outerLoops = getOuterLoops(loops)
			outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.edgeWidth*0.5)
			outsetLoops = getOuterLoops(outsetLoops)
			if self.repository.convex.value:
				outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(outsetLoops))]
			self.outsetBrimLoops = outsetLoops

		for self.brimLine in xrange(self.brimLine+1,self.repository.brimWidth.value):
			points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
			points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
			loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
			outerLoops = getOuterLoops(loops)
			outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.edgeWidth*(self.brimLine+0.5))
			outsetLoops = getOuterLoops(outsetLoops)
			if self.repository.convex.value:
				outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(outsetLoops))]
			self.outsetBrimLoops += outsetLoops
Exemple #3
0
def getManipulatedPaths(close, loop, prefix, sideLength, xmlElement):
    "Get path with overhangs removed or filled in."
    if len(loop) < 4:
        return [loop]
    loopComplex = euclidean.getComplexPath(loop)
    return euclidean.getVector3Paths([euclidean.getLoopConvex(loopComplex)],
                                     loop[0].z)
Exemple #4
0
 def createSkirtLoops(self):
     "Create the skirt loops."
     points = euclidean.getPointsByHorizontalDictionary(self.perimeterWidth, self.unifiedLoop.horizontalDictionary)
     points += euclidean.getPointsByVerticalDictionary(self.perimeterWidth, self.unifiedLoop.verticalDictionary)
     loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.perimeterWidth)
     outerLoops = getOuterLoops(loops)
     outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.skirtOutset)
     self.outsetLoops = getOuterLoops(outsetLoops)
     if self.repository.convex.value:
         self.outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(self.outsetLoops))]
Exemple #5
0
	def createSkirtLoops(self):
		'Create the skirt loops.'
		points = euclidean.getPointsByHorizontalDictionary(self.perimeterWidth, self.unifiedLoop.horizontalDictionary)
		points += euclidean.getPointsByVerticalDictionary(self.perimeterWidth, self.unifiedLoop.verticalDictionary)
		loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.perimeterWidth)
		outerLoops = getOuterLoops(loops)
		outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(-self.skirtOutset, outerLoops)
		self.outsetLoops = getOuterLoops(outsetLoops)
		if self.repository.convex.value:
			self.outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(self.outsetLoops))]
Exemple #6
0
 def getOutsetLoops(self, outerLoops, distance, convex):
     outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(
         outerLoops, distance)
     outsetLoops = getOuterLoops(outsetLoops)
     if convex:
         outsetLoops = [
             euclidean.getLoopConvex(
                 euclidean.getConcatenatedList(outsetLoops))
         ]
     return outsetLoops
Exemple #7
0
	def createSkirtLoops(self):
		'Create the skirt loops.'
		points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
		points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
		loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
		outerLoops = getOuterLoops(loops)
		self.outsetLoops = []
		for i in xrange(self.repository.skirtLineCount.value, 0, -1):
			outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(outerLoops, -self.skirtOutset - i * self.edgeWidth)
			outsetLoops = getOuterLoops(outsetLoops)
			if self.repository.convex.value:
				outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(outsetLoops))]
			self.outsetLoops.extend(outsetLoops)
Exemple #8
0
 def createSkirtLoops(self):
     'Create the skirt loops.'
     points = euclidean.getPointsByHorizontalDictionary(
         self.edgeWidth, self.unifiedLoop.horizontalDictionary)
     points += euclidean.getPointsByVerticalDictionary(
         self.edgeWidth, self.unifiedLoop.verticalDictionary)
     loops = triangle_mesh.getDescendingAreaOrientedLoops(
         points, points, 2.5 * self.edgeWidth)
     outerLoops = getOuterLoops(loops)
     self.outsetLoops = []
     for i in xrange(self.repository.skirtLineCount.value, 0, -1):
         outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(
             outerLoops, -self.skirtOutset - (i - 1) * self.edgeWidth)
         outsetLoops = getOuterLoops(outsetLoops)
         if self.repository.convex.value:
             outsetLoops = [
                 euclidean.getLoopConvex(
                     euclidean.getConcatenatedList(outsetLoops))
             ]
         self.outsetLoops.extend(outsetLoops)
Exemple #9
0
    def createSkirtLoops(self, gap, shellCount):
        'Create the skirt loops.'
        outset = gap + self.edgeWidth

        points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
        points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
        loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
        outerLoops = self.getOuterLoops(loops)

        skirtLoops = []
        for shellNo in xrange(shellCount):
            outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(-(outset + self.edgeWidth * shellNo), outerLoops)
            outsetLoops = self.getOuterLoops(outsetLoops)
            if self.convex:
                outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(outsetLoops))]

            for outsetLoop in outsetLoops:
                skirtLoops.append(outsetLoop + [outsetLoop[0]])

        return skirtLoops
Exemple #10
0
    def createSkirtLoops(self, gap, shellCount):
        "Create the skirt loops."
        outset = gap + self.edgeWidth

        points = euclidean.getPointsByHorizontalDictionary(self.edgeWidth, self.unifiedLoop.horizontalDictionary)
        points += euclidean.getPointsByVerticalDictionary(self.edgeWidth, self.unifiedLoop.verticalDictionary)
        loops = triangle_mesh.getDescendingAreaOrientedLoops(points, points, 2.5 * self.edgeWidth)
        outerLoops = self.getOuterLoops(loops)

        skirtLoops = []
        for shellNo in xrange(shellCount):
            outsetLoops = intercircle.getInsetSeparateLoopsFromLoops(-(outset + self.edgeWidth * shellNo), outerLoops)
            outsetLoops = self.getOuterLoops(outsetLoops)
            if self.convex:
                outsetLoops = [euclidean.getLoopConvex(euclidean.getConcatenatedList(outsetLoops))]

            for outsetLoop in outsetLoops:
                skirtLoops.append(outsetLoop + [outsetLoop[0]])

        return skirtLoops
Exemple #11
0
def getManipulatedPaths(close, elementNode, loop, prefix, sideLength):
	"Get path with overhangs removed or filled in."
	if len(loop) < 4:
		return [loop]
	loopComplex = euclidean.getComplexPath(loop)
	return euclidean.getVector3Paths([euclidean.getLoopConvex(loopComplex)], loop[0].z)