Block_tets_rhino example is not working
Hi,
Thank you for developing such a great tool of connecting fea software with rhino & gh.
I am trying to run a fea analysis with block units. I use the block_tets example and try to run it in rhino. I am able to run shell elements analysis with compas_fea, but failed at this block example.
I got the following error.

After I looked more into the source code, I think I failed at the step.
rhino.add_tets_from_mesh(mdl, name='elset_tets', mesh=mesh, volume=10**(-4))
which returns an error
***** Error using MeshPy (TetGen) or drawing Tets *****
I think it is because it throws error

The reason is that I do not have meshpy.py python file.

Please let me know if my understanding is correct! It would be really helpful if you can take a look and let me know how I can fix it. Is it a version problem (compas_fea 0.3.3)?
you need to install meshpy on your environment.
assuming that you installed compas_fea in an environment called fea, try this:
conda activate fea
pip install meshpy
Thanks for your instruction! I successfully installed the meshpy.
But it still got stuck at this step

I check the error message. I think it might come from the version (2020.1) of meshpy I am using. It does not have _internals module

sorry for the late reply. I will have a look later today or during the weekend ;)
Thank you! Thank would be really helpful.
I have checked on my machine and the example works (I did not run the analysis because I do not have Abaqus installed, but it doesn't throw your error).
Close all rhino windows and please follow these steps in a terminal (I suggest you create a new environment from scratch):
conda create -n fea compas
conda activate fea
pip install compas_fea
conda install meshpy
python -m compas_rhino.uninstall
python -m compas_rhino.install -v6.0
python -m compas_rhino.install -v6.0 -p compas_fea
Then try to run the example again.
Thank you for your help on this! I think I already followed what you wrote here, but it never works for me. The only difference is that I am using rhino -v7.0. I asked Gonzalo last week and he figured out a reason. It is because compas_fea calls compas_rrc to start a proxy for running meshpy. The proxy is transferring data through json string. The output from ironpython is in single data type but compas_rrc does not recognize the single. I am wondering if this is the same case for you. It is weird that it works on your computer but not on mine. But since compas_fea2 is coming we can wait for the newer version. Thank you again for all of your time.
this is a screenshot of my run:
as you can see it correctly initializes meshpy and runs the discretization algorithm.
I am running it on rhino 6, but I don't think it changes anything.
As you said it is probably not worth it to investigate it further, since the discretization algorithm in compas_fea2 is completely different and based on a different library.
So, I actually figured out the problem. It is related to something that changed in compas after version 1.10. From the changelog it is not very clear why and in theory this should not happen, since all sub-versions should be compatible.
@jwwang0-0 please, try to downgrade the version of compas in your environment to 1.10. To do so just type:
conda activate fea
conda install compas=1.10
then reset the python script engine in Rhino and run
import compas
print(compas.__version__)
in the python script editor in Rhino to check that you have the right version linked.
Finally, try to run the example again and let us know if this works.
Hello,
I've been having the same issue as in this thread, and when I downgrade the compas package to 1.10 I get:
No module named numpy
line 5, in <module>, .\7.0\scripts\compas\geometry\transformations\transformations_numpy.py
line 18, in <module>, .\7.0\scripts\compas\geometry\transformations\__init__.py
line 780, in <module>, .\7.0\scripts\compas\geometry\__init__.py
line 9, in <module>, .\7.0\scripts\compas_rhino\utilities\drawing.py
line 176, in <module>, .\7.0\scripts\compas_rhino\utilities\__init__.py
line 29, in <module>, .\7.0\scripts\compas_rhino\__init__.py
line 9, in <module>, .\ 7.0\scripts\compas_fea\cad\rhino.py
line 93, in <module>, .\7.0\scripts\compas_fea\cad\__init__.py
line 1, in <module>, .\block_tets.py
the code line in question:
from compas_fea.cad import rhino
but numpy is already installed in this environment, I'm at a loss. Any help to get this working would be greatly appreciated