https://github.com/compas-dev/compas_cgal
COMPAS package for working with CGAL.
https://github.com/compas-dev/compas_cgal
booleans cgal compas remeshing slicing
Last synced: 5 months ago
JSON representation
COMPAS package for working with CGAL.
- Host: GitHub
- URL: https://github.com/compas-dev/compas_cgal
- Owner: compas-dev
- License: lgpl-3.0
- Created: 2020-05-17T19:45:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T18:25:17.000Z (6 months ago)
- Last Synced: 2024-10-29T18:28:35.668Z (6 months ago)
- Topics: booleans, cgal, compas, remeshing, slicing
- Language: C++
- Homepage: https://compas.dev/compas_cgal
- Size: 72.3 MB
- Stars: 23
- Watchers: 13
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# COMPAS CGAL

[](https://github.com/compas-dev/compas_cgal)
[](https://anaconda.org/conda-forge/compas_cgal)
[](https://anaconda.org/conda-forge/compas_cgal)This package provides Python bindings for specific algorithms of CGAL.
The bindings are generated with PyBind11 and data is exchanged using NumPy arrays.More information is available in the docs:
## Installation
`compas_cgal` is available via `conda-forge` for Windows, OSX, and Linux,
and can be installed using `conda`.```bash
conda create -n cgal -c conda-forge compas compas_cgal --yes
```## Dev Install
Create a development environment with the required dependencies using `conda`
and compile and install an editable version of `compas_cgal` using `setuptools`.**Windows**:
```bash
conda create -n cgal-dev python=3.10 mpir mpfr boost-cpp eigen=3.3 cgal-cpp pybind11 scip=9.0.0 --yes
conda activate cgal-dev
git clone https://github.com/compas-dev/compas_cgal
cd compas_cgal
pip install -e .'[dev]'
```**Mac**:
```bash
conda create -n cgal-dev python=3.10 gmp mpfr boost-cpp eigen=3.3 cgal-cpp pybind11 scip'>=9.0' --yes
conda activate cgal-dev
git clone https://github.com/compas-dev/compas_cgal
cd compas_cgal
pip install -e .'[dev]'
```> Note that the version of eigen is important and should be `3.3`.
To add a new c++ module to the Python wrapper, or to exclude some of the existing modules during development
you can modify the list of extension modules in `setup.py`.```python
ext_modules = [
Extension(
'compas_cgal._cgal',
sorted([
'src/compas_cgal.cpp',
'src/compas.cpp',
'src/meshing.cpp',
'src/booleans.cpp',
'src/slicer.cpp',
'src/intersections.cpp',
'src/measure.cpp',
]),
include_dirs=[
'./include',
get_eigen_include(),
get_pybind_include()
],
library_dirs=[
get_library_dirs(),
],
libraries=['mpfr', 'gmp'],
language='c++'
),
]
```## Usage
The provided functionality can be used directly from the `compas_cgal` package
or from `compas.geometry` through the plugin mechanism in COMPAS.For examples, see .
## License
`compas_cgal` is released under the LGPL 3.0 to be compatible with the license of CGAL.