From 8bf414c80608d0f8520deadbd4b2ecb993dbf32c Mon Sep 17 00:00:00 2001 From: Eivind Fonn Date: Tue, 13 Feb 2024 09:27:39 +0100 Subject: [PATCH] STL: knots aren't lists! --- splipy/io/stl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/splipy/io/stl.py b/splipy/io/stl.py index 71c6fb3..7459106 100644 --- a/splipy/io/stl.py +++ b/splipy/io/stl.py @@ -143,7 +143,7 @@ def write_surface(self, surface, n=None): knots = surface.knots(0) p = surface.order(0) u = [np.linspace(k0,k1, 2*p-3, endpoint=False) for (k0,k1) in zip(knots[:-1], knots[1:])] - u = [point for element in u for point in element] + knots + u = [point for element in u for point in element] + list(knots) u = np.sort(u) if n is not None: @@ -154,7 +154,7 @@ def write_surface(self, surface, n=None): knots = surface.knots(1) p = surface.order(1) v = [np.linspace(k0,k1, 2*p-3, endpoint=False) for (k0,k1) in zip(knots[:-1], knots[1:])] - v = [point for element in v for point in element] + knots + v = [point for element in v for point in element] + list(knots) v = np.sort(v) # perform evaluation and make sure that we have 3 components (in case of 2D geometries)