Skip to content

Commit

Permalink
Add support for CModelLevelSetObject in CObject::fnCreateObjectFromMo…
Browse files Browse the repository at this point in the history
…delResource
  • Loading branch information
3dJan committed Apr 8, 2024
1 parent 51a43e2 commit 6bff80e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/API/lib3mf_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ 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"
#include "lib3mf_attachment.hpp"

// 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;
Expand All @@ -65,6 +67,11 @@ IObject* CObject::fnCreateObjectFromModelResource(NMR::PModelResource pResource,
return new CMeshObject(pResource);
}

NMR::CModelLevelSetObject * PILevelSet = dynamic_cast<NMR::CModelLevelSetObject *> (pResource.get());
if (PILevelSet) {
return new CLevelSet(pResource);
}

NMR::CModelComponentsObject * pComponentsResource = dynamic_cast<NMR::CModelComponentsObject *> (pResource.get());
if (pComponentsResource) {
return new CComponentsObject(pResource);
Expand Down

0 comments on commit 6bff80e

Please sign in to comment.