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
@@ -24,7 +24,7 @@ from mathutils import Vector, Matrix
from typing import Union, Optional, Literal, Any, TYPE_CHECKING
if TYPE_CHECKING:
from blenderbim.bim.module.geometry.helper import Helper
from bonsai.bim.module.geometry.helper import Helper
Z_AXIS = Vector((0, 0, 1))
@@ -72,7 +72,7 @@ def add_representation(
) -> ifcopenshell.entity_instance:
# lazy import Helper to avoid circular import
if "Helper" not in globals():
from blenderbim.bim.module.geometry.helper import Helper
from bonsai.bim.module.geometry.helper import Helper
globals()["Helper"] = Helper
@@ -460,7 +460,7 @@ class Usecase:
return results
def is_mesh_curve_consecutive(self, geom_data):
import blenderbim.tool as tool
import bonsai.tool as tool
bm = tool.Blender.get_bmesh_for_mesh(geom_data)
bm.verts.ensure_lookup_table()
@@ -514,7 +514,7 @@ class Usecase:
return self.create_curves_from_mesh_ifc2x3(should_exclude_faces=should_exclude_faces, is_2d=is_2d)
return self.create_curves_from_mesh(should_exclude_faces=should_exclude_faces, is_2d=is_2d)
import blenderbim.tool as tool
import bonsai.tool as tool
selected_objects = bpy.context.selected_objects
active_object = bpy.context.active_object
@@ -568,7 +568,7 @@ class Usecase:
return curves
def remove_doubles_from_mesh(self, mesh):
import blenderbim.tool as tool
import bonsai.tool as tool
bm = tool.Blender.get_bmesh_for_mesh(mesh)
bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=0.0001)
@@ -31,7 +31,7 @@ def edit_georeferencing(
Setting the correct georeferencing parameters is a complex topic and
should ideally be done with three parties present: the lead architect,
surveyor, and a third-party digital engineer with expertise in IFC to
moderate. For more information, read the BlenderBIM Add-on documentation
moderate. For more information, read the Bonsai documentation
for Georeferencing:
https://docs.bonsaibim.org/users/advanced/georeferencing.html
@@ -63,7 +63,7 @@ def edit_georeferencing(
# For buildings, it is almost always recommended to specify map
# conversion parameters to a false origin and orientation to project
# north. See the diagram in the BlenderBIM Add-on Georeferencing
# north. See the diagram in the Bonsai Georeferencing
# documentation for correct calculation of the X Axis Abcissa and
# Ordinate.
ifcopenshell.api.georeference.edit_georeferencing(model,
@@ -174,7 +174,7 @@ class Usecase:
return self.create_surface_texture(links[0].from_node, "DIFFUSE")
def create_surface_texture(self, node, mode):
import blenderbim.tool as tool
import bonsai.tool as tool
texture = self.file.create_entity(
"IfcImageTexture",
@@ -28,7 +28,7 @@ HEADER_EXTRACTOR_TEST_FILE_STR = """
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition[DesignTransferView]'),'2;1');
FILE_NAME('file.ifc','2024-06-25T15:48:10+05:00',(),(),'IfcOpenShell 0.0.0','BlenderBIM 0.0.999999-xxxxxxx','Nobody');
FILE_NAME('file.ifc','2024-06-25T15:48:10+05:00',(),(),'IfcOpenShell 0.0.0','Bonsai 0.0.999999-xxxxxxx','Nobody');
FILE_SCHEMA(('IFC4X3_ADD2'));
ENDSEC;
DATA;