from processing.tools import *

dictLayersClipClean = {}

for layer in dictLayersClip.keys():
    
    if dictLayersClip[layer].featureCount() > 0:
        extent = dictLayersClip[layer].extent()
        xmin = extent.xMinimum()
        xmax = extent.xMaximum()
        ymin = extent.yMinimum()
        ymax = extent.yMaximum()
    
        outputLayer = mainLayerFolder + '\\LayersClipClean\\'+layer+'_Clean.shp'
        general.runalg("grass7:v.clean",\
                            dictLayersClip[layer],\
                            0,\
                            0.1,\
                            "%f , %f, %f, %f "% (xmin , xmax , ymin , ymax),\
                            -1.0,\
                            0.0001,\
                            outputLayer,\
                            None\
                            )
                            
        dictLayersClipClean[layer+'_Clean'] = iface.addVectorLayer(outputLayer , layer+'_Clean', "ogr")