mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Add docs to layer API
This commit is contained in:
@@ -18,11 +18,24 @@
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
def __init__(self, file, layer=None):
|
||||
"""Removes a layer
|
||||
|
||||
All representation items assigned to the layer will remain, but the
|
||||
relationship to the layer will be removed.
|
||||
|
||||
:param layer: The IfcPresentationLayerAssignment entity to remove
|
||||
:type layer: ifcopenshell.entity_instance.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
Example::
|
||||
|
||||
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
|
||||
ifcopenshell.api.run("layer.remove_layer", model, layer=layer)
|
||||
"""
|
||||
self.file = file
|
||||
self.settings = {"layer": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
self.settings = {"layer": layer}
|
||||
|
||||
def execute(self):
|
||||
self.file.remove(self.settings["layer"])
|
||||
|
||||
Reference in New Issue
Block a user