COMPAS CRA
Coupled Rigid-Block Analysis (CRA) implementation using COMPAS framework.
developed with ♥ by Gene Ting-Chun Kao
Installation
pip install compas_sandbox
Nothing else is needed on Windows, macOS (Apple Silicon and Intel) or Linux: the wheels
bundle a statically linked IPOPT 3.14.19 executable
(Eclipse Public License 2.0, MUMPS linear solver, no HSL), built from source by
packaging/. See packaging/README.md for how
it is built and which licenses apply, and the
installation docs
for development installs.
Rhino 8
The easiest way is to let the ScriptEditor install everything for you. Start a new
Python 3 script with this header and run it — on the first run Rhino installs
compas_sandbox and all of its dependencies into its own environment (this takes a
couple of minutes, watch the progress in the ScriptEditor console):
#! python3
# venv: compas-sandbox
# r: compas_sandbox
No extra # r: lines are needed for compas, numpy, shapely, etc. — they are
dependencies of compas_sandbox and pip installs them automatically. The bundled IPOPT
executable works inside Rhino as well, so no conda or manual solver install is needed.
Ready-to-run examples for the ScriptEditor are in scripts/:
scripts/rhino_cra_cubes.py— three stacked cubes, baked as wireframe blocks with interface outlines and resultant contact forces.scripts/rhino_cra_arch.py— a parametric masonry arch (span, rise, thickness, number of voussoirs, friction) solved and baked the same way.
Alternatively, install manually into Rhino's Python with the shell that ships with
Rhino (Tools > Options > Plugins > Rhino Code > Open Shell, or
~/.rhinocode/py39-rh8/shell/open-shell on macOS):
pip install compas_sandbox
Note that Rhino 8 ships CPython 3.9: compas_sandbox supports it since version 0.6.2,
and pip automatically selects dependency versions that still support 3.9 (for example
pyomo 6.9.x rather than 6.10+).
Known issue: Windows antivirus and the bundled solver
The wheels bundle an ipopt.exe built from source by CI. Because every release
produces a brand-new, unsigned binary with no reputation, some Windows antivirus
setups (notably managed/corporate Defender policies) quarantine it after the first
run. The symptom is a solve that worked once and then fails with
"No IPOPT executable found" — run scripts/rhino_ipopt_check.py
to confirm (an empty bin dir means the exe was removed).
What to do:
- Personal machine: restore the file from the antivirus quarantine and add an
exclusion for the install folder (e.g.
%USERPROFILE%\.rhinocodefor Rhino), thenpip install --force-reinstall --only-binary :all: compas_sandbox. - Managed machine (no admin rights): ask IT to allowlist the file or folder, or
point the solver at any trusted ipopt binary by setting the environment variable
COMPAS_SANDBOX_IPOPTto its full path (a conda-forge ipopt works). - The binaries carry version metadata identifying what they are, and the release workflow supports Authenticode signing (Azure Trusted Signing) once a certificate is configured, which resolves this properly.
To find out more about CRA, please refer to our paper in the CAD Computer-Aided Design journal: https://doi.org/10.1016/j.cad.2022.103216
Coupled Rigid-Block Analysis: Stability-Aware Design of Complex Discrete-Element Assemblies
Abstract
The rigid-block equilibrium (RBE) method uses a penalty formulation to measure structural infeasibility or to guide the design of stable discrete-element assemblies from unstable geometry. However, RBE is a purely force-based formulation, and it incorrectly describes stability when complex interface geometries are involved. To overcome this issue, this paper introduces the coupled rigid-block analysis (CRA) method, a more robust approach building upon RBE’s strengths. The CRA method combines equilibrium and kinematics in a penalty formulation in a nonlinear programming problem. An extensive benchmark campaign is used to show how CRA enables accurate modelling of complex three-dimensional discrete-element assemblies formed by rigid blocks. In addition, an interactive stability-aware design process to guide user design towards structurally-sound assemblies is proposed. Finally, the potential of our method for real-world problems are demonstrated by designing complex and scaffolding-free physical models.
Please cite our work if you use CRA in your research
Paper
@article{kao2022coupled,
title = {Coupled Rigid-Block Analysis: Stability-Aware Design of Complex Discrete-Element Assemblies},
author = {Kao, Gene Ting-Chun and Iannuzzo, Antonino and Thomaszewski, Bernhard and Coros, Stelian and Van Mele, Tom and Block, Philippe},
journal = {Computer-Aided Design},
volume = {146},
pages = {103216},
year = {2022},
publisher = {Elsevier},
doi = {10.1016/j.cad.2022.103216},
url = {https://doi.org/10.1016/j.cad.2022.103216}
}
Software implementation
@misc{compas-sandbox,
title = {{COMPAS CRA}: Coupled Rigid-Block Analysis ({CRA}) for the {COMPAS} framework},
author = {Kao, Gene Ting-Chun},
note = {https://github.com/BlockResearchGroup/compas\_cra},
year = {2020-2022},
doi = {10.5281/zenodo.7043135},
url = {https://doi.org/10.5281/zenodo.7043135},
}
Read the docs
https://github.com/petrasvestartas/compas_sandbox
Examples to reproduce our paper results
See examples in docs or try them in docs/examples.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file compas_sandbox-0.6.3.tar.gz.
File metadata
- Download URL: compas_sandbox-0.6.3.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7c81b1cea9f7eb8efb666be585913c7f2ed8c52c80ad885d495ebae3e0f7735
|
|
| MD5 |
a51e7ac64af41b4d0a93e555e877ae97
|
|
| BLAKE2b-256 |
b702aed0621ff01280e360a0c30a8d609db909779f6614690c64cc83808cc7d9
|
Provenance
The following attestation bundles were made for compas_sandbox-0.6.3.tar.gz:
Publisher:
release.yml on petrasvestartas/compas_sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_sandbox-0.6.3.tar.gz -
Subject digest:
b7c81b1cea9f7eb8efb666be585913c7f2ed8c52c80ad885d495ebae3e0f7735 - Sigstore transparency entry: 2570753897
- Sigstore integration time:
-
Permalink:
petrasvestartas/compas_sandbox@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/petrasvestartas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file compas_sandbox-0.6.3-py3-none-win_amd64.whl.
File metadata
- Download URL: compas_sandbox-0.6.3-py3-none-win_amd64.whl
- Upload date:
- Size: 13.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09bdcd7acceb0a46e59a1372d1b9408e82dfe92c3e5a8a02e159685d5296564f
|
|
| MD5 |
9a3c4cc5cb8b832402407600813b6fc0
|
|
| BLAKE2b-256 |
96c2187d08646faf1cef907e2bc8e2baecad18916cf44456a1ecb13686c2410c
|
Provenance
The following attestation bundles were made for compas_sandbox-0.6.3-py3-none-win_amd64.whl:
Publisher:
release.yml on petrasvestartas/compas_sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_sandbox-0.6.3-py3-none-win_amd64.whl -
Subject digest:
09bdcd7acceb0a46e59a1372d1b9408e82dfe92c3e5a8a02e159685d5296564f - Sigstore transparency entry: 2570754329
- Sigstore integration time:
-
Permalink:
petrasvestartas/compas_sandbox@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/petrasvestartas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file compas_sandbox-0.6.3-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: compas_sandbox-0.6.3-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 9.7 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5102356859f5394ed5e6e49537fefa364804a3e1695f0d26f186b050180514a4
|
|
| MD5 |
ce55daec56d5edbdfd7e3bbfb0d98295
|
|
| BLAKE2b-256 |
4ca10ff0a595ece065e980d7039fda2c14516ebbe36118f33831832fad59d0d1
|
Provenance
The following attestation bundles were made for compas_sandbox-0.6.3-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on petrasvestartas/compas_sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_sandbox-0.6.3-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
5102356859f5394ed5e6e49537fefa364804a3e1695f0d26f186b050180514a4 - Sigstore transparency entry: 2570754017
- Sigstore integration time:
-
Permalink:
petrasvestartas/compas_sandbox@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/petrasvestartas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file compas_sandbox-0.6.3-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: compas_sandbox-0.6.3-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74b792281b2ac214d06c5dda5ba7e82512505640c30988d3f46091f69310bb6f
|
|
| MD5 |
7b95bf5eea7f2e768692fefebbb55c5d
|
|
| BLAKE2b-256 |
c7934a7c1dc3052db7edfaa8a05708da20053a59c3bd19bf984971ad2964b53d
|
Provenance
The following attestation bundles were made for compas_sandbox-0.6.3-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on petrasvestartas/compas_sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_sandbox-0.6.3-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
74b792281b2ac214d06c5dda5ba7e82512505640c30988d3f46091f69310bb6f - Sigstore transparency entry: 2570754204
- Sigstore integration time:
-
Permalink:
petrasvestartas/compas_sandbox@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/petrasvestartas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file compas_sandbox-0.6.3-py3-none-macosx_11_0_x86_64.whl.
File metadata
- Download URL: compas_sandbox-0.6.3-py3-none-macosx_11_0_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
388f5b14ca9129619256203a4bd9813296653298f2e74d4824d6b979c3761353
|
|
| MD5 |
d6a48ff1c4d33446d922415a6defad05
|
|
| BLAKE2b-256 |
230a8cda8ddebc7e234c67b57a685181c11544cbf0e04e230769e176f34e116e
|
Provenance
The following attestation bundles were made for compas_sandbox-0.6.3-py3-none-macosx_11_0_x86_64.whl:
Publisher:
release.yml on petrasvestartas/compas_sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_sandbox-0.6.3-py3-none-macosx_11_0_x86_64.whl -
Subject digest:
388f5b14ca9129619256203a4bd9813296653298f2e74d4824d6b979c3761353 - Sigstore transparency entry: 2570754413
- Sigstore integration time:
-
Permalink:
petrasvestartas/compas_sandbox@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/petrasvestartas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file compas_sandbox-0.6.3-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: compas_sandbox-0.6.3-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2932bc544e97ef764af8a92d89b12986e7c44b7e1d34f9a6724e315f098a69a
|
|
| MD5 |
a1f0bd3d5d3ae5948eee2804b8abb091
|
|
| BLAKE2b-256 |
eb64395bca524ff276441a17d196ed935b925232447eda0e082bec59932dfe42
|
Provenance
The following attestation bundles were made for compas_sandbox-0.6.3-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on petrasvestartas/compas_sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_sandbox-0.6.3-py3-none-macosx_11_0_arm64.whl -
Subject digest:
d2932bc544e97ef764af8a92d89b12986e7c44b7e1d34f9a6724e315f098a69a - Sigstore transparency entry: 2570754508
- Sigstore integration time:
-
Permalink:
petrasvestartas/compas_sandbox@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/petrasvestartas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5cbc814ce5ad075209ba9f2099563c3a9c9ca3b -
Trigger Event:
push
-
Statement type: