mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
Fix bug with Revit where Revit expects normalised unit vectors.
I think IFC doesn't require it, but fine, we'll play with Revit.
This commit is contained in:
@@ -1265,8 +1265,9 @@ class IfcExporter():
|
|||||||
self.file.createIfcPolyline(points))
|
self.file.createIfcPolyline(points))
|
||||||
start, end = self.get_start_and_end_of_extrusion(points, extrusion_edge)
|
start, end = self.get_start_and_end_of_extrusion(points, extrusion_edge)
|
||||||
direction = self.get_extrusion_direction(mesh, start, end)
|
direction = self.get_extrusion_direction(mesh, start, end)
|
||||||
|
unit_direction = direction.normalized()
|
||||||
extruded_area_solid = self.file.createIfcExtrudedAreaSolid(curve, self.origin,
|
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(
|
return self.file.createIfcShapeRepresentation(
|
||||||
self.ifc_rep_context[representation['context']][representation['subcontext']]['ifc'],
|
self.ifc_rep_context[representation['context']][representation['subcontext']]['ifc'],
|
||||||
representation['subcontext'], 'SweptSolid',
|
representation['subcontext'], 'SweptSolid',
|
||||||
|
|||||||
Reference in New Issue
Block a user