diff --git a/Source/API/lib3mf_meshobject.cpp b/Source/API/lib3mf_meshobject.cpp index bb2976c0..d8d71d97 100644 --- a/Source/API/lib3mf_meshobject.cpp +++ b/Source/API/lib3mf_meshobject.cpp @@ -428,8 +428,8 @@ void CMeshObject::SetVolumeData(IVolumeData* pTheVolumeData) } ITriangleSet* CMeshObject::AddTriangleSet(const std::string& sIdentifier, const std::string& sName) -{ - return new CTriangleSet(NMR::CModelTriangleSet::make (sIdentifier, sName), meshObject()); +{ + return new CTriangleSet(meshObject()->addTriangleSet(sIdentifier, sName), meshObject()); } bool CMeshObject::HasTriangleSet(const std::string& sIdentifier) diff --git a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp index 8b719cbc..fc586f66 100644 --- a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp +++ b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp @@ -168,7 +168,7 @@ namespace NMR { } if (m_bWriteTriangleSetExtension) { - writeConstPrefixedStringAttribute(XML_3MF_ATTRIBUTE_XMLNS, XML_3MF_NAMESPACEPREFIX_SLICE, XML_3MF_NAMESPACE_TRIANGLESETS); + writeConstPrefixedStringAttribute(XML_3MF_ATTRIBUTE_XMLNS, XML_3MF_NAMESPACEPREFIX_TRIANGLESETS, XML_3MF_NAMESPACE_TRIANGLESETS); if (m_pModel->RequireExtension(XML_3MF_NAMESPACE_TRIANGLESETS)) { if (sRequiredExtensions.size() > 0) sRequiredExtensions = sRequiredExtensions + " ";