# Export of Rhino geometry to .json for CRA analysis

**URL:** https://forum.compas-framework.org/t/export-of-rhino-geometry-to-json-for-cra-analysis/877
**Category:** compas\_rhino
**Created:** [July 24, 2024, 3:15pm UTC](https://forum.compas-framework.org/t/export-of-rhino-geometry-to-json-for-cra-analysis/877 "2024-07-24T15:15:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![korbireischl](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@korbireischl](https://forum.compas-framework.org/u/korbireischl)
#### Post date: [July 24, 2024, 3:15pm UTC](https://forum.compas-framework.org/t/export-of-rhino-geometry-to-json-for-cra-analysis/877/1 "2024-07-24T15:15:52Z")

</div>

Hello everyone,

I’m currently writing my master thesis at the TU Munich on the structural analysis of discrete element assemblies and would like to compare different approaches and their results to create a workflow.  
One analysis method I want to include is the Rigid Block Limit Analysis or its successors, the Rigid Block Equilibrium (RBE) and the Coupled Rigid-Block Analysis (CRA). Therefore, I came across the COMPAS framework with the packages _compas\_assembly_ and _compas\_cra_, which should provide an easy way of importing geometry from Rhino and includes RBE and CRA solvers.

Unfortunately, I haven’t gotten this approach to work yet. The _compas\_cra_ package doesn’t seem to work properly with newer versions of the COMPAS core package, while rolling back to older versions introduces new complications. However, with the .yml file from Github and version 0.9.0 of compas\_view2, almost everything worked.  
The provided sample files from _compas\_cra_, which refer to geometry stored in .json files, still don’t work for me, their format seems to be outdated. The examples from _compas\_assembly_, which also use the compas\_cra solver, work (I don’t know how to get the DEM viewer, but switching to the CRA\_viewer works).

In the next step I wanted to use my own geometry from Rhino. Using the provided _mesh\_to\_assembly\_json.py_ script from Github results in errors, but I tried changing it a bit to get it working. As the _compas\_assembly_ .json files seemed to work in the examples, I thought using this package for the assembly creation instead would be possible. Here’s the core of my changed script (I left out the unchanged parts):

```auto
from compas_rhino.objects import select_meshes
from compas_assembly.datastructures import Assembly

guid = select_meshes()
assembly = Assembly()
assembly.from_rhinomeshes(guid)

```

Mesh selection in Rhino works, but the command ` `assembly.from\_rhinomeshes(guid)`` results in the error “Object\_3$3 is not callable”.

I would be very grateful for any help. Is there a solution to my problem? Is there a better way of exporting Rhino geometry to a working .json file for analysis with _compas\_cra_? Like changing the geometry to a compas object first using _compas\_rhino.conversions_? I already tried using this approach, but didn’t get it working either.  
Maybe somebody could provide me a working conda environment configuration for _compas\_cra_, with older package versions that fit together?

Thank you very much!

Kind regards  
Korbinian Reischl
