Skip to content

Commit

Permalink
Fixed toolpath reader issues
Browse files Browse the repository at this point in the history
  • Loading branch information
netfabb committed Oct 28, 2024
1 parent 83ba867 commit 2d3ae66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Model/Classes/NMR_ModelToolpathLayerReadData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ namespace NMR {
return true;
}
return false;

case NMR::eModelToolpathProfileOverrideFactor::pfFactorG:
for (uint32_t nPointIndex = 0; nPointIndex < pSegment->m_nPointCount; nPointIndex++) {
auto& point = m_Points.getDataRef(pSegment->m_nStartPoint + nPointIndex);
Expand Down
9 changes: 9 additions & 0 deletions Source/Model/ToolpathReader/NMR_ToolpathReaderNode_Point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ namespace NMR {
m_nY = fnStringToInt32(pAttributeValue);
m_bHasY = true;
}
else if (strcmp(pAttributeName, XML_3MF_TOOLPATHATTRIBUTE_SCALEFACTORF) == 0) {
m_nFactorF = fnStringToInt32(pAttributeValue);
}
else if (strcmp(pAttributeName, XML_3MF_TOOLPATHATTRIBUTE_SCALEFACTORG) == 0) {
m_nFactorG = fnStringToInt32(pAttributeValue);
}
else if (strcmp(pAttributeName, XML_3MF_TOOLPATHATTRIBUTE_SCALEFACTORH) == 0) {
m_nFactorH = fnStringToInt32(pAttributeValue);
}
else
m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ATTRIBUTE), mrwInvalidOptionalValue);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace NMR {
m_nPartID = nValue;
}

if (strcmp(pAttributeName, XML_3MF_TOOLPATHATTRIBUTE_PARTID) == 0) {
if (strcmp(pAttributeName, XML_3MF_TOOLPATHATTRIBUTE_OVERRIDEFRACTION) == 0) {
if (m_bHasOverrideFraction)
throw CNMRException(NMR_ERROR_DUPLICATEOVERRIDEFRACTION);

Expand Down

0 comments on commit 2d3ae66

Please sign in to comment.