From 35ed836088de79a84a9eaea61cb5dfa02cae8082 Mon Sep 17 00:00:00 2001 From: Daniel Girardeau-Montaut Date: Fri, 12 Aug 2022 14:15:05 +0200 Subject: [PATCH 1/2] Compilation with v2.13 --- q3DMASCTools.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/q3DMASCTools.cpp b/q3DMASCTools.cpp index 8d8c562..5ab3cd5 100644 --- a/q3DMASCTools.cpp +++ b/q3DMASCTools.cpp @@ -685,8 +685,8 @@ bool Tools::LoadFile( const QString& filename, { loadParameters.alwaysDisplayLoadDialog = true; loadParameters.shiftHandlingMode = ccGlobalShiftManager::DIALOG_IF_NECESSARY; - loadParameters.coordinatesShift = &loadCoordinatesShift; - loadParameters.coordinatesShiftEnabled = &loadCoordinatesTransEnabled; + loadParameters._coordinatesShift = &loadCoordinatesShift; + loadParameters._coordinatesShiftEnabled = &loadCoordinatesTransEnabled; loadParameters.parentWidget = parent; FileIOFilter::ResetSesionCounter(); } @@ -1127,11 +1127,10 @@ bool Tools::PrepareFeatures(const CorePoints& corePoints, Feature::Set& features for (int i = 0; i < static_cast(pointCount); ++i) { //spherical neighborhood extraction structure - CCCoreLib::DgmOctree::NearestNeighboursSphericalSearchStruct nNSS; + CCCoreLib::DgmOctree::NearestNeighboursSearchStruct nNSS; { nNSS.level = octreeLevel; nNSS.queryPoint = *corePoints.cloud->getPoint(i); - nNSS.prepare(largestRadius, octree->getCellSize(nNSS.level)); octree->getTheCellPosWhichIncludesThePoint(&nNSS.queryPoint, nNSS.cellPos, nNSS.level); octree->computeCellCenter(nNSS.cellPos, nNSS.level, nNSS.cellCenter); } From 4b4341c2a9e2c765504c2459df0270d906cb4846 Mon Sep 17 00:00:00 2001 From: Daniel Girardeau-Montaut Date: Thu, 18 Aug 2022 10:26:41 +0200 Subject: [PATCH 2/2] Bug fix: Zmin/Zmax/RANGE features were badly computed --- NeighborhoodFeature.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NeighborhoodFeature.cpp b/NeighborhoodFeature.cpp index 1b3aa5f..e415290 100644 --- a/NeighborhoodFeature.cpp +++ b/NeighborhoodFeature.cpp @@ -304,9 +304,9 @@ bool NeighborhoodFeature::computeValue(CCCoreLib::DgmOctree::NeighboursSet& poin minZ = maxZ = pointsInNeighbourhood[0].point->z; for (size_t i = 1; i < kNN; ++i) { - if (minZ < pointsInNeighbourhood[i].point->z) + if (minZ > pointsInNeighbourhood[i].point->z) minZ = pointsInNeighbourhood[i].point->z; - else if (maxZ > pointsInNeighbourhood[i].point->z) + else if (maxZ < pointsInNeighbourhood[i].point->z) maxZ = pointsInNeighbourhood[i].point->z; }