From 9c283c689a9401c62b52dc16d6008cbc0224a71d Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Mon, 6 Jan 2025 19:08:58 +0100 Subject: [PATCH 1/3] fixed plugin not called in NurbsSurface --- CHANGELOG.md | 2 ++ src/compas/geometry/surfaces/nurbs.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a659a2ac91..bcaac4ca29b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +* Fixed `NotImplementedError` when calling `compas_rhino.conversions.surface_to_compas` on NURBS Surface. + ### Removed diff --git a/src/compas/geometry/surfaces/nurbs.py b/src/compas/geometry/surfaces/nurbs.py index 4d8a30290904..2120e935f614 100644 --- a/src/compas/geometry/surfaces/nurbs.py +++ b/src/compas/geometry/surfaces/nurbs.py @@ -392,7 +392,7 @@ def from_native(cls, surface): :class:`compas.geometry.NurbsSurface` """ - raise NotImplementedError + return nurbssurface_from_native(cls, surface) @classmethod def from_parameters( From 07e30c3811154e722223096598c04c9257d0851c Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Tue, 7 Jan 2025 10:39:02 +0100 Subject: [PATCH 2/3] same in surface --- CHANGELOG.md | 1 + src/compas/geometry/surfaces/surface.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcaac4ca29b0..3d05b76ba49f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed * Fixed `NotImplementedError` when calling `compas_rhino.conversions.surface_to_compas` on NURBS Surface. +* Fixed `NotImplementedError` when calling `compas_rhino.conversions.surface_to_compas` on Surface. ### Removed diff --git a/src/compas/geometry/surfaces/surface.py b/src/compas/geometry/surfaces/surface.py index e669eddba8c6..e069ef4ccc63 100644 --- a/src/compas/geometry/surfaces/surface.py +++ b/src/compas/geometry/surfaces/surface.py @@ -160,7 +160,7 @@ def from_native(cls, surface): A COMPAS surface. """ - raise NotImplementedError + return surface_from_native(surface) @classmethod def from_obj(cls, filepath): From a761acaa2c077333fdab25eaceda3d702e5eeaf1 Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Tue, 7 Jan 2025 10:40:37 +0100 Subject: [PATCH 3/3] forgot cls --- src/compas/geometry/surfaces/surface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compas/geometry/surfaces/surface.py b/src/compas/geometry/surfaces/surface.py index e069ef4ccc63..49cd32824732 100644 --- a/src/compas/geometry/surfaces/surface.py +++ b/src/compas/geometry/surfaces/surface.py @@ -160,7 +160,7 @@ def from_native(cls, surface): A COMPAS surface. """ - return surface_from_native(surface) + return surface_from_native(cls, surface) @classmethod def from_obj(cls, filepath):