diff --git a/src/ifcwrap/IfcGeomWrapper.i b/src/ifcwrap/IfcGeomWrapper.i index a04b14e470..0889b465d5 100644 --- a/src/ifcwrap/IfcGeomWrapper.i +++ b/src/ifcwrap/IfcGeomWrapper.i @@ -485,11 +485,11 @@ struct ShapeRTTI : public boost::static_visitor // Read precision for found representation's context auto context = ifc_representation->ContextOfItems(); - if (context->as()) { - context = context->as()->ParentContext(); + if (context->template as()) { + context = context->template as()->ParentContext(); } - if (context->as() && context->as()->Precision()) { - double p = *context->as()->Precision() + if (context->template as() && context->template as()->Precision()) { + double p = *context->template as()->Precision() * kernel.getValue(IfcGeom::Kernel::GV_PRECISION_FACTOR); p *= kernel.getValue(IfcGeom::Kernel::GV_LENGTH_UNIT); if (p < 1.e-7) {