From 9281c8fbce70dd13720c311025284921a4b9ba20 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 1 Dec 2020 14:03:07 +0100 Subject: [PATCH] #1126 Update serialization for trimmed curve --- src/ifcgeom/IfcGeomSerialisation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomSerialisation.cpp b/src/ifcgeom/IfcGeomSerialisation.cpp index f466578430..214c2915d5 100644 --- a/src/ifcgeom/IfcGeomSerialisation.cpp +++ b/src/ifcgeom/IfcGeomSerialisation.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include "IfcGeom.h" @@ -93,7 +94,11 @@ namespace { template <> int convert_to_ifc(const Handle_Geom_Curve& c, IfcSchema::IfcCurve*& curve, bool advanced) { - if (c->DynamicType() == STANDARD_TYPE(Geom_Line)) { + if (c->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) { + Handle_Geom_TrimmedCurve trim = Handle_Geom_TrimmedCurve::DownCast(c); + const Handle_Geom_Curve basis = trim->BasisCurve(); + return convert_to_ifc(basis, curve, advanced); + } else if (c->DynamicType() == STANDARD_TYPE(Geom_Line)) { IfcSchema::IfcDirection* d; IfcSchema::IfcCartesianPoint* p;