Hi @stevebaer , @fraguada , @will
first of all, thanks for the amazing work done with the appserver and rhino.compute!
I’m having problems to visualize some of the examples shared for compute.Rhino3D.appserver. I’ve cloned the github repo today following instalation notes, and I have runned “npm i” to install all dependencies…
It seems to happen only with models that need to represent a mesh: Delaunay, metaballTable,bendy, works apparently fine, but instead “spikyThing”, “panels” connect to Rhino.compute but failed to render the three.js geometry… Please, watch the video below:
from chrome console:
from spikyThing “script.js” file:
would appreciate some help solving this problem, I have tried to debug it myself, but i’m not very familiar with all this rhino.compute thing… Seems that rhino.compute is not sending back computed data correctly, but just guessing…
thanks
Try opening the dev tools and go to the “Network” tab, then reload the page. Click the “solve” request to see what the response was from the appserver.
i’m aware tha this is purely javascript/VScode thing (which certainly is a context where I have not much experience… so, do you know if this could be related to a missing vscode package or node module from my part? what is the purpose of that semicolon? thanks
Where did you find the code you refer to? It should fail if it the { 0; } isn’t encased in quotes since it is referring to the name of a property.
You can also check the object itself to see its data structure by doing something like: console.log( responseJson ). This should show you all of the object properties, including those which might have such a name like '{ 0; }'
It also could be the case that something changed in the RhinoCompute response that means that the resulting object no longer has a semicolon.
I downloaded the rhino compute version from here following the steps that @will showed in the Core Workshop in November.
Rhino App Server was also cloned using git, following github instructions
In fact, the response to heroku is " 0: " while my local rhinocompute is responding without white spaces nor semicolons (you can checks this in the txt. files I shared in a previous post, responding to @will)
Problem solved from my part, but yeah, apparently something has been changed in the last rhino.compute master.
Ah, the behaviour changed after I fixed a different bug…
We ought to update the examples to use the new paths (or not rely on the path or its serialised form). Sorry @aitorleceta for taking a while to figure it out and thanks for letting us know about this!
Feel free to submit a pull request if you’ve already patched this on your end