Skip to main content

Constrained form-finding meets automatic differentiation.

Project description

COMPAS CEM

Constrained form-finding meets automatic differentiation.

sihl_bridge

Introduction

COMPAS CEM is a structural design tool that generates efficient form for spatial bar structures subjected to combinations of tension and compression forces. Examples of such structures are gridshells, bridges, stadiums, tensegrities and multistory buildings.

The generated forms can be steered to meet force and geometrical constraints, such as limiting the length of a selection of elements in the structure, best-fitting an arbitrary target surface, or restraining the magnitude of the reactions forces at the supports of a structure.

This constrained form-finding process is solved under the hood using numerical optimization and automatic differentiation -- two commonplace techniques in the world of machine learning that COMPAS CEM makes readily accesible to designers around the world.

COMPAS CEM is a COMPAS extension written in pure Python. It runs on Windows, MacOS and Linux and it does not depend on any CAD software to work.

Are you a Grasshopper person though? Worry not. CAD-independence doesn't mean CAD-incompatibility: we ship COMPAS CEM as a Grasshopper plugin so that you can readily integrate our constrained form-finding engine into your next parametric pipeline.

Feel free to check the examples and the docs to get a glimpse of what COMPAS CEM can do for you. If you are further interested in learning more about the underpinnings of the CEM framework, the constrained form-finding method that COMPAS CEM implements, we refer you to this journal paper.

Authors

COMPAS CEM is developed by Rafael Pastrana at the CREATE Laboratory at the Princeton University School of Architecture in collaboration with Patrick Ole Ohlbrock from the Chair of Structural Design at ETH Zürich and Pierluigi D'Acunto from the Professorship of Structural Design at the Technical University of Munich.

Installation

Install compas_cem in only three simple steps.

We assume you have Anaconda installed in your machine. If not, please download and install it before continuing.

First, create a new anaconda environment from your command line. The only dependency is compas. Here we chose the name of the environment to be cem, but you can call it spacecowboy if you prefer.

conda create -n cem COMPAS

Next, activate the cem environment. Anaconda environments are like bubbles that keep installations and dependencies isolated from other parts in your machine. In other words, what happens in cem stays in cem! 🕺🏻

conda activate cem

Finally, install compas_cem with a one-liner:

pip install compas-cem

To double-check that everything is up and running, while still in the command line, 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.

Grasshopper Plugin

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. The grasshopper version of compas_cem allows you to use all the important bits of our constrained form-finding engine in a (familiar) visual programming environment.

To additionally install compas_cem as a grasshopper plugin, close Rhino, go to the command line and activate the anaconda environment where compas_cem lives. Note that you should have installed compas_cem from your command line before installing the grasshopper plugin.

conda activate cem

Let's connect compas_cem, compas_rhino and compas_ghpython to Rhino from te command line. If you were wondering, the last two are installed by default by compas.

python -m compas_rhino.install -v 7.0

Note that the flag -v 7.0 indicates that we will be installing compas_cem and company to Rhino 7. If you are working with Rhino 6, replace that last bit with -v 6.0.

Finally, launch grasshopper and start dropping compas_cem components onto the canvas! Send pictures! 🏖

Caveat

The compas_cem plugin for grasshopper is a collection of .ghuser objects. As such, they have one important limitation: once used in a document, they forget who they are. The don't know they were created out of a ghuser component, they will be simple GHPython components. This has an important consequence: if you update compas_cem, those components already in use will NOT be automatically updated. More information here.

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.13.tar.gz (153.5 kB view details)

Uploaded Source

Built Distribution

compas_cem-0.1.13-py2.py3-none-any.whl (255.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file compas_cem-0.1.13.tar.gz.

File metadata

  • Download URL: compas_cem-0.1.13.tar.gz
  • Upload date:
  • Size: 153.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for compas_cem-0.1.13.tar.gz
Algorithm Hash digest
SHA256 347b5a64deb2633b21c0689d3abb05734453e340edfb824b643ce247776a4a96
MD5 e7c783eaf2f07fea5f480562a96ece68
BLAKE2b-256 6c46cd8ff4eb6476eb81c0e56a7a92b728de9e50daa282c6ec84147143813101

See more details on using hashes here.

File details

Details for the file compas_cem-0.1.13-py2.py3-none-any.whl.

File metadata

  • Download URL: compas_cem-0.1.13-py2.py3-none-any.whl
  • Upload date:
  • Size: 255.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for compas_cem-0.1.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 61d376857c0923f817d094a823692f101bd933952ce6888d6fceb754199a3e50
MD5 2cc1a3d56bd3f3e3e4c639d04f133ef2
BLAKE2b-256 e163bb2e088cec244f27d7bbb9db2951579215135a87ce80e19179aa2dd547d9

See more details on using hashes here.

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