Skip to content

Commit 656154c

Browse files
committed
Merge branch 'main' into hashtree
2 parents 8c22b6d + ea316f9 commit 656154c

File tree

222 files changed

+189712
-5006
lines changed

Some content is hidden

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

222 files changed

+189712
-5006
lines changed

.github/workflows/coverage.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
coverage:
13+
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest]
18+
python: ["3.12"]
19+
20+
steps:
21+
- uses: compas-dev/compas-actions.build@v4
22+
with:
23+
invoke_lint: false
24+
invoke_test: false
25+
python: ${{ matrix.python }}
26+
- name: Run tests collecting coverage reports
27+
run: pytest --cov src/compas --cov-report=html
28+
- name: Upload coverage reports to Codecov
29+
uses: codecov/[email protected]
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}

CHANGELOG.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,162 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
* Added code coverage report uploads to codecov.io.
13+
* Added `compas.geometry.surfaces.surface.Surface.from_native`.
14+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_plane`.
15+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_cylinder`.
16+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_extrusion`.
17+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_frame`.
18+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_interpolation`.
19+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_revolution`.
20+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_sphere`.
21+
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_torus`.
22+
* Added `compas_rhino.geometry.surfaces.surface_from_native`.
23+
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_native`.
24+
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_cylinder`.
25+
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_fill`.
26+
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_torus`.
27+
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_corners`.
28+
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_cylinder`.
29+
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_frame`.
30+
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_sphere`.
31+
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_torus`.
32+
* Added `compas.geometry.curves.curve.Curve.from_native`.
33+
* Added `compas_rhino.geometry.curves.curve.Curve.from_native`.
34+
* Added `compas_rhino.geometry.curves.nurbs.NurbsCurve.from_native`.
35+
36+
### Changed
37+
38+
* Fixed bug in `compas.geometry.curves.curve.Curve.reversed` by adding missing parenthesis.
39+
* Fixed all doctests so we can run `invoke test --doctest`.
40+
* Changed `compas.geometry.surfaces.surface.Surface.__new__` to prevent instantiation of `Surface` directly.
41+
* Changed `compas.geometry.surfaces.nurbs.NurbsSurface.__new__` to prevent instantiation of `NurbsSurface` directly.
42+
* Fixed bug in `compas.geometry.surfaces.nurbs.NurbsSurface.__data__`.
43+
* Changed `compas.geometry.surfaces.nurbs.new_nurbssurface_from_...` to `nurbssurface_from_...`.
44+
* Changed `compas.geometry.curves.curve.Curve.__new__` to prevent instantiation of `Curve` directly.
45+
* Changed `compas.geometry.curves.nurbs.new_nurbscurve_from_...` to `nurbscurve_from_...`.
46+
* Changed `compas.geometry.curves.nurbs.NurbsCurve.__new__` to prevent instantiation of `NurbsCurve` directly.
47+
* Changed `compas_rhino.geometry.curves.new_nurbscurve_from_...` to `nurbscurve_from_...`.
48+
* Fixed `compas_ghpython` Grasshopper components not included in published pakcage.
49+
* Chnaged `compas.colors.Color.coerce` to take color as is, if it is already aninstance of `compas.colors.Color`.
50+
51+
### Removed
52+
53+
* Removed pluggable `compas.geometry.surfaces.surface.new_surface`.
54+
* Removed pluggable `compas.geometry.surfaces.surface.new_surface_from_plane`.
55+
* Removed `compas.geometry.surfaces.surface.Surface.from_plane`.
56+
* Removed `compas.geometry.surfaces.surface.ConicalSurface.__new__`.
57+
* Removed `compas.geometry.surfaces.surface.CylindricalSurface.__new__`.
58+
* Removed `compas.geometry.surfaces.surface.PlanarSurface.__new__`.
59+
* Removed `compas.geometry.surfaces.surface.SphericalSurface.__new__`.
60+
* Removed `compas.geometry.surfaces.surface.ToroidalSurface.__new__`.
61+
* Removed `compas.geometry.surfaces.nurbs.NurbsSurface.__init__`.
62+
* Removed `compas_rhino.geometry.surfaces.new_surface`.
63+
* Removed `compas_rhino.geometry.surfaces.new_nurbssurface`.
64+
* Removed `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.__from_data__`.
65+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_corners`.
66+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_cylinder`.
67+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_frame`.
68+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_sphere`.
69+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_torus`.
70+
* Removed `compas.geometry.curves.arc.Arc.__new__`.
71+
* Removed `compas.geometry.curves.bezier.Bezier.__new__`.
72+
* Removed `compas.geometry.curves.conic.Conic.__new__`.
73+
* Removed `compas.geometry.curves.polyline.Polyline.__new__`.
74+
* Removed `compas.geometry.curves.curve.new_curve`.
75+
* Removed `compas.geometry.curves.curve.new_nurbscurve`.
76+
* Removed `compas_rhino.geometry.curves.new_curve`.
77+
* Removed `compas_rhino.geometry.curves.new_nurbscurve`.
78+
79+
## [2.2.1] 2024-06-25
80+
81+
### Added
82+
83+
### Changed
84+
85+
* Fixed error in `compas_ghpython` causing `Scene` to fail in Grasshopper.
86+
87+
### Removed
88+
89+
90+
## [2.2.0] 2024-06-24
91+
92+
### Added
93+
94+
* Added `maxiter` parameter to `compas.geometry.icp_numpy`.
95+
* Added `resolution_u` and `resolution_v` to `compas.geometry.Shape` to control discretisation resolution.
96+
* Added `vertices`, `edges`, `faces`, `triangles` to `compas.geometry.Shape`.
97+
* Added `points`, `lines`, `polygons` to `compas.geometry.Shape`.
98+
* Added abstract `compute_vertices`, `compute_edges`, `compute_faces`, `compute_triangles` to `compas.geometry.Shape`.
99+
* Added implementation of `compute_vertices`, `compute_edges`, `compute_faces` to `compas.geometry.Box`.
100+
* Added implementation of `compute_vertices`, `compute_edges`, `compute_faces` to `compas.geometry.Capsule`.
101+
* Added implementation of `compute_vertices`, `compute_edges`, `compute_faces` to `compas.geometry.Cone`.
102+
* Added implementation of `compute_vertices`, `compute_edges`, `compute_faces` to `compas.geometry.Cylinder`.
103+
* Added implementation of `compute_vertices`, `compute_edges`, `compute_faces` to `compas.geometry.Sphere`.
104+
* Added implementation of `compute_vertices`, `compute_edges`, `compute_faces` to `compas.geometry.Torus`.
105+
* Added `compas_blender.scene.ShapeObject`.
106+
* Added `compas.geometry.vector.__radd__`.
107+
* Added `compas.geometry.vector.__rsub__`.
108+
* Added `compas.geometry.vector.__rmul__`.
109+
* Added `compas.geometry.vector.__rtruediv__`.
110+
* Added `VolMesh.cell_lines`, `VolMesh.cell_polygons`.
111+
* Added `VolMesh.vertex_edges`.
112+
* Added `VolMesh.from_meshes`.
113+
* Added `VolMesh.from_polyhedrons`.
114+
115+
### Changed
116+
117+
* Changed `compas_ghpython/utilities/drawing.py` to remove `System` dependency.
118+
* Fixed bug in `compas.geometry.ic_numpy`, which was caused by returning only the last transformation of the iteration process.
119+
* Changed `compas.geometry.Geometry.scaled` to use `compas.geometry.Geometry.scale` on a copy.
120+
* Changed `compas.geometry.Geometry.translated` to use `compas.geometry.Geometry.translate` on a copy.
121+
* Changed `compas.geometry.Geometry.rotated` to use `compas.geometry.Geometry.rotate` on a copy.
122+
* Changed `VolMesh._plane` back to point to a cell for every triplet of vertices.
123+
* Fixed `VolMesh.add_halfface`, `VolMesh.add_cell`, `VolMesh.vertex_halffaces`, `VolMesh.vertex_cells`, `VolMesh.edge_halffaces`, `VolMesh.halfface_cell`, `VolMesh.halfface_opposite_cell`, `VolMesh.halfface_opposite_halfface`, `VolMesh.cell_neighbors`.
124+
* Changed ordering of `Volmesh.edges()` to be deterministic.
125+
* Changed ordering and direction of `Volmesh.vertex_edges()` to be deterministic.
126+
* Changed check for empty vertices and faces to use `is None` to add support for `numpy` arrays.
127+
* Changed order of `u` and `v` of `compas.geometry.SphericalSurface` to the match the excpected parametrisation.
128+
* Changed `compas.geometry.Shape.to_vertices_and_faces` to use `Shape.vertices` and `Shape.faces` or `Shape.triangles`.
129+
* Changed default of `compas.scene.descriptors.color.ColorAttribute` to `None` to support native coloring in CAD contexts.
130+
* Changed `compas.colors.ColorDict.__data__` and `compas.colors.ColorDict.__from_data__` to properly support serialisation.
131+
* Moved `compas_blender.utilities.drawing` to `compas_blender.drawing` with backward compatible imports and deprecation warning.
132+
* Moved `compas_ghpython.utilities.drawing` to `compas_ghpython.drawing` with backward compatible imports and deprecation warning.
133+
* Moved `compas_rhino.utilities.drawing` to `compas_rhino.drawing` with backward compatible imports and deprecation warning.
134+
* Changed `draw_nodes` and `draw_edges` of `compas_blender.scene.GraphObject`, `compas_ghpython.scene.GraphObject`, and `compas_rhino.scene.GraphObject` to use only attributes instead of parameters.
135+
* Changed `draw_vertices`, `draw_edges` and `draw_faces` of `compas_blender.scene.MeshObject`, `compas_ghpython.scene.MeshObject`, and `compas_rhino.scene.MeshObject` to use only attributes instead of parameters.
136+
* Changed `draw_vertices`, `draw_edges` and `draw_faces` of `compas_blender.scene.VolMeshObject`, `compas_ghpython.scene.VolMeshObject`, and `compas_rhino.scene.VolMeshObject` to use only attributes instead of parameters.
137+
* Changed registration of `Capsule`, `Cone`, `Cylinder`, `Sphere`, `Torus` to `ShapeObject` in `compas_blender.scene`.
138+
* Updated `compas.geometry.vector.__mul__` to allow element-wise multiplication with another vector.
139+
* Updated `compas.geometry.vector.__truediv__` to allow element-wise division with another vector.
140+
* Fixed bug in registration `shapely` boolean plugins.
141+
* Temporarily restrict `numpy` to versions lower than `2.x`.
142+
143+
### Removed
144+
145+
* Removed `System` dependency in `compas_ghpython/utilities/drawing.py`.
146+
* Removed GH plugin for `compas.scene.clear` since it clashed with the Rhino version.
147+
148+
## [2.1.1] 2024-05-14
149+
150+
### Added
151+
12152
* Added `compas.geometry.Line.point_from_start` and `compas.geometry.Line.point_from_end`.
13153
* Added `compas.geometry.Line.flip` and `compas.geometry.Line.flipped`.
14154
* Added an `compas.geometry.Frame.interpolate_frame(s)` method
15155
* Added `compas.colors.Color.contrast`.
16156
* Added `compas.geometry.Brep.from_plane`.
17157
* Added `compas.tolerance.Tolerance.angulardeflection`.
158+
* Added `compas.tolerance.Tolerance.update_from_dict`.
18159
* Added `compas.scene.SceneObject.scene` attribute.
160+
* Added `compas.datastructures.CellNetwork.is_faces_closed`
161+
* Added `compas.datastructures.CellNetwork.delete_edge`
162+
* Added `compas.datastructures.CellNetwork.delete_cell`
163+
* Added `compas.datastructures.CellNetwork.delete_face`
164+
* Added `compas.datastructures.CellNetwork.cells_to_graph`
165+
* Added `compas.datastructures.CellNetwork.face_plane`
166+
* Added `compas.datastructures.CellNetwork.cell_volume`
167+
* Added `compas.datastructures.CellNetwork.cell_neighbors`
19168
* Added `compas.datastructures.HashTree` and `compas.datastructures.HashNode`.
20169

