Skip to content

Commit 67aebc9

Browse files
committed
Merge branch 'main' into meshobject
2 parents d1e8ef3 + 5d87114 commit 67aebc9

File tree

30 files changed

+388
-854
lines changed

30 files changed

+388
-854
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.0.0-beta.3
2+
current_version = 2.0.0-beta.4
33
message = Bump version to {new_version}
44
commit = True
55
tag = True

CHANGELOG.md

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

1010
### Added
1111

12+
### Changed
13+
14+
### Removed
15+
16+
## [2.0.0-beta.4] 2024-01-26
17+
18+
### Added
19+
1220
* Added `compas_rhino.objects`.
1321
* Added `compas_rhino.layers`.
1422
* Added `compas_rhino.install_with_pip`.
1523
* Added `before_draw` pluggable to `compas.scene.Scene.draw`.
1624
* Added `after_draw` pluggable to `compas.scene.Scene.draw`.
25+
* Added description in tutorial about `compas.scene.context`.
26+
* Added `compas_blender.data`.
27+
* Added `compas_blender.collections`.
28+
* Added `compas_blender.objects`.
29+
* Added `compas_rhino.ui`.
30+
* Added `compas_rhino.unload_modules`.
31+
* Added `compas_ghpython.unload_modules`.
32+
* Added `compas_ghpython.sets`.
33+
* Added `compas_ghpython.timer`.
1734

1835
### Changed
1936

@@ -29,6 +46,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2946
* Removed `compas_blender.geometry.curves`.
3047
* Removed `compas_rhino.utilities.objects`.
3148
* Removed `compas_rhino.utilities.layers`.
49+
* Removed `compas_rhino.utilities.constructors`.
50+
* Removed `compas_rhino.utilities.document`.
51+
* Removed `compas_rhino.utilities.geometry`.
52+
* Removed `compas_rhino.utilities.misc`.
53+
* Removed `compas_blender.utilities.data`.
54+
* Removed `compas_blender.utilities.collections`.
55+
* Removed `compas_blender.utilities.objects`.
56+
* Removed `compas_ghpython.utilities.sets`.
57+
* Removed `compas_ghpython.utilities.timer`.
3258

3359
## [2.0.0-beta.3] 2024-01-19
3460

docs/api/compas_rhino.layers.rst

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/api/compas_rhino.objects.rst

Lines changed: 0 additions & 54 deletions
This file was deleted.

docs/api/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,4 @@ COMPAS geometry and data structures in Rhino, and for basic user inter interacti
7070

7171
compas_rhino.conversions
7272
compas_rhino.geometry
73-
compas_rhino.layers
74-
compas_rhino.objects
7573
compas_rhino.scene

docs/userguide/basics.visualisation.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,31 @@ To use a different scene object as the parent, the parent attribute of the scene
114114
>>> boxobj = scene.add(box, parent=pointobj)
115115
>>> boxobj.parent
116116
PointObject
117+
118+
119+
Scene Context
120+
=============
121+
122+
Depending on where the code is executed, the "scene" will detect the current visualisation context.
123+
If the code is executed in the Rhino, the scene context will be automatically set as "Rhino".
124+
125+
>>> from compas.scene import Scene
126+
>>> from compas.geometry import Box
127+
>>> scene = Scene()
128+
>>> scene.context
129+
Rhino
130+
131+
For every context, the appropriate scene object implementations will be used automatically.
132+
133+
>>> box = Box.from_width_height_depth(1, 1, 1)
134+
>>> scene.add(box)
135+
<compas_rhino.scene.BoxObject>
136+
137+
Users can also set the scene context manually:
138+
139+
>>> scene = Scene(context="MyContextName")
140+
>>> scene.context
141+
MyContextName
142+
143+
The currently supported contexts are: "Viewer", "Rhino", "Grasshopper", "Blender" and None.
144+
For working with different contexts please refer to the next section "Tutorial: Working in CAD".

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def read(*names, **kwargs):
2222

2323
setup(
2424
name="COMPAS",
25-
version="2.0.0-beta.3",
25+
version="2.0.0-beta.4",
2626
description="The COMPAS framework",
2727
long_description=long_description,
2828
long_description_content_type="text/markdown",

src/compas/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
__copyright__ = "Copyright 2014-2022 - ETH Zurich, Copyright 2023 - COMPAS Association"
2222
__license__ = "MIT License"
2323
__email__ = "[email protected]"
24-
__version__ = "2.0.0-beta.3"
24+
__version__ = "2.0.0-beta.4"
2525

2626
version = LooseVersion(compas.__version__)
2727
versionstring = version.vstring.split("-")[0]

src/compas/_os.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ def is_rhino():
113113

114114
def is_grasshopper():
115115
try:
116-
import Rhino
117-
import scriptcontext
116+
import Rhino # noqa : F401
117+
import scriptcontext # noqa : F401
118118
except ImportError:
119119
return False
120120
return not isinstance(scriptcontext.doc, Rhino.RhinoDoc)

0 commit comments

Comments
 (0)