Skip to content

Commit

Permalink
Merge pull request #1375 from compas-dev/surface-api-alternative-pr
Browse files Browse the repository at this point in the history
Surface API alternative PR
  • Loading branch information
tomvanmele authored Jul 4, 2024
2 parents 47eb7ee + 6df427b commit 8007489
Show file tree
Hide file tree
Showing 11 changed files with 578 additions and 393 deletions.
46 changes: 43 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

* Added code coverage report uploads to codecov.io.
* Added `compas.geometry.surfaces.surface.Surface.from_native`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_plane`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_cylinder`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_extrusion`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_frame`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_interpolation`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_revolution`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_sphere`.
* Added `compas.geometry.surfaces.nurbs.NurbsSurface.from_torus`.
* Added `compas_rhino.geometry.surfaces.surface_from_native`.
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_native`.
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_cylinder`.
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_fill`.
* Added `compas_rhino.geometry.surfaces.nurbssurface_from_torus`.
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_corners`.
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_cylinder`.
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_frame`.
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_sphere`.
* Added `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.from_torus`.

### Changed

* Fixed bug in `compas.geometry.curves.curve.Curve.reversed` by adding missing parenthesis.
* Fixed all doctests so we can run `invoke test --doctest`.

### Removed

* Changed `compas.geometry.surfaces.surface.Surface.__new__` to prevent instantiation of `compas.geometry.surfaces.surface.Surface` directly.
* Changed `compas.geometry.surfaces.nurbs.NurbsSurface.__new__` to prevent instantiation of `compas.geometry.surfaces.nurbs.NurbsSurface` directly.
* Fixed bug in `compas.geometry.surfaces.nurbs.NurbsSurface.__data__`.
* Changed `compas.geometry.surfaces.nurbs.new_nurbssurface_from_...` to `compas.geometry.surfaces.nurbs.nurbssurface_from_...`.

### Removed

* Removed pluggable `compas.geometry.surfaces.surface.new_surface`.
* Removed pluggable `compas.geometry.surfaces.surface.new_surface_from_plane`.
* Removed `compas.geometry.surfaces.surface.Surface.from_plane`.
* Removed `compas.geometry.surfaces.surface.ConicalSurface.__new__`.
* Removed `compas.geometry.surfaces.surface.CylindricalSurface.__new__`.
* Removed `compas.geometry.surfaces.surface.PlanarSurface.__new__`.
* Removed `compas.geometry.surfaces.surface.SphericalSurface.__new__`.
* Removed `compas.geometry.surfaces.surface.ToroidalSurface.__new__`.
* Removed `compas.geometry.surfaces.nurbs.NurbsSurface.__init__`.
* Removed `compas_rhino.geometry.surfaces.new_surface`.
* Removed `compas_rhino.geometry.surfaces.new_nurbssurface`.
* Removed `compas_rhino.geometry.surfaces.nurbs.NurbsSurface.__from_data__`.
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_corners`.
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_cylinder`.
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_frame`.
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_sphere`.
* Removed `compas_rhino.geometry.surfaces.surface.Surface.from_torus`.

## [2.2.1] 2024-06-25

Expand Down
7 changes: 0 additions & 7 deletions src/compas/geometry/surfaces/conical.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ class ConicalSurface(Surface):
"""

# overwriting the __new__ method is necessary
# to avoid triggering the plugin mechanism of the base surface class
def __new__(cls, *args, **kwargs):
surface = object.__new__(cls)
surface.__init__(*args, **kwargs)
return surface

DATASCHEMA = {
"type": "object",
"properties": {
Expand Down
7 changes: 0 additions & 7 deletions src/compas/geometry/surfaces/cylindrical.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ class CylindricalSurface(Surface):
"""

# overwriting the __new__ method is necessary
# to avoid triggering the plugin mechanism of the base surface class
def __new__(cls, *args, **kwargs):
surface = object.__new__(cls)
surface.__init__(*args, **kwargs)
return surface

DATASCHEMA = {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 8007489

Please sign in to comment.