Unify doc-strings (remove type/rtype)

As this information is already provided in type hints and we don't need to maintain it in two places.
This commit is contained in:
Andrej730
2025-06-30 17:39:34 +05:00
parent fc10915d2b
commit 8cfd6b1754
56 changed files with 0 additions and 171 deletions
@@ -43,13 +43,10 @@ def add_style(
:param name: The name of the style. Used to easily identify it using a
style library.
:type name: str,optional
:param ifc_class: Choose from IfcSurfaceStyle, IfcCurveStyle,
IfcFillAreaStyle, or IfcTextStyle.
:type ifc_class: str
:return: The newly created style element, based on the provided
ifc_class.
:rtype: ifcopenshell.entity_instance
Example:
@@ -37,11 +37,9 @@ def add_surface_textures(
:param material: The Blender material definition with a node tree that
is compatible with glTF. See one of the valid combinations here:
https://docs.blender.org/manual/en/dev/addons/import_export/scene_gltf2.html
:type material: bpy.types.Material, optional
: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]
:param textures: A list of dictionaries containing:
1. Attributes to create IfcImageTexture.
@@ -55,9 +53,7 @@ def add_surface_textures(
based on geometry);
* `Camera` - IfcTextureCoordinateGenerator with mode COORD_EYE (autogenerated UV
based on camera position)
:type textures: list[dict], optional
:return: A list of IfcImageTexture
:rtype: list[ifcopenshell.entity_instance]
"""
usecase = Usecase()
# TODO: This usecase currently depends on Blender's data model
@@ -38,22 +38,17 @@ def assign_material_style(
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
: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
:param context: The IfcGeometricRepresentationSubContext at which this
style should be used. Typically this is the Model BODY context.
: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
showing up in Revit. In that case, set it to True, but keep in mind
that this is no longer a valid IFC. Blame Autodesk.
:type should_use_presentation_style_assignment: bool
:return: None
:rtype: None
Example:
@@ -47,23 +47,18 @@ def assign_representation_styles(
: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
: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]
: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
: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
showing up in Revit. In that case, set it to True, but keep in mind
that this is no longer a valid IFC. Blame Autodesk.
:type should_use_presentation_style_assignment: bool
:return: List of created IfcStyledItems
:rtype: list[ifcopenshell.entity_instance]
Example:
@@ -33,16 +33,12 @@ def unassign_material_style(
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
: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
:param context: The IfcGeometricRepresentationSubContext at which this
style should be unassigned. Typically this is the Model BODY context.
:type context: ifcopenshell.entity_instance
:return: None
:rtype: None
Example:
@@ -31,20 +31,16 @@ def unassign_representation_styles(
:param shape_representation: The IfcShapeRepresentation of the object
that you want to unassign styles from.
: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]
: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
showing up in Revit. In that case, set it to True, but keep in mind
that this is no longer a valid IFC. Blame Autodesk.
:type should_use_presentation_style_assignment: bool
:return: None
:rtype: None
Example: