Skip to content

Instantly share code, notes, and snippets.

@zeffii
Created May 4, 2020 13:20
Show Gist options
  • Save zeffii/4fb135429299688770268deb693d8302 to your computer and use it in GitHub Desktop.
Save zeffii/4fb135429299688770268deb693d8302 to your computer and use it in GitHub Desktop.
Sverchok.0.6.0.0 | Blender.2.83(sub15) | NodeTree | 2020.05.04 | 15:20
{
"export_version": "0.079",
"framed_nodes": {},
"groups": {},
"nodes": {
"SN Functor B": {
"bl_idname": "SvSNFunctorB",
"color": [
0.0,
0.5,
0.5
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
360.57513427734375,
313.5634765625
],
"params": {
"float_01": 0.30000001192092896,
"float_02": 0.5,
"float_03": 0.6000000238418579,
"float_04": 0.6000000238418579,
"loaded": 1,
"script_str": "import sverchok\nfrom sverchok.utils.geom import arc_slice\n\ndef functor_init(self, context):\n inew = self.inputs.new\n inew(\"SvStringsSocket\", \"outer radius\").prop_name = \"float_01\"\n inew(\"SvStringsSocket\", \"inner radius\").prop_name = \"float_02\"\n inew(\"SvStringsSocket\", \"angle\").prop_name = \"float_03\"\n inew(\"SvStringsSocket\", \"phase\").prop_name = \"float_04\"\n\n self.outputs.new(\"SvVerticesSocket\", \"verts\")\n self.outputs.new(\"SvStringsSocket\", \"edges\")\n self.outputs.new(\"SvStringsSocket\", \"faces\")\n \n self.float_01 = 0.3\n self.float_02 = 0.5\n self.float_03 = 0.6\n self.float_04 = 0.6 \n\ndef draw_buttons(self, context, layout):\n pass\n\ndef process(self):\n outer_radius = self.inputs['outer radius'].sv_get()[0][0]\n inner_radius = self.inputs['inner radius'].sv_get()[0][0]\n phase = self.inputs['phase'].sv_get()[0][0]\n angle = self.inputs['angle'].sv_get()[0][0]\n\n geom = arc_slice(outer_radius=outer_radius*2.1, inner_radius=inner_radius, phase=phase, angle=angle)\n\n for idx, data in enumerate(geom):\n self.outputs[idx].sv_set([data])"
},
"use_custom_color": true,
"width": 140.0
},
"Viewer Draw Mk3": {
"bl_idname": "SvVDExperimental",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
769.7144165039062,
387.4617004394531
],
"params": {},
"use_custom_color": true,
"width": 140.0
}
},
"update_lists": [
[
"SN Functor B",
0,
"Viewer Draw Mk3",
0
],
[
"SN Functor B",
2,
"Viewer Draw Mk3",
2
]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment