Skip to content

Commit

Permalink
Fix bug where objects with transformations aren't correctly analysed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Moult committed Oct 5, 2020
1 parent 8310cc4 commit 6e9e4b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ladybug_tools/intersect.py
Expand Up @@ -7,7 +7,7 @@
import mathutils.geometry
import math
from .config import tolerance
from mathutils import Vector
from mathutils import Vector, Matrix


def join_geometry_to_mesh(geometry):
Expand All @@ -28,6 +28,9 @@ def join_geometry_to_mesh(geometry):
c['selected_objects'] = c['selected_editable_objects'] = copied_geometry
bpy.ops.object.join(c)
bpy.context.scene.collection.objects.link(copied_geometry[0])
# Apply all transformations
copied_geometry[0].data.transform(copied_geometry[0].matrix_world)
copied_geometry[0].matrix_world = Matrix()
return copied_geometry[0]
for geo in geometry:
if isinstance(geo, rg.Brep):
Expand Down

0 comments on commit 6e9e4b3

Please sign in to comment.