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.4.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.4-py3-none-win_amd64.whl (13.6 MB view details)

Uploaded Python 3Windows x86-64

compas_sandbox-0.6.4-py3-none-manylinux_2_28_x86_64.whl (9.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

compas_sandbox-0.6.4-py3-none-manylinux_2_28_aarch64.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

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

Uploaded Python 3macOS 11.0+ x86-64

compas_sandbox-0.6.4-py3-none-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file compas_sandbox-0.6.4.tar.gz.

File metadata

  • Download URL: compas_sandbox-0.6.4.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.4.tar.gz
Algorithm Hash digest
SHA256 207dc4599ab9cb821abb0953bca491e35da2c08de9964f87c5742bc4511b2a3a
MD5 146ade2ed16fba695f5d00c57cc0297a
BLAKE2b-256 d2da0b261ab384db8e3b547abc81a763945958791d8f6d67e4f12da179796240

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_sandbox-0.6.4.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.4-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9b084eb155160d94e99d4f1fb56b9f75b6152fc9756082c4d1e438342984f6ba
MD5 2417377b49287a72cabcb6069171664e
BLAKE2b-256 f82fa861925cedfa24c966d4533ae24502bb1cbde46f4a23a11ae25a24f5cc98

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_sandbox-0.6.4-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.4-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.4-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7f540468f506d84e2cdba7631b35f4a1d679284d46291006777b809befc0cc6b
MD5 e602ec7b3617b0457d6d7a312b6abc6c
BLAKE2b-256 ad75344514fc8a9efac7be4b4042d92f206fee9ae3c188dff6cd450a4ff14b6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_sandbox-0.6.4-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.4-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.4-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8200b3fdec8671b3d5fa90f1b7847c31efdda957bd3fe9ed2c1cfd4f1dce3c49
MD5 35a4ec2f321fd70ac7c7161874b79e8c
BLAKE2b-256 08df989fa8a0e838666ef24e81c7ef3f514474e0d29e0e66e628642ed93afcb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_sandbox-0.6.4-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.4-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.4-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d5d84df5d44dd2c115be62b043d530c2baa505470a2974d966d6cb30abd6b19d
MD5 af3676c7428741402a544d8ff49c8407
BLAKE2b-256 85f8e1d16329f95b2f9b37da7fa665004e0837c340d1646395c580fdac4b7454

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_sandbox-0.6.4-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.4-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for compas_sandbox-0.6.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dcc87e06ea1476752050dbf80ebb94f4588cd2ac95f94457f5a91973a352ca4f
MD5 7c10c1d898a6a00df43f9289a632ddb7
BLAKE2b-256 cbf969b5233bb838ab73479f9d4512ee608e0c2b31c22a7cac3ad72f95b43d67

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_sandbox-0.6.4-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

This release

0.6.4 This release

6 files

0.6.3

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