This commit is contained in:
Andrej730
2024-05-23 12:02:37 +05:00
parent fffd7360cb
commit f576aadee1
23 changed files with 343 additions and 213 deletions
@@ -21,7 +21,10 @@ import math
import bmesh
import ifcopenshell.util.unit
from mathutils import Vector, Matrix
from typing import Union, Optional, Literal, Any
from typing import Union, Optional, Literal, Any, TYPE_CHECKING
if TYPE_CHECKING:
from blenderbim.bim.module.geometry.helper import Helper
Z_AXIS = Vector((0, 0, 1))
@@ -17,6 +17,7 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
from typing import Any
def map_representation(
@@ -29,7 +30,10 @@ def map_representation(
class Usecase:
def execute(self):
file: ifcopenshell.file
settings: dict[str, Any]
def execute(self) -> ifcopenshell.entity_instance:
mapping_source = self.get_mapping_source()
zero = self.file.createIfcCartesianPoint((0.0, 0.0, 0.0))
@@ -49,7 +53,7 @@ class Usecase:
}
)
def get_mapping_source(self):
def get_mapping_source(self) -> ifcopenshell.entity_instance:
for inverse in self.file.get_inverse(self.settings["representation"]):
if inverse.is_a("IfcRepresentationMap"):
return inverse
@@ -17,6 +17,7 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element