mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
Fix #2835. Bug where in certain scenarios the decorator would crash due to prematurely freed bmesh.
This commit is contained in:
@@ -56,7 +56,6 @@ def mode_callback(obj, data):
|
|||||||
bm = bmesh.from_edit_mesh(obj.data)
|
bm = bmesh.from_edit_mesh(obj.data)
|
||||||
bmesh.ops.dissolve_limit(bm, angle_limit=pi / 180 * 1, verts=bm.verts, edges=bm.edges)
|
bmesh.ops.dissolve_limit(bm, angle_limit=pi / 180 * 1, verts=bm.verts, edges=bm.edges)
|
||||||
bmesh.update_edit_mesh(obj.data)
|
bmesh.update_edit_mesh(obj.data)
|
||||||
bm.free()
|
|
||||||
else:
|
else:
|
||||||
material_usage = ifcopenshell.util.element.get_material(product)
|
material_usage = ifcopenshell.util.element.get_material(product)
|
||||||
x, y = obj.dimensions[0:2]
|
x, y = obj.dimensions[0:2]
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ def mode_callback(obj, data):
|
|||||||
bm = bmesh.from_edit_mesh(obj.data)
|
bm = bmesh.from_edit_mesh(obj.data)
|
||||||
bmesh.ops.dissolve_limit(bm, angle_limit=pi / 180 * 1, verts=bm.verts, edges=bm.edges)
|
bmesh.ops.dissolve_limit(bm, angle_limit=pi / 180 * 1, verts=bm.verts, edges=bm.edges)
|
||||||
bmesh.update_edit_mesh(obj.data)
|
bmesh.update_edit_mesh(obj.data)
|
||||||
bm.free()
|
|
||||||
else:
|
else:
|
||||||
new_origin = obj.matrix_world @ Vector(obj.bound_box[0])
|
new_origin = obj.matrix_world @ Vector(obj.bound_box[0])
|
||||||
obj.data.transform(
|
obj.data.transform(
|
||||||
|
|||||||
Reference in New Issue
Block a user