COMPAS integration
RV2 bundles the following COMPAS packages:
When you install RV2 using the installer, these packages are installed in a miniconda environment and registered in Rhino. It is the same as the "normal" installation process of COMPAS packages, but automated. Also the command plugin is installed with an automated version of the typical installation process for COMPAS-based Rhino command plugins.
Use COMPAS packages in a Rhino script
This means that the COMPAS packages listed above (with the exception of compas_triangle
) are also available in the Rhino PythonScript Editor. To verify this, simply open the editor and run the following snippet:
Note that Rhino uses IronPython 2.7.8
. Therefore print statements are still in the "old" Python 2x format...
In this final tutorial, we will use these packages to extend the functionality of RV2 with custom Python scripts. For communication between these scripts and RV2, we will use the *.rv2
session files.
Load Form Diagram From Session File
To load a Form Diagram from a RV2 session file and visualise it in a script, you could do the following:
Save the script in the same directoy as the session file ('bm-3.rv2'
), or provide the full path to the session file. Otherwise Rhino will not be able to find it.
Extract data
To extract information from the Form Diagram you can simply use the typical COMPAS mechanisms for extracting data out of meshes.
Using the data and attribute "accessors", we can for example extract the values of the reaction forces at the supports, or the axial forces in the edges.
With this we can, for example, compute a rough approximation of the (lumped) stress at the nodes.
Last updated