Skip to content

Commit cccd882

Browse files
committed
updating all definitions to context inputs
1 parent b5c10e1 commit cccd882

File tree

9 files changed

+6
-4
lines changed

9 files changed

+6
-4
lines changed

src/examples/delaunay/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
const data = {
7373
definition: 'delaunay.gh',
7474
inputs: {
75-
'points': [] // start with an empty list (corresponds to "RH_IN:points" input)
75+
'points': [] // start with an empty list (corresponds to "points" input)
7676
}
7777
}
7878

@@ -186,6 +186,8 @@
186186

187187
const values = responseJson.values
188188

189+
console.log(values)
190+
189191
// clear doc
190192
try {
191193
if( doc !== undefined)
@@ -288,7 +290,7 @@
288290
// add json-encoded Point3d to list
289291
// e.g. '{ "X": 1.0, "Y": 2.0, "Z": 0.0 }'
290292
const pt = "{\"X\":"+mouse.x+",\"Y\":"+mouse.y+",\"Z\":"+mouse.z+"}"
291-
// in delaunay.gh the input is "RH_IN:points"
293+
// in delaunay.gh the input is "points"
292294
data.inputs['points'].push(pt)
293295

294296
// don't bother solving until we have three points

src/files/BranchNodeRnd.gh

-3.53 KB
Binary file not shown.

src/files/delaunay.gh

-573 Bytes
Binary file not shown.

src/files/dresser3.gh

6.95 KB
Binary file not shown.

src/files/rnd_lattice.gh

2.94 KB
Binary file not shown.

src/files/rnd_node.gh

1.05 KB
Binary file not shown.

src/files/srf_kmeans.gh

-2.42 KB
Binary file not shown.

src/routes/solve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function commonSolve (req, res, next){
126126
let trees = []
127127
if(res.locals.params.inputs !== undefined) { //TODO: handle no inputs
128128
for (let [key, value] of Object.entries(res.locals.params.inputs)) {
129-
let param = new compute.Grasshopper.DataTree('RH_IN:'+key)
129+
let param = new compute.Grasshopper.DataTree(key)
130130
param.append([0], Array.isArray(value) ? value : [value])
131131
trees.push(param)
132132
}

src/routes/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ router.get('/:name', async (req, res, next) => {
6161
}
6262

6363
for (const input of definition.inputs) {
64-
const name = input.name.replace(/^RH_IN:/, '')
64+
const name = input.name
6565
const id = name
6666
switch (input.paramType) {
6767
case 'Integer':

0 commit comments

Comments
 (0)