Skip to content

Commit 02c5a76

Browse files
authored
Merge pull request #1012 from lottilotte/occ_from-fill
Occ from fill
2 parents c66bcec + 6a7b7e5 commit 02c5a76

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333

3434
### Changed
3535

36+
* Changed `compas.geometry.surfaces.nurbs.from_fill` to accept up to 4 curves as input.
3637
* Changed `compas_rhino.artists.MeshArtist.draw` to draw the mesh only.
3738
* Changed `compas_blender.artists.MeshArtist.draw` to draw the mesh only.
3839
* Changed `compas_ghpython.artists.MeshArtist.draw` to draw the mesh only.

src/compas/geometry/surfaces/nurbs.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,20 +320,32 @@ def from_step(cls, filepath):
320320
return new_nurbssurface_from_step(cls, filepath)
321321

322322
@classmethod
323-
def from_fill(cls, curve1, curve2):
324-
"""Construct a NURBS surface from the infill between two NURBS curves.
323+
def from_fill(cls, curve1, curve2, curve3=None, curve4=None, style='stretch'):
324+
"""Construct a NURBS surface from the infill between two, three or four contiguous NURBS curves.
325325
326326
Parameters
327327
----------
328-
curve1 : :class:`~compas.geometry.NurbsCurve`
329-
curve2 : :class:`~compas.geometry.NurbsCurve`
328+
curve1 : :class:`compas.geometry.NurbsCurve`
329+
curve2 : :class:`compas.geometry.NurbsCurve`
330+
curve3 : :class:`compas.geometry.NurbsCurve`, optional.
331+
curve4 : :class:`compas.geometry.NurbsCurve`, optional.
332+
style : Literal['stretch', 'coons', 'curved'], optional.
333+
334+
* ``'stretch'`` produces the flattest patch.
335+
* ``'curved'`` produces a rounded patch.
336+
* ``'coons'`` is between stretch and coons.
337+
338+
Raises
339+
------
340+
ValueError
341+
If the fill style is not supported.
330342
331343
Returns
332344
-------
333345
:class:`~compas.geometry.NurbsSurface`
334346
335347
"""
336-
return new_nurbssurface_from_fill(cls, curve1, curve2)
348+
return new_nurbssurface_from_fill(cls, curve1, curve2, curve3, curve4, style)
337349

338350
# ==============================================================================
339351
# Conversions

0 commit comments

Comments
 (0)