Dev Install

If you want to contribute to the development of RV2, or if you simply want to have access to all the latest changes and bug fixes before they are released, you may want to switch to a "dev install". This basically amounts to doing manually what otherwise the installer does for you.

Prerequisites

Please use a version based on Python 3.

Please accept the default settings suggested by the installer!

Conda environment

The first step is setting up a conda environment.

For working with conda, please use the Anaconda Prompt, and not the Command Prompt.

conda config --add channels conda-forge
conda create -n rv2-dev python=3.7 --yes
conda activate rv2-dev

COMPAS packages

To install COMPAS packages into this environment, you have two options:

  1. Clone the packages using your favourite Git client and install from source.

  2. Install directly from the Github repos.

Here, we will procede with option 2. It is recommended to clone the repos into an easily accessible folder on your system. For a complete RV2 installation, we need the following repos:

mkdir Code

pip install -e git+https://github.com/compas-dev/compas.git#egg=compas --src Code
pip install -e git+https://github.com/BlockResearchGroup/compas_cloud.git#egg=compas_cloud --src Code
pip install -e git+https://github.com/BlockResearchGroup/compas-RV2.git#egg=compas-RV2 --src Code
pip install -e git+https://github.com/BlockResearchGroup/compas_singular.git#egg=compas_singular --src Code
pip install -e git+https://github.com/BlockResearchGroup/compas_skeleton.git#egg=compas_skeleton --src Code
pip install -e git+https://github.com/BlockResearchGroup/compas_tna.git#egg=compas_tna --src Code
pip install -e git+https://github.com/BlockResearchGroup/compas_triangle.git#egg=compas_triangle --src Code

Especially on Windows, there are two known issues with a pip-based COMPAS installation. They can be solved quite easily as documented here: https://compas-dev.github.io/main/installation.html#known-issues

If this doesn't work for you, you can install a released version of COMPAS using conda instead.

Test Installation

After installation, you can check your setup in an interactive Python session, import the core COMPAS library (compas).

>>> import compas
>>> compas.__version__
'0.16.0'
>>> exit()

Make packages available in Rhino

The installed packages have to be made available in Rhino with a few additional commands.

  1. Uninstall any previously installed COMPAS packages.

  2. Install the base COMPAS packages.

  3. Install the RV2 packages.

python -m compas_rhino.uninstall -v 7.0
python -m compas_rhino.install -v 7.0
python -m compas_rhino.install -v 7.0 -p compas_cloud compas_skeleton compas_singular compas_triangle compas_tna compas_rv2

In the above commands, the packages are installed for Rhino 7. If you are using Rhino 6, either specify the corresponding version (-v 6.0), or just simply omit it since version 6 is the default.

Install the plugin

The next step is to install the plugin.

python -m compas_rhino.install_plugin -v 7.0 Code/compas-rv2/ui/Rhino/RV2

Load the UI

Finally we have to load the UI in Rhino. Please follow the general instllation instructions: https://blockresearchgroup.gitbook.io/digitalfutures-2020/setup/installation#3-activate-toolbar-in-rhino

Install additional COMPAS packages

One of the advantages of a "dev" setup is that you can add other COMPAS packages to extend the functionality of the base installation.

One of the additional packages used in Tutorial 4 was compas_cgal, so i will use that as an example. Note however, that this package is under active development and still requires some modifications to the conda environment.

conda install eigen boost-cpp mpir mpfr cgal-cpp">=5.0" pybind11
pip install -e git+https://github.com/BlockResearchGroup/compas_cgal.git#egg=compas_cgal --src Code

For more information about this installation process, please refer to the COMPAS CGAL documentation: https://github.com/BlockResearchGroup/compas_cgal

There, installation instructions for the viewers are also available...

Update Rhino

In this case, you don't have to add the newly installed package to Rhino because when working in Rhino, compas_cgal functionality has to be called via the RPC cloud anyway. In general, however, you should not forget to add newly installed packages to Rhino as well, to make their functinality directly available there...

(Potential) Issues

Make sure to activate your "dev" environment before installing additional packages and/or registering packages in Rhino.

Don't forget to restart Rhino (if Rhino was open during any of the installation steps) after you make modifications.

Last updated