From 6bff80ec8e8b9ea38707b41443ddf24340d0a10d Mon Sep 17 00:00:00 2001 From: Jan Orend <56254096+3dJan@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:17:37 +0200 Subject: [PATCH] Add support for CModelLevelSetObject in CObject::fnCreateObjectFromModelResource --- Source/API/lib3mf_object.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/API/lib3mf_object.cpp b/Source/API/lib3mf_object.cpp index b292f473a..12ef901c5 100644 --- a/Source/API/lib3mf_object.cpp +++ b/Source/API/lib3mf_object.cpp @@ -32,6 +32,7 @@ Abstract: This is a stub class definition of CObject #include "lib3mf_interfaceexception.hpp" #include "lib3mf_meshobject.hpp" +#include "lib3mf_levelset.hpp" #include "lib3mf_componentsobject.hpp" #include "lib3mf_metadatagroup.hpp" #include "lib3mf_slicestack.hpp" @@ -39,6 +40,7 @@ Abstract: This is a stub class definition of CObject // Include custom headers here. #include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelLevelSetObject.h" #include "Model/Classes/NMR_ModelComponentsObject.h" using namespace Lib3MF::Impl; @@ -65,6 +67,11 @@ IObject* CObject::fnCreateObjectFromModelResource(NMR::PModelResource pResource, return new CMeshObject(pResource); } + NMR::CModelLevelSetObject * PILevelSet = dynamic_cast (pResource.get()); + if (PILevelSet) { + return new CLevelSet(pResource); + } + NMR::CModelComponentsObject * pComponentsResource = dynamic_cast (pResource.get()); if (pComponentsResource) { return new CComponentsObject(pResource);