mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 12:32:39 +00:00
pset.edit_qto - document editing complex quantities
This commit is contained in:
@@ -30,12 +30,14 @@ FLOAT_TYPE_KEYWORDS = (
|
|||||||
("Time", ("time", "duration")),
|
("Time", ("time", "duration")),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PROP_VALUE_TYPE = Union[ifcopenshell.entity_instance, float, int, dict[str, "PROP_VALUE_TYPE"]]
|
||||||
|
|
||||||
|
|
||||||
def edit_qto(
|
def edit_qto(
|
||||||
file: ifcopenshell.file,
|
file: ifcopenshell.file,
|
||||||
qto: ifcopenshell.entity_instance,
|
qto: ifcopenshell.entity_instance,
|
||||||
name: Optional[str] = None,
|
name: Optional[str] = None,
|
||||||
properties: Optional[dict[str, Union[ifcopenshell.entity_instance, float, int]]] = None,
|
properties: Optional[dict[str, PROP_VALUE_TYPE]] = None,
|
||||||
pset_template: Optional[ifcopenshell.entity_instance] = None,
|
pset_template: Optional[ifcopenshell.entity_instance] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Edits a quantity set and its quantities
|
"""Edits a quantity set and its quantities
|
||||||
@@ -49,7 +51,7 @@ def edit_qto(
|
|||||||
One major difference is that quantities set to None are always purged.
|
One major difference is that quantities set to None are always purged.
|
||||||
It is not allowed to have None quantities in IFC.
|
It is not allowed to have None quantities in IFC.
|
||||||
|
|
||||||
:param qto: The IfcElementQuantity to edit.
|
:param qto: The IfcElementQuantity or IfcPhysicalComplexQuantity to edit.
|
||||||
:param name: A new name for the quantity set. If no name is specified,
|
:param name: A new name for the quantity set. If no name is specified,
|
||||||
the quantity set name is not changed.
|
the quantity set name is not changed.
|
||||||
:param properties: A dictionary of properties. The keys must be a string
|
:param properties: A dictionary of properties. The keys must be a string
|
||||||
@@ -64,6 +66,9 @@ def edit_qto(
|
|||||||
|
|
||||||
- `int` values will map to IfcQuantityCount.
|
- `int` values will map to IfcQuantityCount.
|
||||||
|
|
||||||
|
- dictionary values will be used to create IfcPhysicalComplexQuantity with
|
||||||
|
properties from the dictionary.
|
||||||
|
|
||||||
If more control is desired, you may explicitly specify IFC data objects directly.
|
If more control is desired, you may explicitly specify IFC data objects directly.
|
||||||
:param pset_template: If a quantity set template is provided, this will
|
:param pset_template: If a quantity set template is provided, this will
|
||||||
be used to determine data types. If no user-defined template is
|
be used to determine data types. If no user-defined template is
|
||||||
|
|||||||
Reference in New Issue
Block a user