Metadata-Version: 2.4
Name: compas_cem
Version: 0.9.0
Summary: The Combinatorial Equilibrium Modeling framework for COMPAS
Author-email: Rafael Pastrana <arpj@princeton.edu>
License: MIT License
        
        Copyright (c) 2020-2021 Rafael Pastrana
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://arpastrana.github.io/compas_cem
Project-URL: Documentation, https://arpastrana.github.io/compas_cem
Project-URL: Repository, https://github.com/arpastrana/compas_cem
Project-URL: Changelog, https://github.com/arpastrana/compas_cem/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/arpastrana/compas_cem/issues
Project-URL: Forum, https://forum.compas-framework.org/
Keywords: form-finding,structural-design,architecture,equilibrium
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: <3.14,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: autograd
Requires-Dist: compas<3.0,>=2.15
Requires-Dist: nlopt>2.7
Requires-Dist: numpy>=1.26
Provides-Extra: viz
Requires-Dist: compas_plotter>=1.0.1; extra == "viz"
Requires-Dist: compas_viewer>=2.0; extra == "viz"
Provides-Extra: dev
Requires-Dist: attrs>=17.4; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: bump-my-version; extra == "dev"
Requires-Dist: compas_invocations2[mkdocs]; extra == "dev"
Requires-Dist: invoke>=0.14; extra == "dev"
Requires-Dist: matplotlib; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-lazy-fixtures>=1.1.0; extra == "dev"
Requires-Dist: ruff==0.16.1; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Requires-Dist: compas_plotter>=1.0.1; extra == "dev"
Requires-Dist: compas_viewer>=2.0; extra == "dev"
Dynamic: license-file

# COMPAS CEM

[![Github Actions Build Status](https://github.com/arpastrana/compas_cem/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/arpastrana/compas_cem/actions/workflows/build.yml)
[![License](https://img.shields.io/github/license/arpastrana/compas_cem.svg)](https://github.com/arpastrana/compas_cem/blob/main/LICENSE)
[![PyPI Package latest release](https://img.shields.io/pypi/v/compas-cem.svg)](https://pypi.org/project/compas-cem/)
[![Python versions](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Farpastrana%2Fcompas_cem%2Fmain%2Fpyproject.toml)](https://pypi.org/project/compas-cem/)
[![Made with COMPAS](https://compas.dev/badge.svg)](https://compas.dev/mission-control/#compas_cem)
[![CAD paper](https://img.shields.io/badge/CAD-10.1016%2Fj.cad.2022.103435-ff6c00.svg)](https://doi.org/10.1016/j.cad.2022.103435)
[![ArXiv paper](https://img.shields.io/badge/arXiv-2111.02607-b31b1b.svg)](https://arxiv.org/abs/2111.02607)
[![Zenodo DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.5705740-1682d4.svg)](https://doi.org/10.5281/zenodo.5705740)

![Constrained form-finding of a spiral staircase](https://raw.githubusercontent.com/arpastrana/compas_cem/main/docs/images/staircase.gif)

The [Combinatorial Equilibrium Modeling (CEM)](https://doi.org/10.1016/j.cad.2022.103435) framework for [COMPAS](https://compas.dev/).

The [CEM framework](https://doi.org/10.1016/j.cad.2022.103435) is a numerical form-finding approach to generate forms in static equilibrium for spatial bar structures subjected to combinations of tension-compression forces and design goals.
**COMPAS CEM** encapsulates the [CEM framework](https://doi.org/10.1016/j.cad.2022.103435) into an open-source structural design tool that enables the formulation and the solution of constrained form-finding problems in plain and simple [Python](https://www.python.org/) code.

## Main features

- **Mix tension and compression forces:** Explore a wider spectrum of structural typologies by combining internal tension and compression forces in the same structure. Design space frames, bridges, tensegrities, and staircases and go beyond the conventional catalog of compression-only shells and cable-nets!

- **Solve constrained form-finding problems efficiently via automatic differentiation:** Generate forms in static equilibrium that simultaneously meet a priori design goals such as best-fitting a global target shape, restraining bar lengths, and controlling the reaction forces at the supports of a structure.

- **Usable across different 3D modeling software and operating systems:** COMPAS CEM runs on Windows, MacOS and Linux (perhaps one day in the [metaverse](https://apnews.com/article/meta-facebook-explaining-the-metaverse-f57e01cd5739840945e89fd668b0fa27)) and it does not depend on any CAD software to work. However, it provides the necessary interfaces to be seamlessly used inside popular design environments like [Rhino](https://www.rhino3d.com/), [Blender](https://www.blender.org/), and [Grasshopper](https://grasshopper3d.com/). As a [COMPAS](https://compas.dev/) extension, COMPAS CEM offers native integration and data exchange with other extensions and plugins in the COMPAS ecosystem.

- **Move those sliders with the Grasshopper plugin:** Are you a [Grasshopper](https://grasshopper3d.com/) person? Worry not. COMPAS CEM is also shipped as a precooked Grasshopper plugin to readily integrate our constrained form-finding engine into your next spaghetti pipeline 🍝.

## Installation

These are succint instructions to install **COMPAS CEM** and its [Grasshopper](https://grasshopper3d.com/) plugin.
For detailed guidance, please refer to the [COMPAS CEM Docs](https://arpastrana.github.io/compas_cem/).

Install **COMPAS CEM** with `pip`. It requires Python 3.9 or newer, and pulls in `compas` for you:

```bash
pip install compas-cem
```

To draw diagrams with the plotter or the viewer, as the examples do, install the `viz` extra instead:

```bash
pip install "compas-cem[viz]"
```

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

```bash
python -c "import compas_cem"
```

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

### Grasshopper plugin

**Warning**: The [Grasshopper](https://grasshopper3d.com/) plugin is **not installable in this release**. It targeted Rhino 6 and 7 through `compas_rhino.install`, which does not exist in COMPAS 2, and it is being reworked for Rhino 8 and 9 with [yak](https://developer.rhino3d.com/guides/yak/) packaging. Until that lands, use **COMPAS CEM** from Python.

## First steps

- [COMPAS CEM Docs](https://arpastrana.github.io/compas_cem/)
- [COMPAS CEM Examples](https://arpastrana.github.io/compas_cem/dev/examples/)
- [COMPAS CEM API Reference](https://arpastrana.github.io/compas_cem/dev/api/compas_cem/)
- [COMPAS User Guide](https://compas.dev/compas/latest/userguide/index.html)
- [COMPAS API Reference](https://compas.dev/compas/latest/api/index.html)

## Are you a bug hunter?

If you find a bug or want to suggest a potential enhancement,
please help us tackle it by filing a [report](https://github.com/arpastrana/compas_cem/issues).

## Questions and feedback

We encourage the use of the [COMPAS framework forum](https://forum.compas-framework.org/) for questions and discussions.

## Contributing

Pull requests are warmly welcome! Check the [Contributor's Guide](https://github.com/arpastrana/compas_cem/blob/main/CONTRIBUTING.md)
for more details.

## Citing

If you use **COMPAS CEM** for a project or research, please cite us using these [references](https://arpastrana.github.io/compas_cem/dev/citing/).

## Acknowledgements

This work has been supported in part by the U.S. National Science Foundation under grant OAC-2118201 and the [NSF Institute for Data Driven Dynamical Design](https://www.mines.edu/id4).

## License

MIT
