@@ -491,20 +491,21 @@ namespace AMC {
491491
492492 for (uint32_t nHatchIndex = 0 ; nHatchIndex < hatchFactors.size (); nHatchIndex++) {
493493 uint32_t nSubInterpolationCount = 0 ;
494- Lib3MF::sHatchModificationInterpolationData * pSubInterpolationData = nullptr ;
494+ uint32_t nSubInterpolationOffset = 0 ;
495+ // Lib3MF::sHatchModificationInterpolationData* pSubInterpolationData = nullptr;
495496 if (nonLinearCounts.size () > 0 ) {
496497 nSubInterpolationCount = nonLinearCounts.at (nHatchIndex);
497498 if (nSubInterpolationCount > 0 )
498- pSubInterpolationData = &m_InterpolationData. at (nInterpolationDataStartIndex + nTotalSubInterpolationCount);
499+ nSubInterpolationOffset = ( uint32_t ) (nInterpolationDataStartIndex + nTotalSubInterpolationCount);
499500 }
500501
501502 pDstOverride->m_dFactors [nFactorIndex] = pSrcOverride->m_Point1Factor ;
502503 pDstOverride->m_nSubInterpolationCount = nSubInterpolationCount;
503- pDstOverride->m_pSubInterpolationData = pSubInterpolationData ;
504+ pDstOverride->m_nSubInterpolationOffset = nSubInterpolationOffset ;
504505 pDstOverride++;
505506 pDstOverride->m_dFactors [nFactorIndex] = pSrcOverride->m_Point2Factor ;
506507 pDstOverride->m_nSubInterpolationCount = nSubInterpolationCount;
507- pDstOverride->m_pSubInterpolationData = pSubInterpolationData ;
508+ pDstOverride->m_nSubInterpolationOffset = nSubInterpolationOffset ;
508509 pDstOverride++;
509510 pSrcOverride++;
510511
@@ -1084,7 +1085,8 @@ namespace AMC {
10841085 uint32_t nStartIndex = pSegment->m_PointStartIndex ;
10851086 if (pSegment->m_PointCount > 0 ) {
10861087 uint32_t nPointIndex = nStartIndex + nHatchIndex * 2 ;
1087- pSubInterpolationData = m_OverrideFactors.at (nPointIndex).m_pSubInterpolationData ;
1088+ uint32_t nSubInterpolationOffset = m_OverrideFactors.at (nPointIndex).m_nSubInterpolationOffset ;
1089+ pSubInterpolationData = &m_InterpolationData.at (nSubInterpolationOffset);
10881090 nSubInterpolationCount = m_OverrideFactors.at (nPointIndex).m_nSubInterpolationCount ;
10891091 }
10901092 else {
0 commit comments