Skip to content

Commit 328605d

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents a5c4d65 + 9466e36 commit 328605d

File tree

6 files changed

+26
-11
lines changed

6 files changed

+26
-11
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
python-version: 3.8
2525
- name: Install dependencies
2626
run: |
27+
sudo apt-get install graphviz
2728
python -m pip install --upgrade pip
2829
python -m pip install cython --install-option="--no-cython-compile"
2930
- name: Install

docs/citing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Citing
1313
@misc{compas-dev,
1414
title = {{COMPAS}: A framework for computational research in architecture and structures.},
1515
author = {Tom Van Mele and many others},
16-
note = {http://compas-dev.github.io/},
16+
note = {http://compas.dev},
1717
year = {2017-2019},
1818
doi = {10.5281/zenodo.2594510},
1919
url = {https://doi.org/10.5281/zenodo.2594510},

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"sphinx.ext.githubpages",
5050
"sphinx.ext.coverage",
5151
"sphinx.ext.inheritance_diagram",
52-
# "sphinx.ext.graphviz",
52+
"sphinx.ext.graphviz",
5353
"matplotlib.sphinxext.plot_directive",
5454
"m2r",
5555
"nbsphinx",
@@ -252,7 +252,7 @@ def patched_parse(self):
252252

253253
intersphinx_mapping = {
254254
"python": ("https://docs.python.org/", None),
255-
"compas": ("https://compas-dev.github.io/compas", None),
255+
"compas": ("https://compas.dev/compas/latest/", None),
256256
}
257257

258258

docs/tutorial/geometry.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Geometry
88

99
This tutorial provides a quick tour of the functionality in :mod:`compas.geometry`.
1010
For a complete overview, visit the API Reference:
11-
https://compas-dev.github.io/main/api/compas.geometry.html
11+
https://compas.dev/compas/latest/api/compas.geometry.html
1212

1313

1414
Points and Vectors
@@ -136,7 +136,9 @@ Many of the basic functions are also available as object methods
136136
>>> x.dot(y)
137137
0.0
138138

139-
>>> x.normalize()
139+
>>> z = Vector(1, 2, 3)
140+
>>> z.unitize()
141+
Vector(0.267, 0.535, 0.802)
140142

141143
>>> x.cross([0, 1, 0])
142144
Vector(0.000, 0.000, 1.000)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def read(*names, **kwargs):
2929
description='The COMPAS framework',
3030
long_description=long_description,
3131
long_description_content_type='text/markdown',
32-
url='http://compas-dev.github.io',
32+
url='http://compas.dev',
3333
author='Tom Van Mele',
3434
author_email='[email protected]',
3535
license='MIT',
@@ -52,7 +52,7 @@ def read(*names, **kwargs):
5252
],
5353
keywords=['architecture', 'engineering', 'fabrication', 'construction'],
5454
project_urls={
55-
"Documentation": "http://compas-dev.github.io",
55+
"Documentation": "http://compas.dev",
5656
"Forum": "https://forum.compas-framework.org/",
5757
"Repository": "https://github.com/compas-dev/compas",
5858
"Issues": "https://github.com/compas-dev/compas/issues",

src/compas_rhino/utilities/layers.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,15 @@ def delete_layers(layers):
277277
278278
Parameters
279279
----------
280-
layers : dict
281-
A dictionary of layers with the keys representing layer names,
282-
and the values also dictionaries defining optional nested layers.
280+
layers : :obj:`dict` or :obj:`list` of :obj:`str`
281+
Can be given as either a list of strings or as a dictionary.
282+
283+
When given as a list the list elements should be name of layers given
284+
with ``"::"`` as a separator between hierarchies.
285+
286+
It can also be defined as a dictionary of layers with the keys
287+
representing layer names, and the values also dictionaries defining
288+
optional nested layers.
283289
284290
Examples
285291
--------
@@ -312,9 +318,15 @@ def recurse(layers, parent=None):
312318

313319
rs.EnableRedraw(False)
314320
recurse(layers)
321+
315322
for layer in to_delete:
316323
if rs.IsLayer(layer):
317-
rs.DeleteLayer(layer)
324+
if rs.IsLayerCurrent(layer):
325+
print("Can't delete {} as it is the current layer".format(layer))
326+
continue
327+
328+
rs.PurgeLayer(layer)
329+
318330
rs.EnableRedraw(True)
319331

320332

0 commit comments

Comments
 (0)