From 7c23aa1e4a6e6669874780c58d9be2cd53397444 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Sat, 18 Dec 2021 10:07:33 +0100 Subject: [PATCH] restore call to canSliceAnalytically --- Resample/Processed/Slicer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Resample/Processed/Slicer.cpp b/Resample/Processed/Slicer.cpp index 9cb12b1cec2..bdf50c21ca3 100644 --- a/Resample/Processed/Slicer.cpp +++ b/Resample/Processed/Slicer.cpp @@ -87,6 +87,10 @@ ReParticle* createParticleSlice(const IBornFF* ff, ZLimits limits, const IRotati if (shapeIsContainedInLimits(*ff, limits, rot, translation)) return ReParticle::createTransformedFormFactor(*ff, rot, translation); + if (!ff->canSliceAnalytically(rot)) + throw std::runtime_error("Slicing of " + ff->className() + + " not supported for the given rotation"); + if (const auto* f = dynamic_cast<const FormFactorAnisoPyramid*>(ff)) { const SlicingEffects effects = computeSlicingEffects(limits, translation, f->height()); double dbase_edge = 2 * effects.dz_bottom * Math::cot(f->alpha()); @@ -221,8 +225,7 @@ ReParticle* createParticleSlice(const IBornFF* ff, ZLimits limits, const IRotati return ReParticle::createTransformedFormFactor(slicedff, rot, effects.position); } else - throw std::runtime_error("Slicing of " + ff->className() - + " not supported for the given rotation!"); + throw std::runtime_error("Slicing of " + ff->className() + " not supported"); } //! Recursively processes the basis of a mesocrystal. -- GitLab