Skip to content

Commit 3bb008c

Browse files
committed
- Switch to double precision
- Allow accessing entities by GlobalId - Some more support for writing back IFC - Prefix EXPRESS Enum values to avoid collisions - Fix a bug in the SenseAgreement of Cartesian trimmed curves - Use straight line segment in case point projection failed on trimmed curve - Add epsilon to polylines and -loops point equality test - Decompose a convex polygonal bounded halfspace into several unbounded halfspace and process only if they operate on a volume larger than some epsilon - No longer fail connected facesets if a single face is invalid - Updated IfcBlender for compatibility with Blender 2.62 - Added additional test files
1 parent 2b27b86 commit 3bb008c

31 files changed

Lines changed: 60369 additions & 2053 deletions

src/ifcblender/io_import_scene_ifc/__init__.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
from bpy.props import StringProperty, IntProperty, BoolProperty
5858
from bpy_extras.io_utils import ImportHelper
5959

60+
major,minor = bpy.app.version[0:2]
61+
transpose_matrices = minor >= 62
62+
6063
bpy.types.Object.ifc_id = IntProperty(name="IFC Entity ID",
6164
description="The STEP entity instance name")
6265
bpy.types.Object.ifc_guid = StringProperty(name="IFC Entity GUID",
@@ -121,14 +124,15 @@ def import_ifc(filename, use_names, process_relations):
121124
[m[3], m[4], m[5], 0],
122125
[m[6], m[7], m[8], 0],
123126
[m[9], m[10], m[11], 1]))
127+
if transpose_matrices: mat.transpose()
128+
124129
if process_relations:
125130
id_to_matrix[ob.id] = mat
126131
else:
127132
bob.matrix_world = mat
128133
bpy.context.scene.objects.link(bob)
129134

130-
bpy.ops.object.select_all(action='DESELECT')
131-
bpy.ops.object.select_name(name=bob.name)
135+
bpy.context.scene.objects.active = bob
132136
bpy.ops.object.mode_set(mode='EDIT')
133137
bpy.ops.mesh.normals_make_consistent()
134138
bpy.ops.object.mode_set(mode='OBJECT')
@@ -184,11 +188,15 @@ def import_ifc(filename, use_names, process_relations):
184188
nm = parent_ob_name if len(parent_ob_name) and use_names \
185189
else parent_ob_guid
186190
bob = bpy.data.objects.new(nm, None)
187-
id_to_matrix[parent_ob.id] = mathutils.Matrix((
191+
192+
mat = mathutils.Matrix((
188193
[m[0], m[1], m[2], 0],
189194
[m[3], m[4], m[5], 0],
190195
[m[6], m[7], m[8], 0],
191196
[m[9], m[10], m[11], 1]))
197+
if transpose_matrices: mat.transpose()
198+
id_to_matrix[parent_ob.id] = mat
199+
192200
bpy.context.scene.objects.link(bob)
193201

194202
bob.ifc_id = parent_ob.id

0 commit comments

Comments
 (0)