This commit is contained in:
Andrej730
2025-09-15 09:52:30 +05:00
parent 5de96c9f95
commit be66d4884d
23 changed files with 47 additions and 8 deletions
@@ -20,7 +20,7 @@ import bpy
import ifcopenshell.util.element import ifcopenshell.util.element
import ifcopenshell.util.geolocation import ifcopenshell.util.geolocation
import ifcopenshell.util.placement import ifcopenshell.util.placement
import ifcopenshell.util.schema import ifcopenshell.util.representation
import ifcopenshell.util.unit import ifcopenshell.util.unit
import bonsai.tool as tool import bonsai.tool as tool
from typing import Any, Union from typing import Any, Union
@@ -213,9 +213,9 @@ class UnassignGroup(bpy.types.Operator, tool.Ifc.Operator):
def _execute(self, context): def _execute(self, context):
products = [ products = [
tool.Ifc.get_entity(o) element
for o in tool.Blender.get_selected_objects(include_active=False) for o in tool.Blender.get_selected_objects(include_active=False)
if tool.Ifc.get_entity(o) if (element := tool.Ifc.get_entity(o))
] ]
if not products: if not products:
return return
+1
View File
@@ -45,6 +45,7 @@ class BIM_PT_groups(Panel):
if not GroupsData.is_loaded: if not GroupsData.is_loaded:
GroupsData.load() GroupsData.load()
self.props = tool.Blender.get_group_props() self.props = tool.Blender.get_group_props()
assert self.layout
row = self.layout.row(align=True) row = self.layout.row(align=True)
row.label(text=f"{GroupsData.data['total_groups']} Groups Found", icon="OUTLINER") row.label(text=f"{GroupsData.data['total_groups']} Groups Found", icon="OUTLINER")
@@ -259,6 +259,7 @@ class BIM_PT_project(Panel):
def draw_editable_file_info(self, context): def draw_editable_file_info(self, context):
pprops = self.props pprops = self.props
assert self.layout
if ifc_file := tool.Ifc.get(): if ifc_file := tool.Ifc.get():
row = self.layout.row(align=True) row = self.layout.row(align=True)
-1
View File
@@ -29,7 +29,6 @@ import bonsai.core.tool
import bonsai.tool as tool import bonsai.tool as tool
from bonsai.bim import import_ifc from bonsai.bim import import_ifc
import re import re
from math import pi, cos, sin
from mathutils import Matrix, Vector from mathutils import Matrix, Vector
from bonsai.bim.module.system.data import ObjectSystemData, SystemDecorationData from bonsai.bim.module.system.data import ObjectSystemData, SystemDecorationData
from enum import Enum from enum import Enum
+1
View File
@@ -21,6 +21,7 @@ import ifcopenshell
import ifcopenshell.api import ifcopenshell.api
import ifcopenshell.api.feature import ifcopenshell.api.feature
import ifcopenshell.api.type import ifcopenshell.api.type
import ifcopenshell.util.element
import bonsai.core.tool import bonsai.core.tool
import bonsai.tool as tool import bonsai.tool as tool
from test.bim.bootstrap import NewFile from test.bim.bootstrap import NewFile
@@ -17,6 +17,8 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>. # along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.alignment
import ifcopenshell.geom import ifcopenshell.geom
import ifcopenshell.util.unit import ifcopenshell.util.unit
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
@@ -19,6 +19,7 @@
import ifcopenshell import ifcopenshell
import ifcopenshell.api.alignment import ifcopenshell.api.alignment
import ifcopenshell.api.nest import ifcopenshell.api.nest
import ifcopenshell.api.pset
import ifcopenshell.geom import ifcopenshell.geom
import ifcopenshell.util.alignment import ifcopenshell.util.alignment
import ifcopenshell.util.unit import ifcopenshell.util.unit
@@ -18,6 +18,8 @@
import ifcopenshell import ifcopenshell
import ifcopenshell.api.alignment import ifcopenshell.api.alignment
import ifcopenshell.util
import ifcopenshell.util.alignment
from ifcopenshell import entity_instance from ifcopenshell import entity_instance
from ifcopenshell.api.alignment._get_segment_start_point_label import _get_segment_start_point_label from ifcopenshell.api.alignment._get_segment_start_point_label import _get_segment_start_point_label
@@ -19,6 +19,8 @@
import ifcopenshell import ifcopenshell
from ifcopenshell import entity_instance from ifcopenshell import entity_instance
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
import ifcopenshell.util
import ifcopenshell.util.unit
from collections.abc import Sequence from collections.abc import Sequence
import math import math
@@ -22,6 +22,7 @@ import ifcopenshell.api.nest
import ifcopenshell.api.pset import ifcopenshell.api.pset
import ifcopenshell.geom import ifcopenshell.geom
import ifcopenshell.guid import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.unit import ifcopenshell.util.unit
from ifcopenshell import entity_instance from ifcopenshell import entity_instance
from ifcopenshell import ifcopenshell_wrapper from ifcopenshell import ifcopenshell_wrapper
@@ -19,9 +19,11 @@
import ifcopenshell import ifcopenshell
import ifcopenshell.api.alignment import ifcopenshell.api.alignment
import ifcopenshell.api.nest import ifcopenshell.api.nest
import ifcopenshell.geom
import ifcopenshell.util.alignment import ifcopenshell.util.alignment
from ifcopenshell import entity_instance from ifcopenshell import entity_instance
import ifcopenshell.ifcopenshell_wrapper as wrapper import ifcopenshell.ifcopenshell_wrapper as wrapper
import ifcopenshell.util.unit
import numpy as np import numpy as np
import math import math
@@ -23,6 +23,9 @@ from ifcopenshell import entity_instance
import math import math
from collections.abc import Sequence from collections.abc import Sequence
import ifcopenshell.util
import ifcopenshell.util.unit
def layout_horizontal_alignment_by_pi_method( def layout_horizontal_alignment_by_pi_method(
file: ifcopenshell.file, layout: entity_instance, hpoints: Sequence[Sequence[float]], radii: Sequence[float] file: ifcopenshell.file, layout: entity_instance, hpoints: Sequence[Sequence[float]], radii: Sequence[float]
@@ -17,7 +17,8 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>. # along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell import ifcopenshell
from typing import Any, Union, Literal, Self from typing import Any, Union, Literal
from typing_extensions import Self
# `std::vector<xxx>` usually translated to `tuple[xxx, ...]`. # `std::vector<xxx>` usually translated to `tuple[xxx, ...]`.
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>. # along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell.util
import ifcopenshell.util.unit
import pytest import pytest
import math import math
import ifcopenshell.api.alignment import ifcopenshell.api.alignment
@@ -21,6 +21,7 @@
import pytest import pytest
import ifcopenshell.api.alignment import ifcopenshell.api.alignment
import ifcopenshell.api.unit
from ifcopenshell.api.alignment._map_alignment_horizontal_segment import _map_alignment_horizontal_segment from ifcopenshell.api.alignment._map_alignment_horizontal_segment import _map_alignment_horizontal_segment
@@ -18,6 +18,8 @@
import pytest import pytest
import ifcopenshell.api.alignment import ifcopenshell.api.alignment
import ifcopenshell.api.context
import ifcopenshell.api.unit
def test_update_fallback_position(): def test_update_fallback_position():
+2 -1
View File
@@ -23,7 +23,8 @@ Those tests are not automatically checked and just there to make sure overloads
import ifcopenshell import ifcopenshell
from typing import assert_type, Union from typing import Union
from typing_extensions import assert_type
def ifcopenshell_open_test(str_: str, bool_: bool): def ifcopenshell_open_test(str_: str, bool_: bool):
@@ -16,6 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>. # along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell.geom
import ifcopenshell.util
import ifcopenshell.util.shape
import pytest import pytest
import test.bootstrap import test.bootstrap
import ifcopenshell.api import ifcopenshell.api
@@ -18,6 +18,11 @@
import ifcopenshell import ifcopenshell
import logging import logging
import ifcopenshell.api
import ifcopenshell.api.geometry
import ifcopenshell.util
import ifcopenshell.util.element
import ifcopenshell.util.placement
import numpy as np import numpy as np
@@ -18,9 +18,11 @@
import test.bootstrap import test.bootstrap
import ifcopenshell.api import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.geometry
import ifcopenshell.api.root import ifcopenshell.api.root
import ifcopenshell.api.unit import ifcopenshell.api.unit
import ifcopenshell.util.unit import ifcopenshell.util.placement
import ifcpatch import ifcpatch
import numpy as np import numpy as np
+7 -1
View File
@@ -18,9 +18,15 @@
import test.bootstrap import test.bootstrap
import ifcopenshell.api import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.api.root import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.api.unit import ifcopenshell.api.unit
import ifcopenshell.util.unit import ifcopenshell.util.element
import ifcopenshell.util.geolocation
import ifcopenshell.util.placement
import ifcpatch import ifcpatch
import numpy as np import numpy as np
@@ -1,5 +1,6 @@
import ifcopenshell import ifcopenshell
import ifcopenshell.util import ifcopenshell.util
import ifcopenshell.util.attribute
import ifcopenshell.util.pset import ifcopenshell.util.pset
import ifcopenshell.util.schema import ifcopenshell.util.schema
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET