Skip to content

Commit 8007489

Browse files
authored
Merge pull request #1375 from compas-dev/surface-api-alternative-pr
Surface API alternative PR
2 parents 47eb7ee + 6df427b commit 8007489

File tree

11 files changed

+578
-393
lines changed

11 files changed

+578
-393
lines changed

CHANGELOG.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
* 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`.
1332

1433
### Changed
1534

1635
* Fixed bug in `compas.geometry.curves.curve.Curve.reversed` by adding missing parenthesis.
1736
* Fixed all doctests so we can run `invoke test --doctest`.
18-
19-
### Removed
20-
37+
* Changed `compas.geometry.surfaces.surface.Surface.__new__` to prevent instantiation of `compas.geometry.surfaces.surface.Surface` directly.
38+
* Changed `compas.geometry.surfaces.nurbs.NurbsSurface.__new__` to prevent instantiation of `compas.geometry.surfaces.nurbs.NurbsSurface` directly.
39+
* Fixed bug in `compas.geometry.surfaces.nurbs.NurbsSurface.__data__`.
40+
* Changed `compas.geometry.surfaces.nurbs.new_nurbssurface_from_...` to `compas.geometry.surfaces.nurbs.nurbssurface_from_...`.
41+
42+
### Removed
43+
44+
* Removed pluggable `compas.geometry.surfaces.surface.new_surface`.
45+
* Removed pluggable `compas.geometry.surfaces.surface.new_surface_from_plane`.
46+
* Removed `compas.geometry.surfaces.surface.Surface.from_plane`.
47+
* Removed `compas.geometry.surfaces.surface.ConicalSurface.__new__`.
48+
* Removed `compas.geometry.surfaces.surface.CylindricalSurface.__new__`.
49+
* Removed `compas.geometry.surfaces.surface.PlanarSurface.__new__`.
50+
* Removed `compas.geometry.surfaces.surface.SphericalSurface.__new__`.
51+
* Removed `compas.geometry.surfaces.surface.ToroidalSurface.__new__`.
52+
* Removed `compas.geometry.surfaces.nurbs.NurbsSurface.__init__`.
53+
* Removed `compas_rhino.geometry.surfaces.new_surface`.
54+
* Removed `compas_rhino.geometry.surfaces.new_nurbssurface`.
55+
* Removed `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.__from_data__`.
56+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_corners`.
57+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_cylinder`.
58+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_frame`.
59+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_sphere`.
60+
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_torus`.
2161

2262
## [2.2.1] 2024-06-25
2363

src/compas/geometry/surfaces/conical.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ class ConicalSurface(Surface):
2828
2929
"""
3030

31-
# overwriting the __new__ method is necessary
32-
# to avoid triggering the plugin mechanism of the base surface class
33-
def __new__(cls, *args, **kwargs):
34-
surface = object.__new__(cls)
35-
surface.__init__(*args, **kwargs)
36-
return surface
37-
3831
DATASCHEMA = {
3932
"type": "object",
4033
"properties": {

src/compas/geometry/surfaces/cylindrical.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ class CylindricalSurface(Surface):
3030
3131
"""
3232

33-
# overwriting the __new__ method is necessary
34-
# to avoid triggering the plugin mechanism of the base surface class
35-
def __new__(cls, *args, **kwargs):
36-
surface = object.__new__(cls)
37-
surface.__init__(*args, **kwargs)
38-
return surface
39-
4033
DATASCHEMA = {
4134
"type": "object",
4235
"properties": {

0 commit comments

Comments
 (0)