21170
### Changed
@@ -36,8 +185,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36185
* Changed use of `compas.geometry.allclose` to `compas.tolerance.TOL.is_allclose`.
37186
* Changed use of `compas.geometry.close` to `compas.tolerance.TOL.is_close`.
38187
* Changed imports of itertools to `compas.itertools` instead of `compas.utilities`.
188+
* Changed `compas.tolerance.Tolerance` to a singleton, to ensure having only library-wide tolerance values.
39189
* Updated `compas_rhino.conversions.point_to_compas` to allow for `Rhino.Geometry.Point` as input.
40190
* Changed `compas.datastructures.Tree.print_hierarchy` to `compas.datastructures.Tree.__str__`.
191+
* Changed `compas.scene.SceneObject.__init__` to accept `item` as kwarg.
192+
* Fixed `compas.geometry.bbox_numpy.minimum_volume_box` to avoid `numpy.linalg.LinAlgError`.
41193

42194
### Removed
43195

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# The COMPAS framework
22

33
![build](https://github.com/compas-dev/compas/workflows/build/badge.svg)
4+
[![codecov](https://codecov.io/github/compas-dev/compas/graph/badge.svg?token=wpkfew9szQ)](https://codecov.io/github/compas-dev/compas)
45
[![GitHub - License](https://img.shields.io/github/license/compas-dev/compas.svg)](https://github.com/compas-dev/compas)
56
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/compas)](https://anaconda.org/conda-forge/compas)
67
[![pip downloads](https://img.shields.io/pypi/dm/compas)](https://pypi.python.org/project/COMPAS)
62.5 KB
Loading
42 KB
Loading
31.6 KB
Loading

docs/_static/PLACEHOLDER

Whitespace-only changes.

docs/_static/versions.json

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

docs/api/compas.itertools.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
********************************************************************************
2+
compas.itertools
3+
********************************************************************************
4+
5+
.. currentmodule:: compas.itertools
6+
7+
.. rst-class:: lead
8+
9+
This package defines useful functions for working with iterable objects.
10+
11+
12+
Functions
13+
=========
14+
15+
.. autosummary::
16+
:toctree: generated/
17+
:nosignatures:
18+
19+
normalize_values
20+
remap_values
21+
meshgrid
22+
linspace
23+
flatten
24+
reshape
25+
pairwise
26+
window
27+
iterable_like

docs/api/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ and can be used independently of CAD systems in any environment that supports Py
2121
compas.datastructures
2222
compas.files
2323
compas.geometry
24+
compas.itertools
2425
compas.plugins
2526
compas.rpc
2627
compas.scene
28+
compas.tolerance
2729

2830

2931
compas_blender

0 commit comments

Comments
 (0)