85 {
86 auto castToCylinder = [](
const Layer * pLayer) ->
const CylinderSurface * {
88 return static_cast<const CylinderSurface *>(&pLayer->surfaceRepresentation());
89 return nullptr;
90 };
91 auto castToDisc = [](
const Layer * pLayer) ->
const DiscSurface *{
93 return static_cast<const DiscSurface *>(&pLayer->surfaceRepresentation());
94 return nullptr;
95 };
96
97 const CylinderSurface *cyl1 = castToCylinder(one);
98 const CylinderSurface *cyl2 = castToCylinder(two);
99 if (cyl1 and cyl2) {
100 return (cyl1->
bounds().
r() < cyl2->bounds().r());
101 }
102 const DiscSurface *disc1 = castToDisc(one);
103 const DiscSurface *disc2 = castToDisc(two);
104 if (disc1 and disc2) {
105 return (std::abs(disc1->center().z()) < std::abs(disc2->center().z()));
106 }
107
108 return false;
109 }
virtual const CylinderBounds & bounds() const override final
This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)
virtual double r() const override final
This method returns the radius.