Changes to the Cone+Cylinder Geometry; cutting off the

tip of the cone is now supported
This commit is contained in:
2026-06-09 09:13:20 +02:00
parent a6a9ac388c
commit 9e9c9ac174
3 changed files with 14 additions and 8 deletions
+6 -2
View File
@@ -41,14 +41,18 @@ std::shared_ptr<Geometry> buildGeometry(Parameter& parameter,
json_read_length(parameter.jsonObjectFromBase(json_path_append(
path_to_geometry, {"HalfCylinderWithCone", "HeightCone"})),
"m");
double z_frustum =
json_read_length(parameter.jsonObjectFromBase(json_path_append(
path_to_geometry, {"HalfCylinderWithCone", "FrustumStartZ"})),
"m");
#ifdef debug
std::stringstream out;
out << "height cyl: " << heightcylinder << ", height cone: " << heightcone << ", radius: " << radius << "\n";
out << "height cyl: " << heightcylinder << ", height cone: " << heightcone << ", radius: " << radius << ", zfrustum: " << z_frustum << "\n";
DEBUG(out.str());
#endif
return std::shared_ptr<Geometry>(
new HalfCylinderWithCone(radius, heightcylinder, heightcone));
new HalfCylinderWithCone(radius, heightcylinder, heightcone, z_frustum));
} else {
ERROR("This geometry is not implemented.");
return nullptr;