Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosting FEA tool on Compute #78

Closed
Marco-Pellegrino opened this issue Sep 24, 2021 · 6 comments
Closed

Hosting FEA tool on Compute #78

Marco-Pellegrino opened this issue Sep 24, 2021 · 6 comments

Comments

@Marco-Pellegrino
Copy link

Marco-Pellegrino commented Sep 24, 2021

Hello.

I am trying to explore the use of a web app to solve some simple FEA Grasshopper model but I am having some issue.
The tool required to run an external application (I do it with subprocess) from which we can read an output file.
Is it possible?
I am getting this error message but I am not able to get any tip.

image

@sbaer
Copy link
Member

sbaer commented Sep 27, 2021

What does you python script look like?

@Marco-Pellegrino
Copy link
Author

Marco-Pellegrino commented Sep 28, 2021

Hi Steve!

Thanks for jumping in.

I am posting here the Grasshopper script in case you want to have a better look and try your self.
I am going to do a bit of debugging my self deleleting some component until I do understand where the issue is happening.

It requires to download Alpaca4d tool (which I have attached to this thread). Remember to unblock the file and to install the tool inside a Folder called "Alpaca4d".

I have tried to summarise what the tool is trying to do in the picture below.
I hope it makes sense.

image

FabianEidnerVase.zip

Alpaca4d.zip

@Marco-Pellegrino
Copy link
Author

Marco-Pellegrino commented Oct 1, 2021

The error seems to happen in the "assemble" component.
The latest output that I can get without any error is when I remove that part.

You can look inside the code of the assemble if you want.

I have converted the output of the other component to a string and convert in mesh to visualise that the others component return an output.
image

@Marco-Pellegrino
Copy link
Author

Hi @sbaer @pearswj
Sorry if I am going to make a silly question but I am trying to understand why the script is failing.

Is rhino.compute able to use ALL the rhinoCommon function?

for example:

Can I use "import ghpythonlib.components as ghcomp"?
Can I use Rhino.Geometry.RTree ?

@sbaer
Copy link
Member

sbaer commented Oct 10, 2021

You can use most of RhinoCommon and ghpythonlib. The area you should stay away from are RhinoDoc and it's views. There is typically no RhinoDoc when running headless

@Marco-Pellegrino
Copy link
Author

thanks @sbaer !!!
The RhinoDoc makes me wonder where it could be the issue and it is finally working!!!!!

The issue was in rhinoscriptsintax. I was using rs.DocumentPath() to find the working folder but I have solved it using os.getcwd()

I am so glad we have managed to solve it! We can finally run some FEA on the web.

image

@sbaer sbaer closed this as completed Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants