Skip to main content

COMPAS CRA

build GitHub - License pip downloads PyPI - Python Version PyPI - Latest Release DOI

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%\.rhinocode for Rhino), then pip 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_IPOPT to 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

image

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

compas_sandbox-0.6.3.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

compas_sandbox-0.6.3-py3-none-win_amd64.whl (13.6 MB view details)

Uploaded Python 3Windows x86-64

compas_sandbox-0.6.3-py3-none-manylinux_2_28_x86_64.whl (9.7 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

compas_sandbox-0.6.3-py3-none-manylinux_2_28_aarch64.whl (3.7 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

compas_sandbox-0.6.3-py3-none-macosx_11_0_x86_64.whl (3.4 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

compas_sandbox-0.6.3-py3-none-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

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

Hashes for compas_sandbox-0.6.3.tar.gz
Algorithm Hash digest
SHA256 b7c81b1cea9f7eb8efb666be585913c7f2ed8c52c80ad885d495ebae3e0f7735
MD5 a51e7ac64af41b4d0a93e555e877ae97
BLAKE2b-256 b702aed0621ff01280e360a0c30a8d609db909779f6614690c64cc83808cc7d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_sandbox-0.6.3.tar.gz:

Publisher: release.yml on petrasvestartas/compas_sandbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compas_sandbox-0.6.3-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 09bdcd7acceb0a46e59a1372d1b9408e82dfe92c3e5a8a02e159685d5296564f
MD5 9a3c4cc5cb8b832402407600813b6fc0
BLAKE2b-256 96c2187d08646faf1cef907e2bc8e2baecad18916cf44456a1ecb13686c2410c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compas_sandbox-0.6.3-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.3-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5102356859f5394ed5e6e49537fefa364804a3e1695f0d26f186b050180514a4
MD5 ce55daec56d5edbdfd7e3bbfb0d98295
BLAKE2b-256 4ca10ff0a595ece065e980d7039fda2c14516ebbe36118f33831832fad59d0d1

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compas_sandbox-0.6.3-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.3-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 74b792281b2ac214d06c5dda5ba7e82512505640c30988d3f46091f69310bb6f
MD5 7b95bf5eea7f2e768692fefebbb55c5d
BLAKE2b-256 c7934a7c1dc3052db7edfaa8a05708da20053a59c3bd19bf984971ad2964b53d

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compas_sandbox-0.6.3-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.3-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 388f5b14ca9129619256203a4bd9813296653298f2e74d4824d6b979c3761353
MD5 d6a48ff1c4d33446d922415a6defad05
BLAKE2b-256 230a8cda8ddebc7e234c67b57a685181c11544cbf0e04e230769e176f34e116e

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compas_sandbox-0.6.3-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d2932bc544e97ef764af8a92d89b12986e7c44b7e1d34f9a6724e315f098a69a
MD5 a1f0bd3d5d3ae5948eee2804b8abb091
BLAKE2b-256 eb64395bca524ff276441a17d196ed935b925232447eda0e082bec59932dfe42

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.6

26 files

0.7.5

26 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.5

6 files

0.6.4

6 files

This release

0.6.3 This release

6 files

0.6.2

6 files

0.6.1

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page