Skip to content

Commit 6c623b6

Browse files
committed
Merge branch 'main' into feature/straight_skeleton_2
2 parents 032fae0 + e91ac21 commit 6c623b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+468
-475
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [macos-latest, windows-latest]
18-
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
18+
python: ["3.9", "3.10", "3.11", "3.12"]
1919

2020
steps:
21-
- uses: compas-dev/compas-actions.build@v3
21+
- uses: compas-dev/compas-actions.build@v4
2222
with:
2323
invoke_lint: true
2424
check_import: true

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
docs:
1515
runs-on: windows-latest
1616
steps:
17-
- uses: compas-dev/compas-actions.docs@v2
17+
- uses: compas-dev/compas-actions.docs@v3
1818
with:
1919
github_token: ${{ secrets.GITHUB_TOKEN }}
2020
use_conda: true

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ ENV/
109109
*.rui_bak
110110
*.so
111111

112-
temp/**
112+
temp
113113

114114
.DS_Store
115115

@@ -128,3 +128,7 @@ generated
128128

129129
recipe/**
130130
!recipe/sha256.py
131+
132+
.pytest_cache
133+
.ruff_cache
134+
.vscode

AUTHORS.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

MANIFEST.in

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ and compile and install an editable version of `compas_cgal` using `setuptools`.
2828
**Windows**:
2929

3030
```bash
31-
conda create -n cgal-dev python=3.8 mpir mpfr boost-cpp eigen=3.3 cgal-cpp=5.2 pybind11 compas compas_view2 scip --yes
31+
conda create -n cgal-dev python=3.9 mpir mpfr boost-cpp eigen=3.3 cgal-cpp pybind11 --yes
3232
conda activate cgal-dev
3333
git clone https://github.com/compas-dev/compas_cgal
3434
cd compas_cgal
35-
pip install -e .
35+
pip install -e .'[dev]'
3636
```
3737

3838
**Mac**:
3939

4040
```bash
41-
conda create -n cgal-dev python=3.8 gmp mpfr boost-cpp eigen=3.3 cgal-cpp=5.2 pybind11 compas compas_view2 --yes
41+
conda create -n cgal-dev python=3.9 gmp mpfr boost-cpp eigen=3.3 cgal-cpp pybind11 --yes
4242
conda activate cgal-dev
4343
git clone https://github.com/compas-dev/compas_cgal
4444
cd compas_cgal
45-
pip install -e .
45+
pip install -e .'[dev]'
4646
```
4747

4848
> Note that the version of eigen is important and should be `3.3`.

docs/examples/booleans.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
from compas.geometry import Box
2-
from compas.geometry import Sphere
32
from compas.geometry import Polyhedron
4-
5-
from compas_view2.app import App
6-
3+
from compas.geometry import Sphere
74
from compas_cgal.booleans import boolean_union_mesh_mesh
85
from compas_cgal.meshing import mesh_remesh
6+
from compas_viewer import Viewer
97

108
# ==============================================================================
119
# Make a box and a sphere
@@ -30,14 +28,17 @@
3028
V, F = boolean_union_mesh_mesh(A, B)
3129
shape = Polyhedron(V.tolist(), F.tolist()) # revise the Shape API
3230

31+
# temp solution until viewer supports polyhedrons
32+
shape = shape.to_mesh()
33+
3334
# ==============================================================================
3435
# Visualize
3536
# ==============================================================================
3637

37-
viewer = App(width=1600, height=900)
38-
viewer.view.camera.position = [5, -4, 2]
39-
viewer.view.camera.look_at([0, 1, 0])
38+
viewer = Viewer()
4039

41-
viewer.add(shape, linewidth=2)
40+
# viewer.ui.window.viewport.view3d.camera.position = [...]
41+
# viewer.ui.window.viewport.view3d.camera.target = [...]
4242

43-
viewer.run()
43+
viewer.scene.add(shape, linewidth=2, show_points=False)
44+
viewer.show()

docs/examples/intersections.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
from compas.geometry import Point
1+
from compas.datastructures import Mesh
22
from compas.geometry import Box
3-
from compas.geometry import Sphere
3+
from compas.geometry import Point
44
from compas.geometry import Polyline
5-
from compas.datastructures import Mesh
6-
7-
from compas_view2.app import App
8-
5+
from compas.geometry import Sphere
96
from compas_cgal.intersections import intersection_mesh_mesh
7+
from compas_viewer import Viewer
108

119
# ==============================================================================
1210
# Make a box and a sphere
@@ -38,19 +36,20 @@
3836
# Visualize
3937
# ==============================================================================
4038

41-
viewer = App(width=1600, height=900)
42-
viewer.view.camera.position = [5, -4, 2]
43-
viewer.view.camera.look_at([0, 1, 0])
39+
viewer = Viewer()
40+
41+
# viewer.ui.window.viewport.view3d.camera.position = [...]
42+
# viewer.ui.window.viewport.view3d.camera.target = [...]
4443

45-
viewer.add(Mesh.from_vertices_and_faces(*A), facecolor=(1, 0, 0), opacity=0.3)
46-
viewer.add(Mesh.from_vertices_and_faces(*B), facecolor=(0, 1, 0), opacity=0.3)
44+
viewer.scene.add(Mesh.from_vertices_and_faces(*A), facecolor=(1.0, 0.0, 0.0), show_points=False)
45+
viewer.scene.add(Mesh.from_vertices_and_faces(*B), facecolor=(0.0, 1.0, 0.0), show_points=False, opacity=0.3)
4746

4847
for polyline in polylines:
49-
viewer.add(
48+
viewer.scene.add(
5049
polyline,
51-
linecolor=(0, 0, 1),
50+
linecolor=(0.0, 0.0, 1.0),
5251
linewidth=3,
53-
pointcolor=(0, 0, 1),
52+
pointcolor=(0.0, 0.0, 1.0),
5453
pointsize=20,
5554
show_points=True,
5655
)

0 commit comments

Comments
 (0)