diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/TupleTransfer.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/TupleTransfer.hpp index 700be14986..e1a4e5d69b 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/TupleTransfer.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/TupleTransfer.hpp @@ -31,7 +31,7 @@ class SIMPLNXCORE_EXPORT AbstractTupleTransfer * @param secondcIndex * @param forceSecondToZero */ - virtual void transfer(size_t faceIndex, size_t firstcIndex, size_t secondcIndex, bool forceSecondToZero = false) = 0; + virtual void transfer(size_t faceIndex, size_t firstcIndex, size_t secondcIndex, bool forceSecondToZero) = 0; virtual void transfer(size_t faceIndex, size_t firstcIndex) = 0; @@ -82,7 +82,7 @@ class TransferTuple : public AbstractTupleTransfer * @param secondcIndex * @param forceSecondToZero */ - void transfer(size_t faceIndex, size_t firstcIndex, size_t secondcIndex, bool forceSecondToZero = false) override + void transfer(size_t faceIndex, size_t firstcIndex, size_t secondcIndex, bool forceSecondToZero) override { for(size_t i = 0; i < m_NumComps; i++) { diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SurfaceNetsFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SurfaceNetsFilter.cpp index b7e9c90f70..059726db05 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SurfaceNetsFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SurfaceNetsFilter.cpp @@ -69,9 +69,9 @@ Parameters SurfaceNetsFilter::parameters() const GeometrySelectionParameter::AllowedTypes{IGeometry::Type::Image})); params.insert(std::make_unique(k_CellFeatureIdsArrayPath_Key, "Cell Feature Ids", "The complete path to the Array specifying which Feature each Cell belongs to", DataPath{}, ArraySelectionParameter::AllowedTypes{DataType::int32}, ArraySelectionParameter::AllowedComponentShapes{{1}})); - params.insert(std::make_unique( - k_SelectedDataArrayPaths_Key, "Attribute Arrays to Transfer", "The paths to the Arrays specifying which Cell Attribute Arrays to transfer to the created Triangle Geometry", - MultiArraySelectionParameter::ValueType{}, MultiArraySelectionParameter::AllowedTypes{IArray::ArrayType::DataArray}, nx::core::GetAllDataTypes())); + // params.insert(std::make_unique( + // k_SelectedDataArrayPaths_Key, "Attribute Arrays to Transfer", "The paths to the Arrays specifying which Cell Attribute Arrays to transfer to the created Triangle Geometry", + // MultiArraySelectionParameter::ValueType{}, MultiArraySelectionParameter::AllowedTypes{IArray::ArrayType::DataArray}, nx::core::GetAllDataTypes())); params.insertSeparator(Parameters::Separator{"Output Triangle Geometry"}); params.insert( @@ -119,7 +119,7 @@ IFilter::PreflightResult SurfaceNetsFilter::preflightImpl(const DataStructure& d { auto pGridGeomDataPath = filterArgs.value(k_GridGeometryDataPath_Key); auto pFeatureIdsArrayPathValue = filterArgs.value(k_CellFeatureIdsArrayPath_Key); - auto pSelectedDataArrayPaths = filterArgs.value(k_SelectedDataArrayPaths_Key); + // auto pSelectedDataArrayPaths = filterArgs.value(k_SelectedDataArrayPaths_Key); auto pTriangleGeometryPath = filterArgs.value(k_CreatedTriangleGeometryPath_Key); auto pVertexGroupDataName = filterArgs.value(k_VertexDataGroupName_Key); @@ -162,17 +162,17 @@ IFilter::PreflightResult SurfaceNetsFilter::preflightImpl(const DataStructure& d resultOutputActions.value().appendAction(std::move(createArrayAction)); } - for(const auto& selectedDataPath : pSelectedDataArrayPaths) - { - DataPath createdDataPath = pFaceGroupDataPath.createChildPath(selectedDataPath.getTargetName()); - const auto& iDataArray = dataStructure.getDataRefAs(selectedDataPath); - auto compShape = iDataArray.getComponentShape(); - // Double the size of the DataArray because we need the value from both sides of the triangle. - compShape.insert(compShape.begin(), 2); - - auto createArrayAction = std::make_unique(iDataArray.getDataType(), std::vector{numElements}, compShape, createdDataPath, dataStoreFormat); - resultOutputActions.value().appendAction(std::move(createArrayAction)); - } + // for(const auto& selectedDataPath : pSelectedDataArrayPaths) + // { + // DataPath createdDataPath = pFaceGroupDataPath.createChildPath(selectedDataPath.getTargetName()); + // const auto& iDataArray = dataStructure.getDataRefAs(selectedDataPath); + // auto compShape = iDataArray.getComponentShape(); + // // Double the size of the DataArray because we need the value from both sides of the triangle. + // compShape.insert(compShape.begin(), 2); + // + // auto createArrayAction = std::make_unique(iDataArray.getDataType(), std::vector{numElements}, compShape, createdDataPath, dataStoreFormat); + // resultOutputActions.value().appendAction(std::move(createArrayAction)); + // } { auto faceFeatureAttributeMatrixName = filterArgs.value(k_FaceFeatureAttributeMatrixName_Key); @@ -197,7 +197,7 @@ Result<> SurfaceNetsFilter::executeImpl(DataStructure& dataStructure, const Argu inputValues.GridGeomDataPath = filterArgs.value(k_GridGeometryDataPath_Key); inputValues.FeatureIdsArrayPath = filterArgs.value(k_CellFeatureIdsArrayPath_Key); - inputValues.SelectedDataArrayPaths = filterArgs.value(k_SelectedDataArrayPaths_Key); + // inputValues.SelectedDataArrayPaths = filterArgs.value(k_SelectedDataArrayPaths_Key); inputValues.TriangleGeometryPath = filterArgs.value(k_CreatedTriangleGeometryPath_Key); inputValues.VertexGroupDataPath = inputValues.TriangleGeometryPath.createChildPath(filterArgs.value(k_VertexDataGroupName_Key)); inputValues.NodeTypesDataPath = inputValues.VertexGroupDataPath.createChildPath(filterArgs.value(k_NodeTypesArrayName_Key)); diff --git a/src/Plugins/SimplnxCore/test/SurfaceNetsTest.cpp b/src/Plugins/SimplnxCore/test/SurfaceNetsTest.cpp index 2406f4929d..9cc114955f 100644 --- a/src/Plugins/SimplnxCore/test/SurfaceNetsTest.cpp +++ b/src/Plugins/SimplnxCore/test/SurfaceNetsTest.cpp @@ -42,10 +42,10 @@ TEST_CASE("SimplnxCore::SurfaceNetsFilter: NO Smoothing", "[SimplnxCore][Surface const DataPath gridGeomDataPath({k_DataContainer}); args.insertOrAssign(SurfaceNetsFilter::k_GridGeometryDataPath_Key, std::make_any(gridGeomDataPath)); args.insertOrAssign(SurfaceNetsFilter::k_CellFeatureIdsArrayPath_Key, std::make_any(featureIdsDataPath)); - const MultiArraySelectionParameter::ValueType selectedArrayPaths = {ebsdSanDataPath.createChildPath("BoundaryCells"), ebsdSanDataPath.createChildPath("ConfidenceIndex"), - ebsdSanDataPath.createChildPath("IPFColors")}; - - args.insertOrAssign(SurfaceNetsFilter::k_SelectedDataArrayPaths_Key, std::make_any(selectedArrayPaths)); + // const MultiArraySelectionParameter::ValueType selectedArrayPaths = {ebsdSanDataPath.createChildPath("BoundaryCells"), ebsdSanDataPath.createChildPath("ConfidenceIndex"), + // ebsdSanDataPath.createChildPath("IPFColors")}; + // + // args.insertOrAssign(SurfaceNetsFilter::k_SelectedDataArrayPaths_Key, std::make_any(selectedArrayPaths)); args.insertOrAssign(SurfaceNetsFilter::k_CreatedTriangleGeometryPath_Key, std::make_any(triangleGeometryPath)); @@ -63,11 +63,11 @@ TEST_CASE("SimplnxCore::SurfaceNetsFilter: NO Smoothing", "[SimplnxCore][Surface // Preflight the filter and check result auto preflightResult = filter.preflight(dataStructure, args); - REQUIRE(preflightResult.outputActions.valid()); + SIMPLNX_RESULT_REQUIRE_VALID(preflightResult.outputActions) // Execute the filter and check the result auto executeResult = filter.execute(dataStructure, args); - REQUIRE(executeResult.result.valid()); + SIMPLNX_RESULT_REQUIRE_VALID(executeResult.result) // Check a few things about the generated data. TriangleGeom& triangleGeom = dataStructure.getDataRefAs(triangleGeometryPath); @@ -119,10 +119,10 @@ TEST_CASE("SimplnxCore::SurfaceNetsFilter: With Smoothing", "[SimplnxCore][Surfa args.insertOrAssign(SurfaceNetsFilter::k_GridGeometryDataPath_Key, std::make_any(gridGeomDataPath)); args.insertOrAssign(SurfaceNetsFilter::k_CellFeatureIdsArrayPath_Key, std::make_any(featureIdsDataPath)); - MultiArraySelectionParameter::ValueType const selectedArrayPaths = {ebsdSanDataPath.createChildPath("BoundaryCells"), ebsdSanDataPath.createChildPath("ConfidenceIndex"), - ebsdSanDataPath.createChildPath("IPFColors")}; - - args.insertOrAssign(SurfaceNetsFilter::k_SelectedDataArrayPaths_Key, std::make_any(selectedArrayPaths)); + // MultiArraySelectionParameter::ValueType const selectedArrayPaths = {ebsdSanDataPath.createChildPath("BoundaryCells"), ebsdSanDataPath.createChildPath("ConfidenceIndex"), + // ebsdSanDataPath.createChildPath("IPFColors")}; + // + // args.insertOrAssign(SurfaceNetsFilter::k_SelectedDataArrayPaths_Key, std::make_any(selectedArrayPaths)); args.insertOrAssign(SurfaceNetsFilter::k_CreatedTriangleGeometryPath_Key, std::make_any(triangleGeometryPath)); @@ -140,11 +140,11 @@ TEST_CASE("SimplnxCore::SurfaceNetsFilter: With Smoothing", "[SimplnxCore][Surfa // Preflight the filter and check result auto preflightResult = filter.preflight(dataStructure, args); - REQUIRE(preflightResult.outputActions.valid()); + SIMPLNX_RESULT_REQUIRE_VALID(preflightResult.outputActions) // Execute the filter and check the result auto executeResult = filter.execute(dataStructure, args); - REQUIRE(executeResult.result.valid()); + SIMPLNX_RESULT_REQUIRE_VALID(executeResult.result) // Check a few things about the generated data. TriangleGeom& triangleGeom = dataStructure.getDataRefAs(triangleGeometryPath);