Skip to content

Commit

Permalink
STL: knots aren't lists!
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Feb 13, 2024
1 parent 2667610 commit 8bf414c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions splipy/io/stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit 8bf414c

Please sign in to comment.