From 67754ecfb80093410350c9a821599b8e04fdf4a4 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 16 Jun 2020 10:34:48 +0200 Subject: [PATCH] opencascade_knotspec_to_ifc multiple definition --- src/ifcgeom/IfcGeomSerialisation.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ifcgeom/IfcGeomSerialisation.cpp b/src/ifcgeom/IfcGeomSerialisation.cpp index d35e3c366c..bdb6d0be2b 100644 --- a/src/ifcgeom/IfcGeomSerialisation.cpp +++ b/src/ifcgeom/IfcGeomSerialisation.cpp @@ -75,16 +75,18 @@ void opencascade_array_to_vector2(T& t, std::vector< std::vector >& u) { } #ifdef SCHEMA_HAS_IfcRationalBSplineSurfaceWithKnots -IfcSchema::IfcKnotType::Value opencascade_knotspec_to_ifc(GeomAbs_BSplKnotDistribution bspline_knot_spec) { - IfcSchema::IfcKnotType::Value knot_spec = IfcSchema::IfcKnotType::IfcKnotType_UNSPECIFIED; - if (bspline_knot_spec == GeomAbs_Uniform) { - knot_spec = IfcSchema::IfcKnotType::IfcKnotType_UNIFORM_KNOTS; - } else if (bspline_knot_spec == GeomAbs_QuasiUniform) { - knot_spec = IfcSchema::IfcKnotType::IfcKnotType_QUASI_UNIFORM_KNOTS; - } else if (bspline_knot_spec == GeomAbs_PiecewiseBezier) { - knot_spec = IfcSchema::IfcKnotType::IfcKnotType_PIECEWISE_BEZIER_KNOTS; +namespace { + IfcSchema::IfcKnotType::Value opencascade_knotspec_to_ifc(GeomAbs_BSplKnotDistribution bspline_knot_spec) { + IfcSchema::IfcKnotType::Value knot_spec = IfcSchema::IfcKnotType::IfcKnotType_UNSPECIFIED; + if (bspline_knot_spec == GeomAbs_Uniform) { + knot_spec = IfcSchema::IfcKnotType::IfcKnotType_UNIFORM_KNOTS; + } else if (bspline_knot_spec == GeomAbs_QuasiUniform) { + knot_spec = IfcSchema::IfcKnotType::IfcKnotType_QUASI_UNIFORM_KNOTS; + } else if (bspline_knot_spec == GeomAbs_PiecewiseBezier) { + knot_spec = IfcSchema::IfcKnotType::IfcKnotType_PIECEWISE_BEZIER_KNOTS; + } + return knot_spec; } - return knot_spec; } #endif