Skip to main content

Constrained form-finding meets automatic differentiation.

Project description

compas_cem

Constrained form-finding meets automatic differentiation.

simple_bridge_optimization

Getting Started

CEM is a geometric form-finding technique to create mixed tension-compression structures. This COMPAS package is developed by Rafael Pastrana at the CREATE Laboratory at Princeton University in collaboration Patrick Ole Ohlbrock and Pierluigi D'Acunto, from the Chair of Structural Design at ETH Zürich.

If you are curious about CEM's underpinnings, we refer you to these two excellent resources:

Additionally, feel free to check the examples to get a first impression of what compas_cem can do for you.

Installation

The preferred way to install compas_cem is to build it from source in only five simple steps.

First, create a new conda environment from your command line. The only requirements are python, compas, and rtree.

conda create -n cem python=3.7 COMPAS=0.16.2 rtree=0.9.4
conda activate cem

We need to fetch compas_cem from this repository. Go to the folder where you want to store it and run the following. For example, if you are a macOS user and want to put it in the pre-existing ~/code/ folder:

cd ~/code/
git clone https://github.com/arpastrana/compas_cem.git

Next, Move into the the repository's folder (the one you've just cloned) and install compas_cem using pip:

cd compas_cem
pip install -e .

To double-check that everything is up and running, still in your command line interface, type the following and hit enter:

python -c "import compas_cem"

If no errors show up, celebrate 🎉! You have a working installation of compas_cem.

Optional Dependencies

As a CAD-agnostic framework, COMPAS has compas_viewers, a standalone package to display 3d geometry from the command line. This is pretty helpful when wanting to orbit and zoom around a form-found model without resorting to a full-blown CAD software like Rhino and Grasshopper.

Some of the examples presented depend on compas_viewers to display the resulting form-found structure. However, the viewers package is entirely optional, and is not required for compas_cem internals to work. If you are interested to, please follow the installation instructions provided by the compas_viewers repository.

Link to Rhino / Grasshopper

There will be times when modeling a complex structure is easier to do with a few mouse-clicks instead of a hundred lines of code. COMPAS enables connecting compas_cem to Rhino and Grasshopper to access (almost) all of its functionality from the inside.

To create the link, run the following snippet from the command line:

python -m compas_rhino.uninstall
python -m compas_rhino.install -p compas_cem compas_rhino compas_ghpython

Contributing

Pull requests are welcome!

Make sure to read our contribution guide. Please don't forget to run invoke test in your command line before making a pull request.

Issue tracker

If you find a bug or want to suggest a potential enhancement, please help us tackle it by filing a report.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compas_cem-0.1.5.tar.gz (35.8 kB view hashes)

Uploaded Source

Built Distribution

compas_cem-0.1.5-py2.py3-none-any.whl (52.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page