Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -472,3 +472,22 @@ Result<> CreateGeometryFilter::executeImpl(DataStructure& dataStructure, const A
return warningResults;
}
} // namespace nx::core

namespace
{
namespace SIMPL
{

} // namespace SIMPL
} // namespace

Result<Arguments> CreateGeometryFilter::FromSIMPLJson(const nlohmann::json& json)
{
Arguments args = CreateGeometryFilter().getDefaultArguments();

std::vector<Result<>> results;

Result<> conversionResult = MergeResults(std::move(results));

return ConvertResultTo<Arguments>(std::move(conversionResult), std::move(args));
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ class SIMPLNXCORE_EXPORT CreateGeometryFilter : public IFilter
static inline constexpr uint64 k_MoveArray = 1;
static inline constexpr uint64 k_ReferenceArray = 2;

/**
* @brief Reads SIMPL json and converts it simplnx Arguments.
* @param json
* @return Result<Arguments>
*/
static Result<Arguments> FromSIMPLJson(const nlohmann::json& json);

/**
* @brief Returns the name of the filter.
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string>

// clang-format off
#include "SimplnxCore/Filters/CreateGeometryFilter.hpp"
#include "SimplnxCore/Filters/AlignGeometriesFilter.hpp"
#include "SimplnxCore/Filters/AlignSectionsFeatureCentroidFilter.hpp"
#include "SimplnxCore/Filters/AlignSectionsListFilter.hpp"
Expand Down Expand Up @@ -133,6 +134,7 @@ namespace nx::core
static const AbstractPlugin::SIMPLMapType k_SIMPL_to_SimplnxCore
{
// syntax std::make_pair {Dream3d UUID , Dream3dnx UUID, {}}}, // dream3d-class-name
{nx::core::Uuid::FromString("9ac220b9-14f9-581a-9bac-5714467589cc").value(), {nx::core::FilterTraits<CreateGeometryFilter>::uuid, &CreateGeometryFilter::FromSIMPLJson}}, // CreateGeometryFilter
{nx::core::Uuid::FromString("886f8b46-51b6-5682-a289-6febd10b7ef0").value(), {nx::core::FilterTraits<AlignSectionsFeatureCentroidFilter>::uuid, &AlignSectionsFeatureCentroidFilter::FromSIMPLJson}}, // AlignSectionsFeatureCentroid
{nx::core::Uuid::FromString("ce1ee404-0336-536c-8aad-f9641c9458be").value(), {nx::core::FilterTraits<AlignGeometriesFilter>::uuid, &AlignGeometriesFilter::FromSIMPLJson}}, // AlignGeometriesFilter
{nx::core::Uuid::FromString("accf8f6c-0551-5da3-9a3d-e4be41c3985c").value(), {nx::core::FilterTraits<AlignSectionsListFilter>::uuid, &AlignSectionsListFilter::FromSIMPLJson}}, // AlignSectionsListFilter
Expand Down
Loading