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
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
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)
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))]
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))]
def getOutsetLoops(self, outerLoops, distance, convex): outsetLoops = intercircle.getInsetSeparateLoopsFromLoops( outerLoops, distance) outsetLoops = getOuterLoops(outsetLoops) if convex: outsetLoops = [ euclidean.getLoopConvex( euclidean.getConcatenatedList(outsetLoops)) ] return outsetLoops
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)
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)
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
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
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)