Skip to content

Instantly share code, notes, and snippets.

@portnov
Created December 24, 2019 19:25
Show Gist options
  • Save portnov/a66cd00fb657cb4cce8be9b282e410bb to your computer and use it in GitHub Desktop.
Save portnov/a66cd00fb657cb4cce8be9b282e410bb to your computer and use it in GitHub Desktop.
to do later? 2018
{
"export_version": "0.079",
"framed_nodes": {},
"groups": {},
"nodes": {
"Extrude Region": {
"bl_idname": "SvExtrudeRegionNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
-185.30386352539062,
159.770751953125
],
"params": {
"height_": 1.0,
"multiple": 1,
"transform_mode": "Normal"
},
"width": 140.0
},
"Flip normals": {
"bl_idname": "SvFlipNormalsNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
-405.3038635253906,
90.83133697509766
],
"params": {
"reverse": 1
},
"width": 140.0
},
"Inset faces": {
"bl_idname": "SvInsetFaces",
"height": 100.0,
"hide": false,
"label": "",
"location": [
2064.44921875,
450.7556457519531
],
"params": {
"depth": 0.5099999904632568
},
"width": 161.94476318359375
},
"Inset faces.001": {
"bl_idname": "SvInsetFaces",
"height": 100.0,
"hide": false,
"label": "",
"location": [
933.0387573242188,
341.3890686035156
],
"params": {
"depth": -0.08999999612569809,
"inset_type": "region",
"thickness": 0.07000000029802322
},
"width": 140.0
},
"Inset faces.002": {
"bl_idname": "SvInsetFaces",
"height": 100.0,
"hide": false,
"label": "",
"location": [
2447.05419921875,
725.8543701171875
],
"params": {
"depth": -0.0899999737739563,
"thickness": 0.009999999776482582
},
"width": 140.0
},
"List Mask (out)": {
"bl_idname": "MaskListNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
1836.0975341796875,
-87.83818054199219
],
"params": {
"Level": 2
},
"width": 140.0
},
"Logic functions": {
"bl_idname": "SvLogicNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
323.0208740234375,
370.9883728027344
],
"params": {
"items_": "NOT"
},
"width": 140.0
},
"Logic functions.001": {
"bl_idname": "SvLogicNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
712.7415161132812,
401.10186767578125
],
"params": {
"i_y": 3.0,
"items_": "BIG_EQ"
},
"width": 140.0
},
"Logic functions.002": {
"bl_idname": "SvLogicNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
1391.0347900390625,
-57.84226608276367
],
"params": {
"items_": "NOT"
},
"width": 140.0
},
"Logic functions.003": {
"bl_idname": "SvLogicNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
1183.6627197265625,
562.3836059570312
],
"params": {
"i_y": 4.0,
"items_": "BIG_EQ"
},
"width": 140.0
},
"Matrix in": {
"bl_idname": "SvMatrixGenNodeMK2",
"custom_socket_props": {
"0": {
"expanded": true
}
},
"height": 100.0,
"hide": false,
"label": "",
"location": [
2072.29541015625,
651.079833984375
],
"params": {
"l_": [
0.0,
0.0,
0.5
]
},
"width": 140.0
},
"Reroute": {
"bl_idname": "NodeReroute",
"height": 100.0,
"hide": false,
"label": "",
"location": [
1934.58056640625,
305.89453125
],
"params": {},
"width": 16.0
},
"Reroute.001": {
"bl_idname": "NodeReroute",
"height": 100.0,
"hide": false,
"label": "",
"location": [
1713.1832275390625,
-58.25978088378906
],
"params": {},
"width": 16.0
},
"Reroute.002": {
"bl_idname": "NodeReroute",
"height": 100.0,
"hide": false,
"label": "",
"location": [
869.0874633789062,
176.5408935546875
],
"params": {},
"width": 16.0
},
"Reroute.003": {
"bl_idname": "NodeReroute",
"height": 100.0,
"hide": false,
"label": "",
"location": [
876.3077392578125,
205.45492553710938
],
"params": {},
"width": 16.0
},
"Reroute.004": {
"bl_idname": "NodeReroute",
"height": 100.0,
"hide": false,
"label": "",
"location": [
850.005126953125,
138.8494415283203
],
"params": {},
"width": 16.0
},
"Reroute.005": {
"bl_idname": "NodeReroute",
"height": 100.0,
"hide": false,
"label": "",
"location": [
1132.28515625,
336.4284362792969
],
"params": {},
"width": 16.0
},
"Reroute.006": {
"bl_idname": "NodeReroute",
"height": 100.0,
"hide": false,
"label": "",
"location": [
1130.394287109375,
366.8914489746094
],
"params": {},
"width": 16.0
},
"Ring": {
"bl_idname": "SvRingNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
-667.5492553710938,
-2.735888719558716
],
"params": {
"mode": "EXT_INT",
"ring_R": 1.5399999618530273,
"ring_eR": 2.359999895095825,
"ring_iR": 0.7199999690055847,
"ring_n1": 33,
"ring_n2": 6,
"ring_r": 0.8199999928474426
},
"width": 170.0
},
"Scripted Node Lite": {
"bl_idname": "SvScriptNodeLite",
"color": [
0.0,
0.800000011920929,
0.949999988079071
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
526.463134765625,
432.2997741699219
],
"params": {
"inject_params": 0,
"injected_state": 0,
"script_name": "wave.py",
"script_str": "\"\"\"\nin in_verts v\nin in_faces s\nin in_face_mask s\nout out_face_data s\n\"\"\"\n\nfrom sverchok.data_structure import zip_long_repeat\nfrom sverchok.utils.sv_bmesh_utils import bmesh_from_pydata, wave_markup_faces\n\nout_face_data = []\nobjects = zip_long_repeat(in_verts, in_faces, in_face_mask)\nfor verts, faces, face_mask in objects:\n bm = bmesh_from_pydata(verts, [], faces, normal_update=True)\n new_face_data = wave_markup_faces(bm, face_mask)\n \n bm.free()\n out_face_data.append(new_face_data)\n"
},
"snlite_ui": [],
"use_custom_color": true,
"width": 140.0
},
"Scripted Node Lite.001": {
"bl_idname": "SvScriptNodeLite",
"color": [
0.0,
0.800000011920929,
0.949999988079071
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1529.86083984375,
203.1690216064453
],
"params": {
"inject_params": 0,
"injected_state": 0,
"script_name": "turtle_test_4.py",
"script_str": "\"\"\"\nin in_verts v\nin in_faces s\nin in_face_mask s\nout out_face_mask s\n\"\"\"\n\nimport random\n\nfrom sverchok.data_structure import zip_long_repeat\nfrom sverchok.utils.sv_bmesh_utils import bmesh_from_pydata\nfrom sverchok.utils.logging import info, debug\nfrom sverchok.utils.turtle import Turtle\n\nout_face_mask = []\nobjects = zip_long_repeat(in_verts, in_faces, in_face_mask)\nfor verts, faces, face_mask in objects:\n \n bm = bmesh_from_pydata(verts, [], faces, normal_update=True)\n bm.verts.ensure_lookup_table()\n bm.faces.ensure_lookup_table()\n \n init_faces = set([face.index for face, mask in zip(bm.faces, face_mask) if mask]) \n init_face_index = list(init_faces)[0]\n turtle = Turtle(bm)\n turtle.current_face = bm.faces[init_face_index]\n turtle.current_loop = turtle.current_face.loops[0]\n info(\"Init: %s\", turtle.current_face)\n \n while True:\n next_face = turtle.get_next_face()\n info(\"Next: %s\", next_face)\n if next_face.index in init_faces:\n break\n turtle.turn_next()\n \n turtle.start_selecting(Turtle.MASK, [0,0, 1])\n while True:\n turtle.step()\n if turtle.was_here:\n break\n\n new_face_mask = turtle.get_selection_mask()\n bm.free()\n out_face_mask.append(new_face_mask)\n print(\"Done\")"
},
"snlite_ui": [],
"use_custom_color": true,
"width": 140.0
},
"Scripted Node Lite.002": {
"bl_idname": "SvScriptNodeLite",
"color": [
0.0,
0.800000011920929,
0.949999988079071
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1510.7784423828125,
606.2640991210938
],
"params": {
"inject_params": 0,
"injected_state": 0,
"script_name": "turtle_test_4.py",
"script_str": "\"\"\"\nin in_verts v\nin in_faces s\nin in_face_mask s\nout out_face_mask s\n\"\"\"\n\nimport random\n\nfrom sverchok.data_structure import zip_long_repeat\nfrom sverchok.utils.sv_bmesh_utils import bmesh_from_pydata\nfrom sverchok.utils.logging import info, debug\nfrom sverchok.utils.turtle import Turtle\n\nout_face_mask = []\nobjects = zip_long_repeat(in_verts, in_faces, in_face_mask)\nfor verts, faces, face_mask in objects:\n \n bm = bmesh_from_pydata(verts, [], faces, normal_update=True)\n bm.verts.ensure_lookup_table()\n bm.faces.ensure_lookup_table()\n \n init_faces = set([face.index for face, mask in zip(bm.faces, face_mask) if mask]) \n init_face_index = list(init_faces)[0]\n turtle = Turtle(bm)\n turtle.current_face = bm.faces[init_face_index]\n turtle.current_loop = turtle.current_face.loops[0]\n info(\"Init: %s\", turtle.current_face)\n \n while True:\n next_face = turtle.get_next_face()\n info(\"Next: %s\", next_face)\n if next_face.index in init_faces:\n break\n turtle.turn_next()\n \n turtle.start_selecting(Turtle.MASK, [0,0, 1])\n while True:\n turtle.step()\n if turtle.was_here:\n break\n\n new_face_mask = turtle.get_selection_mask()\n bm.free()\n out_face_mask.append(new_face_mask)\n print(\"Done\")"
},
"snlite_ui": [],
"use_custom_color": true,
"width": 140.0
},
"Select mesh elements by location": {
"bl_idname": "SvMeshSelectNode",
"custom_socket_props": {
"3": {
"expanded": true,
"prop": [
0.0,
0.0,
1.0
],
"use_prop": true
},
"4": {
"prop": [
0.0,
0.0,
0.0
],
"use_prop": true
}
},
"height": 100.0,
"hide": false,
"label": "",
"location": [
66.04736328125,
461.1386413574219
],
"params": {
"mode": "ByNormal"
},
"width": 179.9995574951172
},
"Select mesh elements by location.001": {
"bl_idname": "SvMeshSelectNode",
"custom_socket_props": {
"3": {
"expanded": true,
"prop": [
0.0,
0.0,
1.0
],
"use_prop": true
},
"4": {
"expanded": true,
"prop": [
0.0,
0.0,
0.0
],
"use_prop": true
}
},
"height": 100.0,
"hide": false,
"label": "",
"location": [
1204.708984375,
91.92218017578125
],
"params": {
"include_partial": 1,
"mode": "ByCylinder",
"percent": 3.190000057220459,
"radius": 2.3499999046325684
},
"width": 179.9995574951172
},
"Symmetrize Mesh": {
"bl_idname": "SvSymmetrizeNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
2807.75830078125,
661.6774291992188
],
"params": {
"direction": "+Z-Z"
},
"width": 140.0
},
"Viewer Draw Mk3": {
"bl_idname": "SvVDExperimental",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
3050.968505859375,
777.060302734375
],
"params": {
"activate": 0,
"selected_draw_mode": "facet"
},
"use_custom_color": true,
"width": 140.0
},
"Viewer Index+": {
"bl_idname": "SvIDXViewer28",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
2281.614013671875,
105.73613739013672
],
"params": {
"activate": 0,
"display_face_index": 1,
"display_vert_index": 0,
"draw_bface": 0
},
"use_custom_color": true,
"width": 140.0
}
},
"update_lists": [
[
"Ring",
0,
"Flip normals",
0
],
[
"Ring",
1,
"Flip normals",
1
],
[
"Ring",
2,
"Flip normals",
2
],
[
"Flip normals",
0,
"Extrude Region",
0
],
[
"Flip normals",
1,
"Extrude Region",
1
],
[
"Flip normals",
2,
"Extrude Region",
2
],
[
"Extrude Region",
0,
"Select mesh elements by location",
0
],
[
"Extrude Region",
2,
"Select mesh elements by location",
2
],
[
"Select mesh elements by location",
2,
"Logic functions",
0
],
[
"Extrude Region",
0,
"Scripted Node Lite",
0
],
[
"Extrude Region",
2,
"Scripted Node Lite",
1
],
[
"Logic functions",
0,
"Scripted Node Lite",
2
],
[
"Scripted Node Lite",
0,
"Logic functions.001",
0
],
[
"Logic functions.001",
"Gate",
"Reroute.004",
"Input"
],
[
"Extrude Region",
"Vertices",
"Reroute.003",
"Input"
],
[
"Extrude Region",
"Polygons",
"Reroute.002",
"Input"
],
[
"Reroute.003",
"Output",
"Inset faces.001",
"Verts"
],
[
"Reroute.002",
"Output",
"Inset faces.001",
"Faces"
],
[
"Scripted Node Lite",
0,
"Inset faces.001",
3
],
[
"Reroute.004",
"Output",
"Inset faces.001",
"Face mask"
],
[
"Inset faces.001",
"Faces",
"Reroute.005",
"Input"
],
[
"Inset faces.001",
"Verts",
"Reroute.006",
"Input"
],
[
"Reroute.006",
"Output",
"Select mesh elements by location.001",
"Vertices"
],
[
"Reroute.005",
"Output",
"Select mesh elements by location.001",
"Polygons"
],
[
"Select mesh elements by location.001",
2,
"Logic functions.002",
0
],
[
"Reroute.005",
"Output",
"Reroute.001",
"Input"
],
[
"Reroute.006",
"Output",
"Scripted Node Lite.001",
"in_verts"
],
[
"Reroute.005",
"Output",
"Scripted Node Lite.001",
"in_faces"
],
[
"Logic functions.002",
0,
"Scripted Node Lite.001",
2
],
[
"Reroute.006",
"Output",
"Reroute",
"Input"
],
[
"Reroute",
"Output",
"Inset faces",
"Verts"
],
[
"Reroute.001",
"Output",
"Inset faces",
"Faces"
],
[
"Scripted Node Lite.001",
0,
"Inset faces",
4
],
[
"Inset faces.001",
3,
"Logic functions.003",
0
],
[
"Reroute.006",
"Output",
"Scripted Node Lite.002",
"in_verts"
],
[
"Reroute.005",
"Output",
"Scripted Node Lite.002",
"in_faces"
],
[
"Logic functions.003",
0,
"Scripted Node Lite.002",
2
],
[
"Inset faces",
0,
"Inset faces.002",
0
],
[
"Inset faces",
1,
"Inset faces.002",
1
],
[
"Inset faces",
2,
"Inset faces.002",
2
],
[
"Scripted Node Lite.002",
0,
"Inset faces.002",
4
],
[
"Inset faces.002",
0,
"Symmetrize Mesh",
0
],
[
"Inset faces.002",
1,
"Symmetrize Mesh",
1
],
[
"Inset faces.002",
2,
"Symmetrize Mesh",
2
],
[
"Matrix in",
0,
"Symmetrize Mesh",
4
],
[
"Symmetrize Mesh",
0,
"Viewer Draw Mk3",
0
],
[
"Symmetrize Mesh",
2,
"Viewer Draw Mk3",
2
],
[
"Reroute.001",
"Output",
"List Mask (out)",
"data"
],
[
"Scripted Node Lite.001",
0,
"List Mask (out)",
1
],
[
"Reroute",
"Output",
"Viewer Index+",
"verts"
],
[
"Reroute.001",
"Output",
"Viewer Index+",
"faces"
]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment