def getWidenedLoop( loop, loopList, outsetLoop, radius ): "Get the widened loop." intersectingWithinLoops = getIntersectingWithinLoops( loop, loopList, outsetLoop ) if len( intersectingWithinLoops ) < 1: return loop loopsUnified = booleansolid.getLoopsUnified( radius, [ [loop], intersectingWithinLoops ] ) if len( loopsUnified ) < 1: return loop return euclidean.getLargestLoop( loopsUnified )
def getExtruderPaths( self, shouldPrintWarning, z ): "Get extruder loops." rotatedBoundaryLayer = euclidean.RotatedLoopLayer( z ) visibleObjectLoopsList = booleansolid.getVisibleObjectLoopsList( self.importRadius, evaluate.getVisibleObjects( self.archivableObjects ), z ) rotatedBoundaryLayer.loops = euclidean.getConcatenatedList( visibleObjectLoopsList ) if euclidean.isLoopListIntersecting( rotatedBoundaryLayer.loops, z ): rotatedBoundaryLayer.loops = booleansolid.getLoopsUnified( self.importRadius, visibleObjectLoopsList ) if shouldPrintWarning: print('Warning, the triangle mesh slice intersects itself.') 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 rotatedBoundaryLayer
def getEmptyZExtruderPaths( self, shouldPrintWarning, z ): "Get extruder loops." z = trianglemesh.getEmptyZ(self, z) rotatedBoundaryLayer = euclidean.RotatedLoopLayer(z) visibleObjectLoopsList = booleansolid.getVisibleObjectLoopsList( self.importRadius, evaluate.getVisibleObjects(self.archivableObjects), z ) rotatedBoundaryLayer.loops = euclidean.getConcatenatedList( visibleObjectLoopsList ) if euclidean.isLoopListIntersecting(rotatedBoundaryLayer.loops): rotatedBoundaryLayer.loops = booleansolid.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 rotatedBoundaryLayer