Skip to content

Commit eb3e4ef

Browse files
authored
Merge pull request #920 from compas-dev/occ-nurbs
Integrate OCC nurbs through pluggables
2 parents e32dab4 + e8b5de8 commit eb3e4ef

File tree

10 files changed

+1301
-1
lines changed

10 files changed

+1301
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
* Add abstract methods to `compas_rhino.artists.volmeshartist`.
1313

14+
* Added `compas.geometry.Curve` and `compas.geometry.NurbsCurve`.
15+
* Added `compas.geometry.Surface` and `compas.geometry.NurbsSurface`.
16+
* Added pluggables for `compas.geometry.NurbsCurve.__new__`, `compas.geometry.NurbsCurve.from_parameters`, `compas.geometry.NurbsCurve.from_points`, `compas.geometry.NurbsCurve.from_interpolation`, `compas.geometry.NurbsCurve.from_step`.
17+
* Added pluggables for `compas.geometry.NurbsSurface.__new__`, `compas.geometry.NurbsSurface.from_parameters`, `compas.geometry.NurbsSurface.from_points`, `compas.geometry.NurbsSurface.from_fill`, `compas.geometry.NurbsSurface.from_step`.
18+
1419
### Changed
1520

1621
* Fixed bug in directions of `compas.datastructures.Mesh.from_meshgrid`.

src/compas/geometry/__init__.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,28 @@
9292
Translation
9393
9494
95+
Curves
96+
------
97+
98+
.. autosummary::
99+
:toctree: generated/
100+
:nosignatures:
101+
102+
Curve
103+
NurbsCurve
104+
105+
106+
Surfaces
107+
--------
108+
109+
.. autosummary::
110+
:toctree: generated/
111+
:nosignatures:
112+
113+
Surface
114+
NurbsSurface
115+
116+
95117
Functions
96118
=========
97119
@@ -948,6 +970,16 @@
948970
PointCollectionNumpy
949971
)
950972

973+
from .curves import (
974+
Curve,
975+
NurbsCurve
976+
)
977+
978+
from .surfaces import (
979+
Surface,
980+
NurbsSurface
981+
)
982+
951983
__all__ = [
952984
'close',
953985
'allclose',
@@ -1250,6 +1282,12 @@
12501282

12511283
'Collection',
12521284
'PointCollection',
1285+
1286+
'Curve',
1287+
'NurbsCurve',
1288+
1289+
'Surface',
1290+
'NurbsSurface'
12531291
]
12541292

12551293
if not compas.IPY:
@@ -1275,5 +1313,5 @@
12751313
'delaunay_from_points_numpy',
12761314
'voronoi_from_points_numpy',
12771315
'CollectionNumpy',
1278-
'PointCollectionNumpy'
1316+
'PointCollectionNumpy',
12791317
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from __future__ import absolute_import
2+
3+
from .curve import Curve # noqa: F401
4+
from .nurbs import NurbsCurve # noqa: F401
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from __future__ import print_function
2+
from __future__ import absolute_import
3+
from __future__ import division
4+
5+
from compas.data import Data
6+
7+
8+
class Curve(Data):
9+
"""Base class for curves."""

0 commit comments

Comments
 (0)