Included redirection in geometry generator
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user