def getWidenedLoop(loop, loopList, outsetLoop, radius): 'Get the widened loop.' intersectingWithinLoops = getIntersectingWithinLoops(loop, loopList, outsetLoop) if len(intersectingWithinLoops) < 1: return loop loopsUnified = boolean_solid.getLoopsUnified(radius, [[loop], intersectingWithinLoops]) if len(loopsUnified) < 1: return loop return euclidean.getLargestLoop(loopsUnified)
def getWidenedLoop(loop, loopList, outsetLoop, radius): "Get the widened loop." intersectingWithinLoops = getIntersectingWithinLoops( loop, loopList, outsetLoop) if len(intersectingWithinLoops) < 1: return loop loopsUnified = boolean_solid.getLoopsUnified( radius, [[loop], intersectingWithinLoops]) if len(loopsUnified) < 1: return loop return euclidean.getLargestLoop(loopsUnified)
def getEmptyZLoops(archivableObjects, importRadius, shouldPrintWarning, z, zoneArrangement): """Get loops at empty z level.""" emptyZ = zoneArrangement.getEmptyZ(z) visibleObjects = evaluate.getVisibleObjects(archivableObjects) visibleObjectLoopsList = boolean_solid.getVisibleObjectLoopsList(importRadius, visibleObjects, emptyZ) loops = euclidean.getConcatenatedList(visibleObjectLoopsList) if euclidean.isLoopListIntersecting(loops): loops = boolean_solid.getLoopsUnified(importRadius, visibleObjectLoopsList) if shouldPrintWarning: print('Warning, the triangle mesh slice intersects itself in getExtruderPaths in boolean_geometry.') print( 'Something will still be printed, but there is no guarantee that it will be the correct shape.' ) print('Once the gcode is saved, you should check over the layer with a z of:') print(z) return loops
def getEmptyZExtruderPaths( self, shouldPrintWarning, z ): 'Get extruder loops.' z = triangle_mesh.getEmptyZ(self, z) rotatedLoopLayer = euclidean.RotatedLoopLayer(z) visibleObjectLoopsList = boolean_solid.getVisibleObjectLoopsList( self.importRadius, evaluate.getVisibleObjects(self.archivableObjects), z ) rotatedLoopLayer.loops = euclidean.getConcatenatedList( visibleObjectLoopsList ) if euclidean.isLoopListIntersecting(rotatedLoopLayer.loops): rotatedLoopLayer.loops = boolean_solid.getLoopsUnified(self.importRadius, visibleObjectLoopsList) if shouldPrintWarning: print('Warning, the triangle mesh slice intersects itself in getExtruderPaths in boolean_geometry.') print( 'Something will still be printed, but there is no guarantee that it will be the correct shape.' ) print('Once the gcode is saved, you should check over the layer with a z of:') print(z) return rotatedLoopLayer
def getEmptyZLoops(archivableObjects, importRadius, shouldPrintWarning, z, zoneArrangement): 'Get loops at empty z level.' emptyZ = zoneArrangement.getEmptyZ(z) visibleObjects = evaluate.getVisibleObjects(archivableObjects) visibleObjectLoopsList = boolean_solid.getVisibleObjectLoopsList( importRadius, visibleObjects, emptyZ) loops = euclidean.getConcatenatedList(visibleObjectLoopsList) if euclidean.isLoopListIntersecting(loops): loops = boolean_solid.getLoopsUnified(importRadius, visibleObjectLoopsList) if shouldPrintWarning: print( 'Warning, the triangle mesh slice intersects itself in getExtruderPaths in boolean_geometry.' ) print( 'Something will still be printed, but there is no guarantee that it will be the correct shape.' ) print( 'Once the gcode is saved, you should check over the layer with a z of:' ) print(z) return loops