From fa3431f98314097b40a45f1097b60cda3883387b Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 15 Oct 2019 18:11:06 +1100 Subject: [PATCH] Fix bug with Revit where Revit expects normalised unit vectors. I think IFC doesn't require it, but fine, we'll play with Revit. --- src/ifcblenderexport/io_export_ifc/export_ifc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ifcblenderexport/io_export_ifc/export_ifc.py b/src/ifcblenderexport/io_export_ifc/export_ifc.py index 4cdb5c2a76..f3389d3b08 100644 --- a/src/ifcblenderexport/io_export_ifc/export_ifc.py +++ b/src/ifcblenderexport/io_export_ifc/export_ifc.py @@ -1265,8 +1265,9 @@ class IfcExporter(): self.file.createIfcPolyline(points)) start, end = self.get_start_and_end_of_extrusion(points, extrusion_edge) direction = self.get_extrusion_direction(mesh, start, end) + unit_direction = direction.normalized() extruded_area_solid = self.file.createIfcExtrudedAreaSolid(curve, self.origin, - self.file.createIfcDirection((direction.x, direction.y, direction.z)), direction.length) + self.file.createIfcDirection((unit_direction.x, unit_direction.y, unit_direction.z)), direction.length) return self.file.createIfcShapeRepresentation( self.ifc_rep_context[representation['context']][representation['subcontext']]['ifc'], representation['subcontext'], 'SweptSolid',