mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Replace all ifcopenshell.api.run with ifcopenshell.api static functions.
This commit is contained in:
@@ -47,7 +47,7 @@ def add_arbitrary_profile(
|
||||
|
||||
# A 10mm by 100mm rectangle, such that might be used as a wooden
|
||||
# skirting board or kick plate.
|
||||
square = ifcopenshell.api.run("profile.add_arbitrary_profile", model,
|
||||
square = ifcopenshell.api.profile.add_arbitrary_profile(model,
|
||||
profile=[(0., 0.), (.01, 0.), (.01, .1), (0., .1), (0., 0.)],
|
||||
name="SK01 Profile")
|
||||
"""
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ def add_arbitrary_profile_with_voids(
|
||||
.. code:: python
|
||||
|
||||
# A 400mm by 400mm square with a 200mm by 200mm hole in it.
|
||||
square_with_hole = ifcopenshell.api.run("profile.add_arbitrary_profile_with_voids", model,
|
||||
square_with_hole = ifcopenshell.api.profile.add_arbitrary_profile_with_voids(model,
|
||||
outer_profile=[(0., 0.), (.4, 0.), (.4, .4), (0., .4), (0., 0.)],
|
||||
inner_profiles=[[(0.1, 0.1), (0.3, 0.1), (0.3, 0.3), (0.1, 0.3), (0.1, 0.1)]],
|
||||
name="SK01 Hole Profile")
|
||||
|
||||
@@ -38,7 +38,7 @@ def add_parameterized_profile(file: ifcopenshell.file, ifc_class: str) -> ifcope
|
||||
|
||||
.. code:: python
|
||||
|
||||
circle = ifcopenshell.api.run("profile.add_parameterized_profile", model,
|
||||
circle = ifcopenshell.api.profile.add_parameterized_profile(model,
|
||||
ifc_class="IfcCircleProfileDef")
|
||||
circle.Radius = 1.
|
||||
"""
|
||||
|
||||
@@ -36,11 +36,11 @@ def edit_profile(file: ifcopenshell.file, profile: ifcopenshell.entity_instance,
|
||||
|
||||
.. code:: python
|
||||
|
||||
circle = ifcopenshell.api.run("profile.add_parameterized_profile", model,
|
||||
circle = ifcopenshell.api.profile.add_parameterized_profile(model,
|
||||
ifc_class="IfcCircleProfileDef")
|
||||
circle = 1.
|
||||
|
||||
ifcopenshell.api.run("profile.edit_profile", model,
|
||||
ifcopenshell.api.profile.edit_profile(model,
|
||||
profile=circle, attributes={"ProfileName": "1000mm Dia"})
|
||||
"""
|
||||
settings = {"profile": profile, "attributes": attributes}
|
||||
|
||||
@@ -32,10 +32,10 @@ def remove_profile(file: ifcopenshell.file, profile: ifcopenshell.entity_instanc
|
||||
|
||||
.. code:: python
|
||||
|
||||
circle = ifcopenshell.api.run("profile.add_parameterized_profile", model,
|
||||
circle = ifcopenshell.api.profile.add_parameterized_profile(model,
|
||||
ifc_class="IfcCircleProfileDef")
|
||||
circle = 1.
|
||||
ifcopenshell.api.run("profile.remove_profile", model, profile=circle)
|
||||
ifcopenshell.api.profile.remove_profile(model, profile=circle)
|
||||
"""
|
||||
settings = {"profile": profile}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user