mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
#2185 Set up auto generated API reference documentation via sphinx-autoapi
This commit is contained in:
@@ -21,14 +21,24 @@ import ifcopenshell.api
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
def __init__(self, file, product=None, relating_object=None):
|
||||
"""Assigns an object as an aggregate to a product
|
||||
|
||||
:param product: The part of the aggregate
|
||||
:param relating_object: The whole of the aggregate
|
||||
:return: entity: The aggregate relationship
|
||||
|
||||
Example::
|
||||
|
||||
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite")
|
||||
subelement = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcBuilding")
|
||||
ifcopenshell.api.run("aggregate.assign_object", model, product=subelement, relating_object=element)
|
||||
"""
|
||||
self.file = file
|
||||
self.settings = {
|
||||
"product": None,
|
||||
"relating_object": None,
|
||||
"product": product,
|
||||
"relating_object": relating_object,
|
||||
}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
def execute(self):
|
||||
decomposes = None
|
||||
|
||||
Reference in New Issue
Block a user