From f24db3402fed1737cf9d328021cde0a37c17e8e8 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 17 Mar 2020 15:13:36 +0100 Subject: [PATCH] Support for 3D part of IfcSurfaceCurve --- src/ifcgeom/IfcGeomCurves.cpp | 8 ++++++++ src/ifcgeom/IfcRegister.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/ifcgeom/IfcGeomCurves.cpp b/src/ifcgeom/IfcGeomCurves.cpp index 0623c28588..2d2d161186 100644 --- a/src/ifcgeom/IfcGeomCurves.cpp +++ b/src/ifcgeom/IfcGeomCurves.cpp @@ -134,6 +134,14 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcEllipse* l, Handle(Geom_Curve) curve = new Geom_Ellipse(ax, x, y); return true; } + +#ifdef SCHEMA_HAS_IfcSurfaceCurve +bool IfcGeom::Kernel::convert(const IfcSchema::IfcSurfaceCurve* sc, Handle(Geom_Curve)& curve) { + // @todo take into account PCurves. + return convert_curve(sc->Curve3D(), curve); +} +#endif + bool IfcGeom::Kernel::convert(const IfcSchema::IfcLine* l, Handle(Geom_Curve)& curve) { gp_Pnt pnt;gp_Vec vec; convert(l->Pnt(),pnt); diff --git a/src/ifcgeom/IfcRegister.h b/src/ifcgeom/IfcRegister.h index 13f4845881..1f9f195ec6 100644 --- a/src/ifcgeom/IfcRegister.h +++ b/src/ifcgeom/IfcRegister.h @@ -146,6 +146,9 @@ CURVE(IfcLine); // IfcRationalBSplineCurveWithKnots included CURVE(IfcBSplineCurveWithKnots); #endif +#ifdef SCHEMA_HAS_IfcSurfaceCurve +CURVE(IfcSurfaceCurve); +#endif CLASS(IfcCartesianPoint,gp_Pnt); CLASS(IfcDirection,gp_Dir);