Skip to content

Commit

Permalink
Implicit: function -> implicitfunction, for now both element names ar…
Browse files Browse the repository at this point in the history
…e accepted for reading to migrate existing files
  • Loading branch information
3dJan committed Aug 21, 2024
1 parent 6020218 commit 92b4cc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Include/Model/Classes/NMR_ModelConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ These are given by the 3MF Standard


// Voumeteric/Implicit
#define XML_3MF_ELEMENT_IMPLICIT_FUNCTION "function"
#define XML_3MF_ELEMENT_IMPLICIT_FUNCTION_DEPRECATED "function"
#define XML_3MF_ELEMENT_IMPLICIT_FUNCTION "implicitfunction"

#define XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_ID "id"
#define XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_DISPLAY_NAME "displayname"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ namespace NMR {
m_pModel, m_pWarnings);
pXMLNode->parseXML(pXMLReader);
}
else if (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION) == 0)
{
PModelReaderNode_ImplicitFunction pXMLNode = std::make_shared<CModelReaderNode_ImplicitFunction>(m_pModel, m_pWarnings);
pXMLNode->parseXML(pXMLReader);
}
else if (strcmp(pChildName, XML_3MF_ELEMENT_FUNCTION_FROM_IMAGE3D) == 0)
{
PModelReaderNode pXMLNode = std::make_shared<CModelReaderNode_FunctionFromImage3D>(
Expand All @@ -173,7 +168,7 @@ namespace NMR {
}

if (strcmp(pNameSpace, XML_3MF_NAMESPACE_IMPLICITSPEC) == 0) {
if (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION) == 0)
if ((strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION_DEPRECATED) == 0) || (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION) == 0))
{
PModelReaderNode_ImplicitFunction pXMLNode = std::make_shared<CModelReaderNode_ImplicitFunction>(m_pModel, m_pWarnings);
pXMLNode->parseXML(pXMLReader);
Expand Down

0 comments on commit 92b4cc2

Please sign in to comment.