Scalar fields can now handle large values (with an internal double offset). Their names can also be longer than 255 characters.

This commit is contained in:
Daniel Girardeau-Montaut
2024-11-10 17:32:37 +01:00
parent 8a9112cfd5
commit efab553b92
10 changed files with 68 additions and 61 deletions
+3 -3
View File
@@ -123,14 +123,14 @@ bool ContextBasedFeature::prepare( const CorePoints& corePoints,
//and the scalar field
assert(!sf);
sf1WasAlreadyExisting = CheckSFExistence(corePoints.cloud, qPrintable(resultSFName));
sf = PrepareSF(corePoints.cloud, qPrintable(resultSFName), generatedScalarFields, SFCollector::CAN_REMOVE);
sf1WasAlreadyExisting = CheckSFExistence(corePoints.cloud, resultSFName);
sf = PrepareSF(corePoints.cloud, resultSFName, generatedScalarFields, SFCollector::CAN_REMOVE);
if (!sf)
{
errorMessage = QString("[ContextBasedFeature::prepare] Failed to prepare scalar %1 @ scale %2").arg(resultSFName).arg(scale);
return false;
}
source.name = sf->getName();
source.name = QString::fromStdString(sf->getName());
// NOT NECESSARY IF THE VALUE IS ALREADY COMPUTED
if (!scaled() && !sf1WasAlreadyExisting) //with 'kNN' neighbors, we can compute the values right away