{
  "export_version": "0.072",
  "framed_nodes": {
    "Centers polygons 3": "Frame.004",
    "Circle": "Frame.003",
    "Cylinder": "Frame.004",
    "Frame.001": "Frame",
    "Frame.002": "Frame",
    "Frame.003": "Frame",
    "Frame.004": "Frame",
    "List Length": "Frame.004",
    "Matrix Apply": "Frame.003",
    "Note": "Frame",
    "Polygon Boom": "Frame.002",
    "Range Float": "Frame.003",
    "Range Int": "Frame.003",
    "Reroute": "Frame",
    "Reroute.001": "Frame",
    "Scripted Node Lite": "Frame.001",
    "Viewer Draw": "Frame"
  },
  "groups": {},
  "nodes": {
    "Centers polygons 3": {
      "bl_idname": "CentersPolsNodeMK3",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        151.7725760936737,
        493.4723358154297
      ],
      "params": {
        "Separate": 1
      },
      "width": 100.0
    },
    "Circle": {
      "bl_idname": "SvCircleNode",
      "color": [
        0.0,
        0.5,
        0.5
      ],
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        167.457763671875,
        172.73373413085938
      ],
      "params": {
        "rad_": 0.10600003600120544,
        "vert_": 12
      },
      "use_custom_color": true,
      "width": 140.0
    },
    "Cylinder": {
      "bl_idname": "CylinderNode",
      "color": [
        0.0,
        0.5,
        0.5
      ],
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        -198.92467427253723,
        492.9993133544922
      ],
      "params": {
        "cap_": 1,
        "radBot_": 3.0,
        "radTop_": 2.0,
        "vert_": 8
      },
      "use_custom_color": true,
      "width": 140.0
    },
    "Frame": {
      "bl_idname": "NodeFrame",
      "color": [
        0.1127164363861084,
        0.1283397376537323,
        0.6080000996589661
      ],
      "height": 736.830810546875,
      "hide": false,
      "label": "",
      "location": [
        0.0,
        60.0
      ],
      "params": {},
      "use_custom_color": true,
      "width": 1302.7686767578125
    },
    "Frame.001": {
      "bl_idname": "NodeFrame",
      "color": [
        0.20882950723171234,
        0.7706804275512695,
        1.0
      ],
      "height": 247.59854125976562,
      "hide": false,
      "label": "one hole",
      "location": [
        -221.4429473876953,
        119.83309936523438
      ],
      "params": {},
      "use_custom_color": true,
      "width": 274.74200439453125
    },
    "Frame.002": {
      "bl_idname": "NodeFrame",
      "color": [
        0.6080001592636108,
        0.12700000405311584,
        0.5906147360801697
      ],
      "height": 173.93081665039062,
      "hide": false,
      "label": "poligon per poligon",
      "location": [
        0.0,
        84.24474334716797
      ],
      "params": {},
      "use_custom_color": true,
      "width": 160.35296630859375
    },
    "Frame.003": {
      "bl_idname": "NodeFrame",
      "color": [
        0.6079999804496765,
        0.6079999804496765,
        0.6079999804496765
      ],
      "height": 360.2255859375,
      "hide": false,
      "label": "on every poligon circle",
      "location": [
        85.61787414550781,
        219.57968139648438
      ],
      "params": {},
      "use_custom_color": true,
      "width": 539.662353515625
    },
    "Frame.004": {
      "bl_idname": "NodeFrame",
      "color": [
        1.0,
        1.0,
        1.0
      ],
      "height": 292.2958984375,
      "hide": false,
      "label": "squeres with centers",
      "location": [
        3.672997236251831,
        129.91368103027344
      ],
      "params": {},
      "use_custom_color": true,
      "width": 511.0502014160156
    },
    "List Length": {
      "bl_idname": "ListLengthNode",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        -10.994446992874146,
        380.3145751953125
      ],
      "params": {},
      "width": 100.0
    },
    "Matrix Apply": {
      "bl_idname": "SvMatrixApplyJoinNode",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        365.7973175048828,
        179.16677856445312
      ],
      "params": {
        "do_join": 0
      },
      "width": 100.0
    },
    "Note": {
      "bl_idname": "NoteNode",
      "color": [
        0.5,
        0.5,
        1.0
      ],
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        572.7691040039062,
        525.5955200195312
      ],
      "params": {
        "text": "nikitron 2018 - script node light - holes example for imitating boolean 2d operation with no intersection"
      },
      "use_custom_color": true,
      "width": 400.0
    },
    "Polygon Boom": {
      "bl_idname": "PolygonBoomNode",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        375.6488037109375,
        381.4602279663086
      ],
      "params": {},
      "width": 100.0
    },
    "Range Float": {
      "bl_idname": "SvGenFloatRange",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        -12.812522888183594,
        167.19830322265625
      ],
      "params": {
        "count_": 25,
        "mode": "FRANGE_COUNT",
        "start_": 0.4899999797344208,
        "stop_": 0.9319999814033508
      },
      "width": 140.0
    },
    "Range Int": {
      "bl_idname": "GenListRangeIntNode",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        -13.512138366699219,
        19.006927490234375
      ],
      "params": {
        "mode": "COUNTRANGE",
        "start_": 4
      },
      "width": 140.0
    },
    "Reroute": {
      "bl_idname": "NodeReroute",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        66.13886260986328,
        442.0242004394531
      ],
      "params": {},
      "width": 16.0
    },
    "Reroute.001": {
      "bl_idname": "NodeReroute",
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        82.99327850341797,
        477.8207702636719
      ],
      "params": {},
      "width": 16.0
    },
    "Scripted Node Lite": {
      "bl_idname": "SvScriptNodeLite",
      "color": [
        0.0,
        0.800000011920929,
        0.949999988079071
      ],
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        579.6314544677734,
        305.8338623046875
      ],
      "params": {
        "inject_params": 0,
        "injected_state": 0,
        "script_name": "hole_in_ordered_poligon.py",
        "script_str": "\"\"\"\nin verts_A v\nin edges_A s\nin verts_B v\nin edges_B s\nout verts v\nout faces s\n\"\"\" \n\nfrom mathutils import Vector\nfrom sverchok.nodes.modifier_change.polygons_to_edges import pols_edges\n# for sure this can be made in two lines of code\n# i.e. a - circle 24 verts, b - triangle 3 verts (27 length)\n\n\ndef order(verts, edges, verts_o,k):\n    for i in edges:\n        if k in i:\n            # this is awesome !!\n            k = i[int(not i.index(k))]\n            verts_o.append(verts[k])\n            return k, i\n    return False, False\n\nif verts_A and verts_B and edges_A and edges_B:\n\n\n    # pols2edges\n    if len(edges_A[0][0]) > 2:\n        edges_A = pols_edges(edges_A, unique_edges=True)\n    if len(edges_B[0][0]) > 2:\n        edges_B = pols_edges(edges_B, unique_edges=True)\n\n\n    # ordering sort edges chain\n    def ordering(in_verts, in_edges):\n        ed = 1\n        vout = []\n        for edges, verts in zip(in_edges, in_verts):\n            verts_o = []\n            k = 0\n            while True:\n                k, ed = order(verts, edges, verts_o,k)\n                if ed:\n                    edges.remove(ed)\n                if not ed:\n                    break\n            vout.append(verts_o)\n        return vout\n\n    verts_A = ordering(verts_A,edges_A)\n    verts_B = ordering(verts_B,edges_B)\n    # print('>>>>>',verts_A)\n\n\n    # main part\n\n    for va, vb in zip(verts_A,verts_B):\n        # first define closest points to connect\n        length_short = 1000\n        ik_shortest = []\n        i = 0\n        la = len(va) # 24\n        lb = len(vb) # 3\n        for a in va:\n            k = 0\n            for b in vb:\n                vabl = (Vector(a)-Vector(b)).length\n                if length_short > vabl:\n                    length_short = vabl\n                    ik_shortest = [i,k]\n                k+=1\n            i+=1\n        # connection / i.e. k=1 i=12\n        i,k = ik_shortest\n        va_ = va.copy()\n        va_.extend(vb)\n        va_.append(va[i])\n        va_.append(vb[k])\n        verts.append(va_)\n\n        # 25,12\n        fap = [k+la,i]\n        # from i to la / 13...23\n        for t in (range(i+1, la)):\n            fap.append(t)\n        # from 0 to i-1 / 0 to 11\n        for p in (range(i)):\n            fap.append(p)\n        # join both with copy vertices at end / 27 to 28\n        fap.extend([la+lb,la+lb+1])\n        # if equal direction (silently): from k reversed to 0 / 24 only\n        for n in reversed(range(la,k+la)):\n            fap.append(n)\n        # continue from lb to k / only 26\n        for d in reversed(range(k+la+1, lb+la)):\n            fap.append(d)\n        faces.append([fap])"
      },
      "snlite_ui": [],
      "use_custom_color": true,
      "width": 214.38900756835938
    },
    "Viewer Draw": {
      "bl_idname": "ViewerNode2",
      "color": [
        1.0,
        0.30000001192092896,
        0.0
      ],
      "height": 100.0,
      "hide": false,
      "label": "",
      "location": [
        873.3146362304688,
        362.4919738769531
      ],
      "params": {
        "activate": 1,
        "display_faces": 1,
        "display_verts": 0,
        "edge_colors": [
          0.0,
          0.004466313403099775,
          1.0
        ],
        "edge_width": 2,
        "face_colors": [
          0.0,
          0.39016348123550415,
          0.041407130658626556
        ],
        "ngon_tessellate": 1,
        "shading": 1,
        "transparant": 0,
        "vertex_colors": [
          0.09485653787851334,
          0.6600186228752136,
          1.0
        ],
        "vertex_size": 3.0
      },
      "use_custom_color": true,
      "width": 140.0
    }
  },
  "update_lists": [
    [
      "Cylinder",
      "Polygons",
      "Reroute",
      "Input"
    ],
    [
      "Reroute",
      "Output",
      "List Length",
      "Data"
    ],
    [
      "List Length",
      0,
      "Range Float",
      2
    ],
    [
      "List Length",
      0,
      "Range Int",
      2
    ],
    [
      "Range Float",
      0,
      "Circle",
      0
    ],
    [
      "Range Int",
      0,
      "Circle",
      1
    ],
    [
      "Cylinder",
      "Vertices",
      "Reroute.001",
      "Input"
    ],
    [
      "Reroute.001",
      "Output",
      "Centers polygons 3",
      "Vertices"
    ],
    [
      "Reroute",
      "Output",
      "Centers polygons 3",
      "Polygons"
    ],
    [
      "Circle",
      0,
      "Matrix Apply",
      0
    ],
    [
      "Circle",
      1,
      "Matrix Apply",
      1
    ],
    [
      "Circle",
      2,
      "Matrix Apply",
      2
    ],
    [
      "Centers polygons 3",
      3,
      "Matrix Apply",
      3
    ],
    [
      "Reroute.001",
      "Output",
      "Polygon Boom",
      "vertices"
    ],
    [
      "Reroute",
      "Output",
      "Polygon Boom",
      "edg_pol"
    ],
    [
      "Polygon Boom",
      0,
      "Scripted Node Lite",
      0
    ],
    [
      "Polygon Boom",
      1,
      "Scripted Node Lite",
      1
    ],
    [
      "Matrix Apply",
      0,
      "Scripted Node Lite",
      2
    ],
    [
      "Matrix Apply",
      2,
      "Scripted Node Lite",
      3
    ],
    [
      "Scripted Node Lite",
      0,
      "Viewer Draw",
      0
    ],
    [
      "Scripted Node Lite",
      1,
      "Viewer Draw",
      1
    ]
  ]
}