Skip to content

Instantly share code, notes, and snippets.

@ken26u
Created May 9, 2020 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ken26u/38c65be1ced681df0999e72f53c03b06 to your computer and use it in GitHub Desktop.
Save ken26u/38c65be1ced681df0999e72f53c03b06 to your computer and use it in GitHub Desktop.
Sverchok.0.6.0.0 (e3fc7a5) | Blender.2.82(sub7) | ScriptSimpleCurve | 2020.05.10 | 02:54
{
"export_version": "0.079",
"framed_nodes": {},
"groups": {},
"nodes": {
"A Number": {
"bl_idname": "SvNumberNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
-428.7747802734375,
-66.73749542236328
],
"params": {
"float_": 5.429999828338623,
"float_draft_": 0.0,
"int_": 3,
"int_draft_": 0,
"selected_mode": "float"
},
"width": 140.0
},
"Evaluate Curve": {
"bl_idname": "SvExEvalCurveNode",
"height": 100.0,
"hide": false,
"label": "",
"location": [
-47.01112747192383,
19.92635154724121
],
"params": {
"sample_size": 4
},
"width": 140.0
},
"Scripted Node Lite": {
"bl_idname": "SvScriptNodeLite",
"color": [
0.0,
0.800000011920929,
0.949999988079071
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-248.2970733642578,
-13.921524047851562
],
"params": {
"halt_updates": 0,
"inject_params": 0,
"injected_state": 0,
"script_name": "Text",
"script_str": "\"\"\"\nin a s\nout curve_out C\n\"\"\"\n\nfrom sverchok.utils.curve import SvCurve\n\nimport numpy as np\n\nclass MyCurve(SvCurve):\n def __init__(self, a):\n self.point = np.array([0, 0, 0])\n self.direction = np.array([1, 1, 1])\n self.u_bounds = (0.0, 1.0)\n self.t = a\n def evaluate(self, t):\n print(t)\n return self.point + t * self.direction\n \n def get_u_bounds(self):\n return self.u_bounds\n \n def evaluate_array(self, ts):\n ts = ts[np.newaxis].T\n return self.point + ts * self.direction\n\ncurve_out = []\nfor hs in a:\n for h in hs:\n c = MyCurve(a)\n curve_out.append(c)\n\n "
},
"snlite_ui": [],
"use_custom_color": true,
"width": 140.0
},
"Viewer Draw Mk3": {
"bl_idname": "SvVDExperimental",
"color": [
1.0,
0.5889999866485596,
0.21400000154972076
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
152.98887634277344,
19.92635154724121
],
"params": {},
"use_custom_color": true,
"width": 140.0
}
},
"update_lists": [
[
"A Number",
0,
"Scripted Node Lite",
0
],
[
"Scripted Node Lite",
0,
"Evaluate Curve",
0
],
[
"Evaluate Curve",
0,
"Viewer Draw Mk3",
0
],
[
"Evaluate Curve",
1,
"Viewer Draw Mk3",
1
]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment