compas-dev / compas-dev/compas

`compas_rhino.utilities.delete_layers` deletes whole tree when given dict as input.

Open
#710 2 comments 0 reactions 0 assignees View on GitHub
bugbash
Dominant language
Python
Stars
386
Forks
122
Avg merge
11d 46m
Merged PRs (30d)
1

Description

## Describe the bug
Unexpected behavior when using a dict as parameter for `compas_rhino.utilities.delete_layer`.

(I might be misunderstanding though, let me know if so and I can probably updated docstring)

## To Reproduce

### Environment
Rhino Python Editor

### Sample script
```
from compas_rhino.utilities import create_layers, delete_layers
layers = {'COMPAS': {'layers': {'Datastructures': {'layers': {'Mesh': {}, 'Network': {}}}}}, "SAPMOC": {}}
create_layers(layers)
delete_layers({'COMPAS': {'layers': {'Datastructures': {'layers': {'Network': {}}}}}})
```

### Result

![image](https://user-images.githubusercontent.com/14882117/102015284-e4ce2c00-3d5a-11eb-9687-b53c57b48595.png)

## Expected result

![image](https://user-images.githubusercontent.com/14882117/102015292-f1eb1b00-3d5a-11eb-88a5-80000bbafb6b.png)

### Other environment details
**Desktop (please complete the following information):**
- OS: Windows 10
- Python version: 2.7.8 (IronPython 2.7.8 (2.7.8.0) on .NET 4.0.30319.42000 (64-bit))
- Python package manager: conda

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.