mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Make syntax highlighting explicit in docs
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user