mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Write docs for style API module
This commit is contained in:
@@ -20,11 +20,26 @@ import ifcopenshell.util.element
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
def __init__(self, file, style=None):
|
||||
"""Removes a presentation style
|
||||
|
||||
All of the presentation items of the style will also be removed.
|
||||
|
||||
:param style: The IfcPresentationStyle to remove.
|
||||
:type style: ifcopenshell.entity_instance.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
Example::
|
||||
|
||||
# Create a new surface style
|
||||
style = ifcopenshell.api.run("style.add_style", model)
|
||||
|
||||
# Not anymore!
|
||||
ifcopenshell.api.run("style.remove_style", model, style=style)
|
||||
"""
|
||||
self.file = file
|
||||
self.settings = {"style": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
self.settings = {"style": style}
|
||||
|
||||
def execute(self):
|
||||
self.purge_styled_items(self.settings["style"])
|
||||
|
||||
Reference in New Issue
Block a user