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;