Included redirection in geometry generator

This commit is contained in:
2024-03-15 14:09:00 +01:00
parent 1dbecc86ce
commit 55c51f8434
4 changed files with 22 additions and 2 deletions
+18
View File
@@ -25,4 +25,22 @@ std::shared_ptr<Geometry> buildGeometry(Parameter& parameter,
}
}
std::shared_ptr<Geometry> buildGeometryIncludingRedirection(
Parameter& parameter, const json_path& path_to_geometry) {
if (parameter.jsonObjectFromBase(
json_path_append(path_to_geometry, {"CreateSameAs"}))) {
DEBUG_LEVEL_2("Creating geometry: CreateSameAs.");
json_path path_to_same = json_path_get(parameter.jsonObjectFromBase(
json_path_append(path_to_geometry, {"CreateSameAs"})));
std::stringstream path;
for (auto& p : path_to_same) {
path << p << " ";
}
DEBUG_LEVEL_3("From path: " + path.str());
return buildGeometryIncludingRedirection(parameter, path_to_same);
} else {
return buildGeometry(parameter, path_to_geometry);
}
}
}; // namespace generator