def getCarveRotatedBoundaryLayers( self ): "Get the rotated boundary layers." vertices = evaluate.getVerticesFromArchivableObjects( self.archivableObjects ) if len( vertices ) < 1: return [] self.cornerMaximum = Vector3( - 999999999.0, - 999999999.0, - 9999999999.9 ) self.cornerMinimum = Vector3( 999999999.0, 999999999.0, 9999999999.9 ) for vertex in vertices: self.cornerMaximum.z = max( self.cornerMaximum.z, vertex.z ) self.cornerMinimum.z = min( self.cornerMinimum.z, vertex.z ) halfHeight = 0.5 * self.layerThickness layerTop = self.cornerMaximum.z - halfHeight self.setActualMinimumZ( halfHeight, layerTop ) trianglemesh.initializeZoneIntervalTable( self, vertices ) z = self.cornerMinimum.z + halfHeight while z < layerTop: z = self.getZAddExtruderPaths( z ) for rotatedBoundaryLayer in self.rotatedBoundaryLayers: for loop in rotatedBoundaryLayer.loops: for point in loop: pointVector3 = Vector3( point.real, point.imag, rotatedBoundaryLayer.z ) self.cornerMaximum = euclidean.getPointMaximum( self.cornerMaximum, pointVector3 ) self.cornerMinimum = euclidean.getPointMinimum( self.cornerMinimum, pointVector3 ) self.cornerMaximum.z = layerTop + halfHeight for rotatedBoundaryLayerIndex in xrange( len( self.rotatedBoundaryLayers ) - 1, - 1, - 1 ): rotatedBoundaryLayer = self.rotatedBoundaryLayers[ rotatedBoundaryLayerIndex ] if len( rotatedBoundaryLayer.loops ) > 0: return self.rotatedBoundaryLayers[ : rotatedBoundaryLayerIndex + 1 ] return []
def getCarveRotatedBoundaryLayers(self): "Get the rotated boundary layers." vertices = evaluate.getVerticesFromArchivableObjects( self.archivableObjects) if len(vertices) < 1: return [] self.cornerMaximum = Vector3(-999999999.0, -999999999.0, -9999999999.9) self.cornerMinimum = Vector3(999999999.0, 999999999.0, 9999999999.9) for vertex in vertices: self.cornerMaximum.z = max(self.cornerMaximum.z, vertex.z) self.cornerMinimum.z = min(self.cornerMinimum.z, vertex.z) halfHeight = 0.5 * self.layerThickness layerTop = self.cornerMaximum.z - halfHeight self.setActualMinimumZ(halfHeight, layerTop) trianglemesh.initializeZoneIntervalTable(self, vertices) z = self.cornerMinimum.z + halfHeight while z < layerTop: z = self.getZAddExtruderPaths(z) for rotatedBoundaryLayer in self.rotatedBoundaryLayers: for loop in rotatedBoundaryLayer.loops: for point in loop: pointVector3 = Vector3(point.real, point.imag, rotatedBoundaryLayer.z) self.cornerMaximum = euclidean.getPointMaximum( self.cornerMaximum, pointVector3) self.cornerMinimum = euclidean.getPointMinimum( self.cornerMinimum, pointVector3) self.cornerMaximum.z = layerTop + halfHeight for rotatedBoundaryLayerIndex in xrange( len(self.rotatedBoundaryLayers) - 1, -1, -1): rotatedBoundaryLayer = self.rotatedBoundaryLayers[ rotatedBoundaryLayerIndex] if len(rotatedBoundaryLayer.loops) > 0: return self.rotatedBoundaryLayers[:rotatedBoundaryLayerIndex + 1] return []
def getVertices( self ): "Get all vertices." return evaluate.getVerticesFromArchivableObjects( self.archivableObjects )
def getVertices(self): "Get all vertices." return evaluate.getVerticesFromArchivableObjects( self.archivableObjects)