This commit is contained in:
Andrej730
2024-12-09 12:40:00 +05:00
parent 1572bf36a7
commit 6090c1c669
6 changed files with 32 additions and 13 deletions
@@ -21,6 +21,7 @@ import ifcopenshell.api.cost
import ifcopenshell.util.cost
import ifcopenshell.util.unit
import ifcopenshell.util.element
from typing import Any
def edit_cost_value_formula(file: ifcopenshell.file, cost_value: ifcopenshell.entity_instance, formula: str) -> None:
@@ -57,6 +58,9 @@ def edit_cost_value_formula(file: ifcopenshell.file, cost_value: ifcopenshell.en
class Usecase:
file: ifcopenshell.file
settings: dict[str, Any]
def execute(self):
try:
data = ifcopenshell.util.cost.unserialise_cost_value(self.settings["formula"], self.settings["cost_value"])
@@ -18,7 +18,7 @@
from __future__ import annotations
import ifcopenshell
import ifcopenshell.api
from typing import TYPE_CHECKING, Optional
from typing import TYPE_CHECKING, Optional, Any
if TYPE_CHECKING:
import bpy
@@ -67,6 +67,9 @@ def add_surface_textures(
class Usecase:
file: ifcopenshell.file
settings: dict[str, Any]
def execute(self):
if self.file.schema == "IFC2X3":
# TODO: research how compatible IFC2X3 and IFC4 textures are