Exemplo n.º 1
0
def getPointsFromSegmentTable( segmentTable ):
	"Get the points from the segment table."
	points = []
	endpoints = euclidean.getEndpointsFromSegmentTable( segmentTable )
	for endpoint in endpoints:
		points.append( endpoint.point )
	return points
Exemplo n.º 2
0
def getPointsFromSegmentTable(segmentTable):
    "Get the points from the segment table."
    points = []
    endpoints = euclidean.getEndpointsFromSegmentTable(segmentTable)
    for endpoint in endpoints:
        points.append(endpoint.point)
    return points
 def getSupportEndpoints(self, layerIndex):
     'Get the support layer segments.'
     if len(self.supportLayers) <= layerIndex:
         return []
     supportSegmentTable = self.supportLayers[layerIndex].supportSegmentTable
     if self.supportCrossHatchNthLayer and (layerIndex + 1) % self.supportCrossHatchNthLayer == 0:
         return getVerticalEndpoints(supportSegmentTable, self.interfaceStep, 0.1 * self.extrusionWidth, self.interfaceStep)
     return euclidean.getEndpointsFromSegmentTable(supportSegmentTable)
def getLoopsBySegmentsDictionary(segmentsDictionary, width):
    'Get loops from a horizontal segments dictionary.'
    points = []
    for endpoint in getVerticalEndpoints(segmentsDictionary, width, 0.1 * width, width):
        points.append(endpoint.point)
    for endpoint in euclidean.getEndpointsFromSegmentTable(segmentsDictionary):
        points.append(endpoint.point)
    return triangle_mesh.getDescendingAreaOrientedLoops(points, points, width + width)
def getLoopsBySegmentsDictionary(segmentsDictionary, width):
    'Get loops from a horizontal segments dictionary.'
    points = []
    for endpoint in getVerticalEndpoints(segmentsDictionary, width,
                                         0.1 * width, width):
        points.append(endpoint.point)
    for endpoint in euclidean.getEndpointsFromSegmentTable(segmentsDictionary):
        points.append(endpoint.point)
    return triangle_mesh.getDescendingAreaOrientedLoops(
        points, points, width + width)
 def getSupportEndpoints(self, layerIndex):
     'Get the support layer segments.'
     if len(self.supportLayers) <= layerIndex:
         return []
     supportSegmentTable = self.supportLayers[
         layerIndex].supportSegmentTable
     if self.supportCrossHatchNthLayer and (
             layerIndex + 1) % self.supportCrossHatchNthLayer == 0:
         return getVerticalEndpoints(supportSegmentTable,
                                     self.interfaceStep,
                                     0.1 * self.extrusionWidth,
                                     self.interfaceStep)
     return euclidean.getEndpointsFromSegmentTable(supportSegmentTable)
Exemplo n.º 7
0
	def addMillThreads(self):
		'Add the mill threads to the skein.'
		boundaryLayer = self.boundaryLayers[self.layerIndex]
		endpoints = euclidean.getEndpointsFromSegmentTable( boundaryLayer.segmentTable )
		if len(endpoints) < 1:
			return
		paths = euclidean.getPathsFromEndpoints(endpoints, 5.0 * self.millWidth, self.aroundPixelTable, self.aroundWidth)
		averageZ = self.average.getAverage()
		if self.repository.addInnerLoops.value:
			self.addGcodeFromLoops( boundaryLayer.innerLoops, averageZ )
		if self.repository.addOuterLoops.value:
			self.addGcodeFromLoops( boundaryLayer.outerLoops, averageZ )
		for path in paths:
			simplifiedPath = euclidean.getSimplifiedPath( path, self.millWidth )
			self.distanceFeedRate.addGcodeFromThreadZ( simplifiedPath, averageZ )
Exemplo n.º 8
0
	def addMillThreads(self):
		'Add the mill threads to the skein.'
		boundaryLayer = self.boundaryLayers[self.layerIndex]
		endpoints = euclidean.getEndpointsFromSegmentTable( boundaryLayer.segmentTable )
		if len(endpoints) < 1:
			return
		paths = euclidean.getPathsFromEndpoints(endpoints, 5.0 * self.millWidth, self.aroundPixelTable, 1.0, self.aroundWidth)
		averageZ = self.average.getAverage()
		if self.repository.addInnerLoops.value:
			self.addGcodeFromLoops( boundaryLayer.innerLoops, averageZ )
		if self.repository.addOuterLoops.value:
			self.addGcodeFromLoops( boundaryLayer.outerLoops, averageZ )
		for path in paths:
			simplifiedPath = euclidean.getSimplifiedPath( path, self.millWidth )
			self.distanceFeedRate.addGcodeFromThreadZ( simplifiedPath, averageZ )