Fix docstrings to reference datatype as it would be used for users

This commit is contained in:
Dion Moult
2024-05-06 08:39:41 +10:00
parent d694d8fcc2
commit a213ab6760
266 changed files with 439 additions and 439 deletions
@@ -46,7 +46,7 @@ class Usecase:
:type ifc_class: str
:return: The newly created style element, based on the provided
ifc_class.
:rtype: ifcopenshell.entity_instance.entity_instance
:rtype: ifcopenshell.entity_instance
Example:
@@ -68,7 +68,7 @@ class Usecase:
:param style: The IfcSurfaceStyle you want to add to presentation item
to. See ifcopenshell.api.style.add_style.
:type style: ifcopenshell.entity_instance.entity_instance
:type style: ifcopenshell.entity_instance
:param ifc_class: Choose from IfcSurfaceStyleShading,
IfcSurfaceStyleRendering, IfcSurfaceStyleWithTextures,
IfcSurfaceStyleLighting, IfcSurfaceStyleReflectance, or
@@ -78,7 +78,7 @@ class Usecase:
:type attributes: dict, optional
:return: The newly created presentation item based on the provided
ifc_class.
:rtype: ifcopenshell.entity_instance.entity_instance
:rtype: ifcopenshell.entity_instance
Example:
@@ -31,7 +31,7 @@ class Usecase:
:param uv_maps: A list of IfcIndexedTextureMap for any
IfcTessellatedFaceSets that the representation has, obtained from
the HasTextures attribute.
:type uv_maps: list[ifcopenshell.entity_instance.entity_instance]
:type uv_maps: list[ifcopenshell.entity_instance]
:param textures: A list of dictionaries containing:
1. Attributes to create IfcImageTexture.
@@ -47,7 +47,7 @@ class Usecase:
based on camera position)
:type textures: list[dict]
:return: A list of IfcImageTexture
:rtype: list[ifcopenshell.entity_instance.entity_instance]
:rtype: list[ifcopenshell.entity_instance]
"""
# TODO: This usecase currently depends on Blender's data model
self.file = file
@@ -32,14 +32,14 @@ class Usecase:
to materials. This API function provides that capability.
:param material: The IfcMaterial which you want to assign the style to.
:type material: ifcopenshell.entity_instance.entity_instance
:type material: ifcopenshell.entity_instance
:param style: The IfcPresentationStyle (typically IfcSurfaceStyle) that
you want to assign to the material. This will then be applied to all
objects that have that material.
:type style: ifcopenshell.entity_instance.entity_instance
:type style: ifcopenshell.entity_instance
:param context: The IfcGeometricRepresentationSubContext at which this
style should be used. Typically this is the Model BODY context.
:type context: ifcopenshell.entity_instance.entity_instance
:type context: ifcopenshell.entity_instance
:param should_use_presentation_style_assignment: This is a technical
detail to accomodate a bug in Revit. This should always be left as
the default of False, unless you are finding that colours aren't
@@ -42,12 +42,12 @@ class Usecase:
:param shape_representation: The IfcShapeRepresentation of the object
that you want to assign styles to. This implicitly defines the
context at which the styles should be used.
:type shape_representation: ifcopenshell.entity_instance.entity_instance
:type shape_representation: ifcopenshell.entity_instance
:param styles: A list of presentation styles, typically IfcSurfaceStyle.
The number of items in the list should correlate with the number of
items in the shape_representation's Items attribute. If you have
more items than styles, the last style is used.
:type styles: list[ifcopenshell.entity_instance.entity_instance]
:type styles: list[ifcopenshell.entity_instance]
:param replace_previous_same_type_style: Remove previously assigned styles
of the same type as currently assign style`. Defaults to `True`.
:type replace_previous_same_type_style: bool
@@ -58,7 +58,7 @@ class Usecase:
that this is no longer a valid IFC. Blame Autodesk.
:type should_use_presentation_style_assignment: bool
:return: List of created IfcStyledItems
:rtype: ifcopenshell.entity_instance.entity_instance
:rtype: ifcopenshell.entity_instance
Example:
@@ -25,7 +25,7 @@ class Usecase:
IfcPresentationStyle, consult the IFC documentation.
:param style: The IfcPresentationStyle entity you want to edit
:type style: ifcopenshell.entity_instance.entity_instance
:type style: ifcopenshell.entity_instance
:param attributes: a dictionary of attribute names and values.
:type attributes: dict, optional
:return: None
@@ -33,7 +33,7 @@ class Usecase:
example below.
:param style: The IfcPresentationStyle entity you want to edit
:type style: ifcopenshell.entity_instance.entity_instance
:type style: ifcopenshell.entity_instance
:param attributes: a dictionary of attribute names and values.
:type attributes: dict, optional
:return: None
@@ -26,7 +26,7 @@ class Usecase:
All of the presentation items of the style will also be removed.
:param style: The IfcPresentationStyle to remove.
:type style: ifcopenshell.entity_instance.entity_instance
:type style: ifcopenshell.entity_instance
:return: None
:rtype: None
@@ -25,7 +25,7 @@ class Usecase:
removes the representation but not the underlying styles.
:param representation: The IfcStyledRepresentation to remove.
:type representation: ifcopenshell.entity_instance.entity_instance
:type representation: ifcopenshell.entity_instance
:return: None
:rtype: None
@@ -25,7 +25,7 @@ class Usecase:
"""Removes a presentation item from a presentation style
:param style: The IfcPresentationItem to remove.
:type style: ifcopenshell.entity_instance.entity_instance
:type style: ifcopenshell.entity_instance
:return: None
:rtype: None
@@ -27,14 +27,14 @@ class Usecase:
This does the inverse of assign_material_style.
:param material: The IfcMaterial which you want to unassign the style from.
:type material: ifcopenshell.entity_instance.entity_instance
:type material: ifcopenshell.entity_instance
:param style: The IfcPresentationStyle (typically IfcSurfaceStyle) that
you want to unassign from material. This will then be applied to all
objects that have that material.
:type style: ifcopenshell.entity_instance.entity_instance
:type style: ifcopenshell.entity_instance
:param context: The IfcGeometricRepresentationSubContext at which this
style should be unassigned. Typically this is the Model BODY context.
:type context: ifcopenshell.entity_instance.entity_instance
:type context: ifcopenshell.entity_instance
:return: None
:rtype: None
@@ -25,12 +25,12 @@ class Usecase:
:param shape_representation: The IfcShapeRepresentation of the object
that you want to unassign styles from.
:type shape_representation: ifcopenshell.entity_instance.entity_instance
:type shape_representation: ifcopenshell.entity_instance
:param styles: A list of presentation styles, typically IfcSurfaceStyle.
The number of items in the list should correlate with the number of
items in the shape_representation's Items attribute. If you have
more items than styles, the last style is used.
:type styles: list[ifcopenshell.entity_instance.entity_instance]
:type styles: list[ifcopenshell.entity_instance]
:param should_use_presentation_style_assignment: This is a technical
detail to accomodate a bug in Revit. This should always be left as
the default of False, unless you are finding that colours aren't