Skip to content

Commit 210e105

Browse files
committed
Merge branch 'main' of https://github.com/compas-dev/compas
2 parents 7f667e9 + 81e33c0 commit 210e105

File tree

18 files changed

+82
-41
lines changed

18 files changed

+82
-41
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
* Added `compas_rhino.objects`.
1313
* Added `compas_rhino.layers`.
1414
* Added `compas_rhino.install_with_pip`.
15+
* Added `before_draw` pluggable to `compas.scene.Scene.draw`.
16+
* Added `after_draw` pluggable to `compas.scene.Scene.draw`.
1517

1618
### Changed
1719

1820
* Changed `compas.tolerance.Tolerance` into singleton.
1921
* Changed `compas_rhino.geometry.curves.nursb.RhinoNurbsCurve` to use private data API.
2022
* Changed `compas_rhino.geometry.surfaces.nursb.RhinoNurbsSurface` to use private data API.
23+
* Changed `compas.scene.Scene.redraw` to `draw`.
24+
* Fixed `register_scene_objects` not called when there is a context given in kwargs of `SceneObject`.
2125

2226
### Removed
2327

docs/api/compas.scene.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ Pluggables are functions that don't have an actual implementation, but receive a
5151
:nosignatures:
5252

5353
clear
54-
redraw
54+
before_draw
55+
after_draw
5556
register_scene_objects

docs/userguide/basics.visualisation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COMPAS (data) objects can be visualised by placing them into a "scene".
99
>>> box = Box(1)
1010
>>> scene = Scene()
1111
>>> scene.add(box)
12-
>>> scene.redraw()
12+
>>> scene.draw()
1313

1414
.. When a COMPAS object is added, the scene automatically creates a corresponding scene object for the current/active visualisation context.
1515
.. Currently, four visualisation contexts are supported: COMPAS Viewer (default), Rhino, Grasshopper, and Blender.

docs/userguide/cad.blender.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ For more information on visualisation scenes, see :doc:`/userguide/basics.visual
9494
scene = Scene()
9595
scene.clear()
9696
scene.add(mesh)
97-
scene.redraw()
97+
scene.draw()
9898
9999
100100
Conversions

docs/userguide/cad.grasshopper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ component on your Grasshopper canvas, paste the following script and hit `OK`.
2626
2727
scene = Scene()
2828
scene.add(mesh)
29-
a = scene.redraw()
29+
a = scene.draw()
3030
3131
3232
.. figure:: /_images/userguide/cad.grasshopper.gh_verify.jpg

docs/userguide/cad.rhino.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ For more information on visualisation scenes, see :doc:`/userguide/basics.visual
8383
scene = Scene()
8484
scene.clear()
8585
scene.add(mesh)
86-
scene.redraw()
86+
scene.draw()
8787
8888
8989
Conversions

docs/userguide/cad.rhino8.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ For more information on visualisation scenes, see :doc:`/userguide/basics.visual
106106
scene = Scene()
107107
scene.clear()
108108
scene.add(mesh)
109-
scene.redraw()
109+
scene.draw()
110110
111111
112112
Conversions

docs/userguide/firststeps.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ A Simple Box
2828
2929
scene = Scene()
3030
scene.add(box)
31-
scene.redraw()
31+
scene.draw()
3232
3333
3434
Points-in-box Test
@@ -51,7 +51,7 @@ Points-in-box Test
5151
for point in pcl:
5252
color = Color.red() if box.contains(point) else Color.blue()
5353
scene.add(point, color=color)
54-
scene.redraw()
54+
scene.draw()
5555
5656
5757
Creating a Mesh From an OBJ File
@@ -67,4 +67,4 @@ Creating a Mesh From an OBJ File
6767
6868
scene = Scene()
6969
scene.add(mesh)
70-
scene.redraw()
70+
scene.draw()

docs/userguide/samples/point_in_box.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
size = 30
2323
scene.add(point, pointcolor=color, pointsize=size)
2424

25-
scene.redraw()
25+
scene.draw()

docs/userguide/scene.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@
8484

8585

8686
scene.print_hierarchy()
87-
scene.redraw()
87+
scene.draw()

0 commit comments

Comments
 (0)