bonsai other ifcopenshell packages #5178

This commit is contained in:
Andrej730
2024-08-14 14:09:45 +05:00
committed by Andrej
parent 5784e3103d
commit 3860884db3
14 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ def ensure_addons_are_enabled(*addon_names: str) -> None:
raise Exception("Some issues were found trying to enable IFC Sverchok:\n" + "\n".join(errors))
ensure_addons_are_enabled("blenderbim", "sverchok")
ensure_addons_are_enabled("bonsai", "sverchok")
from sverchok.ui.nodeview_space_menu import add_node_menu
+3 -3
View File
@@ -24,8 +24,8 @@ import ifcopenshell
import ifcsverchok.helper
import ifcopenshell.api
from ifcsverchok.ifcstore import SvIfcStore
import blenderbim.tool as tool
import blenderbim.core.geometry as core
import bonsai.tool as tool
import bonsai.core.geometry as core
from bpy.props import (
StringProperty,
EnumProperty,
@@ -35,7 +35,7 @@ from bpy.props import (
)
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode, flatten_data, fixed_iter, flat_iter
from blenderbim.bim.module.root.prop import get_contexts
from bonsai.bim.module.root.prop import get_contexts
from sverchok.data_structure import zip_long_repeat, node_id
from sverchok.core.socket_data import sv_get_socket
+3 -3
View File
@@ -21,7 +21,7 @@ import logging
import ifcopenshell
import ifcsverchok.helper
from ifcsverchok.ifcstore import SvIfcStore
import blenderbim.bim.import_ifc
import bonsai.bim.import_ifc
from bpy.props import StringProperty, PointerProperty, BoolProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode, flatten_data
@@ -84,10 +84,10 @@ class SvIfcCreateShape(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.
if not entity.is_a("IfcProduct"):
return
logger = logging.getLogger("ImportIFC")
self.ifc_import_settings = blenderbim.bim.import_ifc.IfcImportSettings.factory(bpy.context, "", logger)
self.ifc_import_settings = bonsai.bim.import_ifc.IfcImportSettings.factory(bpy.context, "", logger)
settings = ifcopenshell.geom.settings()
shape = ifcopenshell.geom.create_shape(settings, entity)
ifc_importer = blenderbim.bim.import_ifc.IfcImporter(self.ifc_import_settings)
ifc_importer = bonsai.bim.import_ifc.IfcImporter(self.ifc_import_settings)
ifc_importer.file = self.file
mesh = ifc_importer.create_mesh(entity, shape)
obj = bpy.data.objects.new("IFC Element", mesh)
@@ -23,7 +23,7 @@ import ifcsverchok.helper
from bpy.props import StringProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode
from blenderbim.bim.ifc import IfcStore
from bonsai.bim.ifc import IfcStore
class SvIfcSelectBlenderObjectsRefresh(bpy.types.Operator):
+2 -2
View File
@@ -23,8 +23,8 @@ import ifcsverchok.helper
import ifcopenshell.api
import ifcopenshell.util.representation
from ifcsverchok.ifcstore import SvIfcStore
import blenderbim.tool as tool
import blenderbim.core.geometry as core
import bonsai.tool as tool
import bonsai.core.geometry as core
from bpy.props import StringProperty, EnumProperty, IntProperty, FloatVectorProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode, ensure_min_nesting