RhinoCompute - import .3dm file from URL

Hello,
For the need of a web application, I’m looking to download and import .3dm and .step files from their URL through a grasshopper script and RhinoCompute.

To do that, I download and write the bytes contained in the URL in a temporary file, then import it in a headless doc and finally delete it just before to send a response.

When this is computed in a local grasshopper doc, everything works well, for both .3dm and .step files. But here’s my issue : when it comes to compute that through Hops and RhinoCompute, this works only with .step files, and doesn’t with .3dm (returns an “Unable to solve on compute” error).

The part of the algorithm deleting the files seems to be causing the error, because when I do not delete the temp file, everything works well.
However, I can’t figure out why it works fine in local but not through RhinoCompute, and especially why it works fine through RhinoCompute with .step files but do not with native .3dm files.

If anyone has an explanation, a solution, or maybe just an other idea to deal with this, I’ll be very greatfull.

Regards,
Luc


importUrl_issue.gh (4.9 KB)

Hello,

This is strange because with your GH test file both are working on my side using HOPS and a remote RhinoCompute server AND in local RhinoCompute …

Can you see the logs of RhinoCompute when using Hops ? could be some useful informations there

Hello,

Thank you for testing and replying.
That’s weird… On my side I systematically get a “Process terminated due to StackOverflowException” in the logs when I’m testing it with a .3dm file url.
Maybe you or anyone else know why ?

Luc

@Luc I also tested your definition both locally and on a remote server and both setups worked well. Are you using this guide for your remote web server setup? If so, there are some logs that get printed out and stored as text files which may give you some more debugging information to look into. These logs are stored in the root rhino.compute folder… so if you followed that guide, they should be located in C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\rhino.compute\logs. It should give you a log for the rhino.compute project and then a separate one for each of the child processes that you have running. Do any of those help you?