mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Write docs for void API module
This commit is contained in:
@@ -18,11 +18,38 @@
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
def __init__(self, file, element=None):
|
||||
"""Remove a filling relationship
|
||||
|
||||
If an element is filling an opening, this removes the relationship such
|
||||
that the opening and element both still exist, but the element no longer
|
||||
fills the opening.
|
||||
|
||||
:param element: The element filling an opening.
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
Example::
|
||||
|
||||
# Create a wall
|
||||
wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
|
||||
|
||||
# Create an opening, such as for a service penetration with fire and
|
||||
# acoustic requirements.
|
||||
opening = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcOpeningElement")
|
||||
|
||||
# Create a door
|
||||
door = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcDoor")
|
||||
|
||||
# The door will now fill the opening.
|
||||
ifcopenshell.api.run("void.add_filling", model, opening=opening, element=door)
|
||||
|
||||
# Not anymore!
|
||||
ifcopenshell.api.run("void.remove_filling", model, element=door)
|
||||
"""
|
||||
self.file = file
|
||||
self.settings = {"element": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
self.settings = {"element": element}
|
||||
|
||||
def execute(self):
|
||||
for rel in self.file.by_type("IfcRelFillsElement"):
|
||||
|
||||
Reference in New Issue
Block a user