Skip to content

Commit 370d9ae

Browse files
committed
example with view object
1 parent 4958745 commit 370d9ae

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/examples/surface_view2.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from compas.geometry import Point
2+
from compas_occ.geometry import NurbsSurface
3+
4+
from compas_view2.app import App
5+
6+
points = [
7+
[Point(0, 0, 0), Point(1, 0, 0), Point(2, 0, 0), Point(3, 0, 0)],
8+
[Point(0, 1, 0), Point(1, 1, 2), Point(2, 1, 2), Point(3, 1, 0)],
9+
[Point(0, 2, 0), Point(1, 2, 2), Point(2, 2, 2), Point(3, 2, 0)],
10+
[Point(0, 3, 0), Point(1, 3, 0), Point(2, 3, 0), Point(3, 3, 0)],
11+
]
12+
13+
surface = NurbsSurface.from_points(points=points)
14+
15+
# ==============================================================================
16+
# Visualisation
17+
# ==============================================================================
18+
19+
view = App()
20+
21+
view.add(surface)
22+
23+
view.run()

0 commit comments

Comments
 (0)