Make syntax highlighting explicit in docs

This commit is contained in:
Dion Moult
2023-01-10 10:16:28 +11:00
parent 66e067d1ce
commit c8ba96cde8
236 changed files with 753 additions and 251 deletions
@@ -21,7 +21,9 @@
Typically used for opening an IFC via a filepath, or accessing one of the
submodules.
Example::
Example:
.. code:: python
import ifcopenshell
print(ifcopenshell.version) # v0.7.0-1b1fd1e6
@@ -143,7 +145,9 @@ def create_entity(type, schema="IFC4", *args, **kwargs):
:returns: An entity instance
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
person = ifcopenshell.create_entity("IfcPerson") # #0=IfcPerson($,$,$,$,$,$,$,$)
model = ifcopenshell.file()
@@ -165,7 +169,9 @@ def register_schema(schema):
:param schema: A schema object
:type schema: ifcopenshell.express.schema_class.SchemaClass
Example::
Example:
.. code:: python
schema = ifcopenshell.express.parse("/path/to/ifc-custom.exp")
ifcopenshell.register_schema(schema)
@@ -64,7 +64,9 @@ class Usecase:
:return: The IfcRelAggregate relationship instance
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject")
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite")
@@ -43,7 +43,9 @@ class Usecase:
whole still contains any other parts.
:rtype: ifcopenshell.entity_instance.entity_instance, None
Example::
Example:
.. code:: python
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite")
subelement1 = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcBuilding")
@@ -36,7 +36,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
ifcopenshell.api.run("attribute.edit_attributes", model,
@@ -61,7 +61,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
ifcopenshell.api.run("boundary.assign_connection_geometry", model,
rel_space_boundary=element,
@@ -62,7 +62,9 @@ class Usecase:
:return: The added IfcClassification element
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Option 1: adding a custom clasification from scratch
ifcopenshell.api.run("classification.add_classification", model,
@@ -84,7 +84,9 @@ class Usecase:
:return: The newly added IfcClassificationReference
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Option 1: adding and assigning a new reference from scratch
wall_type = model.by_type("IfcWallType")[0]
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
classification = model.by_type("IfcClassification")[0]
# Change the name of the classification system to "Foo"
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
reference = model.by_type("IfcClassification")[0]
# Change the name of the reference to "Foo"
@@ -30,7 +30,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
classification = model.by_type("IfcClassification")[0]
ifcopenshell.api.run("classification.remove_classification", model,
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
wall_type = model.by_type("IfcWallType")[0]
classification = ifcopenshell.api.run("classification.add_classification",
@@ -33,7 +33,9 @@ class Usecase:
:return: The newly created IfcMetric entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
objective = ifcopenshell.api.run("constraint.add_objective", model)
metric = ifcopenshell.api.run("constraint.add_metric", model,
@@ -32,7 +32,9 @@ class Usecase:
:return: The newly created IfcObjective entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Create a new objective for code compliance requirements
objective = ifcopenshell.api.run("constraint.add_objective", model)
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
objective = ifcopenshell.api.run("constraint.add_objective", model)
metric = ifcopenshell.api.run("constraint.add_metric", model,
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
objective = ifcopenshell.api.run("constraint.add_objective", model)
ifcopenshell.api.run("constraint.edit_objective", model,
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
objective = ifcopenshell.api.run("constraint.add_objective", model)
ifcopenshell.api.run("constraint.remove_constraint", model,
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
objective = ifcopenshell.api.run("constraint.add_objective", model)
metric = ifcopenshell.api.run("constraint.add_metric", model,
@@ -107,7 +107,9 @@ class Usecase:
IfcGeometricRepresentationSubContext entity
:rtype: ifcopenshell.entity_instance.entity_instance, optional
Example::
Example:
.. code:: python
# If we plan to store 3D geometry in our IFC model, we have to setup
# a "Model" context.
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
model = ifcopenshell.api.run("context.add_context", model, context_type="Model")
# Revit had a bug where they incorrectly called the body representation a "Facetation"
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
model = ifcopenshell.api.run("context.add_context", model, context_type="Model")
# Revit had a bug where they incorrectly called the body representation a "Facetation"
@@ -43,7 +43,9 @@ class Usecase:
:return: The newly created IfcRelAssignsToControl
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# One common usecase is to assign a calendar to a task
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -33,7 +33,9 @@ class Usecase:
IfcRelAssignsToControl is returned, otherwise None.
:rtype: ifcopenshell.entity_instance.entity_instance, None
Example::
Example:
.. code:: python
# Let's relate a cost item and a product
wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
@@ -37,7 +37,9 @@ class Usecase:
:return: The newly created IfcCostItem
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# The very first cost item must be in a cost schedule
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
@@ -57,7 +57,9 @@ class Usecase:
parameter
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
chair = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
@@ -45,7 +45,9 @@ class Usecase:
:return: The newly created IfcCostSchedule entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
# Now that we have a cost schedule, we may add cost items to it
@@ -50,7 +50,9 @@ class Usecase:
:return: The newly created IfcCostValue
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# We always need a schedule first prior to adding any cost items
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
@@ -50,7 +50,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -41,7 +41,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a schedule of rates with a single rate in it of 5.0
rate_tables = ifcopenshell.api.run("cost.add_cost_schedule", model,
@@ -44,7 +44,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# First, we need a cost schedule and item
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
@@ -34,7 +34,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Assume we have a schedule with multiple items in it
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
ifcopenshell.api.run("cost.edit_cost_schedule", model,
@@ -35,7 +35,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -39,7 +39,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -32,7 +32,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -32,7 +32,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -32,7 +32,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -36,7 +36,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
@@ -37,7 +37,9 @@ class Usecase:
:return: The newly created IfcDocumentInformation entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
document = ifcopenshell.api.run("document.add_information", model)
# A document typically has a unique drawing or document name (which
@@ -41,7 +41,9 @@ class Usecase:
:return: The newly created IfcDocumentReference entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
document = ifcopenshell.api.run("document.add_information", model)
ifcopenshell.api.run("document.edit_information", model,
@@ -42,7 +42,9 @@ class Usecase:
:return: The IfcRelAssociatesDocument relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
document = ifcopenshell.api.run("document.add_information", model)
ifcopenshell.api.run("document.edit_information", model,
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
document = ifcopenshell.api.run("document.add_information", model)
ifcopenshell.api.run("document.edit_information", model,
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
document = ifcopenshell.api.run("document.add_information", model)
ifcopenshell.api.run("document.edit_information", model,
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Add a document
document = ifcopenshell.api.run("document.add_information", model)
@@ -28,7 +28,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
document = ifcopenshell.api.run("document.add_information", model)
reference = ifcopenshell.api.run("document.add_reference", model, information=document)
@@ -32,7 +32,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
document = ifcopenshell.api.run("document.add_information", model)
ifcopenshell.api.run("document.edit_information", model,
@@ -49,7 +49,9 @@ class Usecase:
:return: The created IfcRelAssignsToProduct relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation")
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
text = model.createIfcTextLiteral()
ifcopenshell.api.run("drawing.edit_text_literal", model,
@@ -37,7 +37,9 @@ class Usecase:
:return: The created IfcRelAssignsToProduct relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation")
@@ -60,7 +60,9 @@ class Usecase:
:return: The newly created IfcShapeRepresentation entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
context = ifcopenshell.util.representation.get_context(model, "Plan", "Axis", "GRAPH_VIEW")
axis = ifcopenshell.api.run("geometry.add_axis_representation", model,
@@ -35,7 +35,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
ifcopenshell.api.run("georeference.add_georeferencing", model)
"""
@@ -52,7 +52,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
ifcopenshell.api.run("georeference.add_georeferencing", model)
# This is the simplest scenario, a defined CRS (GDA2020 / MGA Zone
@@ -39,7 +39,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# A pretty standard rectangular grid, with only two axes.
grid = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcGrid")
@@ -39,7 +39,9 @@ class Usecase:
:return: The newly created IfcGroup
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
"""
@@ -34,7 +34,9 @@ class Usecase:
:return: The IfcRelAssignsToGroup relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
ifcopenshell.api.run("group.assign_group", model,
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
ifcopenshell.api.run("group.edit_group", model,
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
ifcopenshell.api.run("group.remove_group", model, group=group)
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
furniture = model.by_type("IfcFurniture")
@@ -34,7 +34,9 @@ class Usecase:
:return: The IfcRelAssignsToGroup relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
ifcopenshell.api.run("group.update_group_products", model,
@@ -39,7 +39,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Remember, all geometry needs to specify the context it is part of first.
# See ifcopenshell.api.context.add_context for details.
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
ifcopenshell.api.run("layer.edit_layer", model,
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
ifcopenshell.api.run("layer.remove_layer", model, layer=layer)
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Remember, all geometry needs to specify the context it is part of first.
# See ifcopenshell.api.context.add_context for details.
@@ -55,7 +55,9 @@ class Usecase:
:return: The newly created IfcLibraryInformation
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
ifcopenshell.api.run("library.add_library", model, name="Brickschema")
"""
@@ -38,7 +38,9 @@ class Usecase:
:return: The newly created IfcLibraryReference element
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
@@ -35,7 +35,9 @@ class Usecase:
:return: The IfcRelAssociatesLibrary relationship entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
ifcopenshell.api.run("library.edit_library", model, library=library,
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
# Let's create a reference to a single AHU in our Brickschema dataset
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
ifcopenshell.api.run("library.remove_library", model, library=library)
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
reference = ifcopenshell.api.run("library.add_reference", model, library=library)
@@ -30,7 +30,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
@@ -44,7 +44,9 @@ class Usecase:
:return: The newly created IfcMaterialConstituent
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we have a window type that has an aluminium frame
# and a glass glazing panel. Notice we are assigning to the type
@@ -42,7 +42,9 @@ class Usecase:
:return: The newly created IfcMaterialLayer
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we have a wall type that has two layers of
# gypsum with steel studs inside. Notice we are assigning to
@@ -45,7 +45,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we have a window type that has an aluminium frame
# and a glass glazing panel. Notice we are assigning to the type
@@ -55,7 +55,9 @@ class Usecase:
:return: The newly created IfcMaterial
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's create two materials with their respective categories
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
@@ -66,7 +66,9 @@ class Usecase:
:return: The newly created material set element
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we have a wall type that has two layers of
# gypsum with steel studs inside. Notice we are assigning to
@@ -48,7 +48,9 @@ class Usecase:
:return: The newly created IfcMaterialProfile
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we have a steel I-beam. Notice we are assigning to
# the type only, as all occurrences of that type will automatically
@@ -67,7 +67,9 @@ class Usecase:
:return: The IfcRelAssociatesMaterial entity
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's start with a simple concrete material
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
@@ -35,7 +35,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we have a steel I-beam. Notice we are assigning to
# the type only, as all occurrences of that type will automatically
@@ -41,7 +41,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
wood = ifcopenshell.api.run("material.add_material", model, name="TIM01", category="wood")
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
ifcopenshell.api.run("material.edit_assigned_material", model,
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's add two materials
aluminium1 = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium")
@@ -34,7 +34,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create two materials typically used for steel stud partition
# walls with gypsum lining.
@@ -34,7 +34,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's start with a simple concrete material
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
@@ -37,7 +37,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a material set to store our profiles.
material_set = ifcopenshell.api.run("material.add_profile_set", model,
@@ -39,7 +39,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we have a steel I-beam. Notice we are assigning to
# the type only, as all occurrences of that type will automatically
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Create a material set for windows made out of aluminium and glass.
material_set = ifcopenshell.api.run("material.add_material_set", model,
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Create a material set for steel stud partition walls.
material_set = ifcopenshell.api.run("material.add_material_set", model,
@@ -35,7 +35,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Create a material list for aluminium windows.
material_set = ifcopenshell.api.run("material.add_material_set", model,
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Create a material
aluminium = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium")
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Create a material set
material_set = ifcopenshell.api.run("material.add_material_set", model,
@@ -29,7 +29,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# First, let's create a material set.
material_set = ifcopenshell.api.run("material.add_profile_set", model,
@@ -36,7 +36,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
material_set = ifcopenshell.api.run("material.add_material_set", model,
name="Window", set_type="IfcMaterialList")
@@ -35,7 +35,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
@@ -80,7 +80,9 @@ class Usecase:
:return: The IfcRelNests relationship instance
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Faucets are designed to attach onto a sink through a predrilled hole.
sink = ifcopenshell.api.run("root.create_entity", model,
@@ -48,7 +48,9 @@ class Usecase:
:return: The newly created IfcActor or IfcOccupant
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Setup an organisation with a single role
organisation = ifcopenshell.api.run("owner.add_organisation", model,
@@ -40,7 +40,9 @@ class Usecase:
:return: The new IfcPostalAddress or IfcTelecomAddress
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
organisation = ifcopenshell.api.run("owner.add_organisation", model)
@@ -49,7 +49,9 @@ class Usecase:
application intended for computers to read.
:type application_identifier: str, optional
Example::
Example:
.. code:: python
application = ifcopenshell.api.run("owner.add_application", model)
"""

Some files were not shown because too many files have changed in this diff Show More