9 #include <boost/test/unit_test.hpp>
18 namespace tt = boost::test_tools;
22 using namespace UnitLiterals;
45 BOOST_CHECK_EQUAL(solidCone.
innerRmin(), 0.);
46 BOOST_CHECK_EQUAL(solidCone.
innerRmax(), 0.);
50 BOOST_CHECK_EQUAL(solidCone.
outerRmin(), 0.);
51 BOOST_CHECK_EQUAL(solidCone.
outerRmax(), outerRmax);
54 BOOST_CHECK_EQUAL(solidConeSurfaces.size(), 2);
58 auto cutOffConeSurfaces = cutOffCone.orientedSurfaces();
59 BOOST_CHECK_EQUAL(cutOffConeSurfaces.size(), 3);
63 auto cutOffHollowConeSurfaces = cutOffHollowCone.orientedSurfaces();
64 BOOST_CHECK_EQUAL(cutOffHollowConeSurfaces.size(), 4);
67 ConeVolumeBounds cutOffHollowSectoralCone(0.35, 70_mm, 0.45, 80_mm, 50_mm, 0.,
69 auto cutOffHollowSectoralConeSurfaces =
70 cutOffHollowSectoralCone.orientedSurfaces();
71 BOOST_CHECK_EQUAL(cutOffHollowSectoralConeSurfaces.size(), 6);
75 auto cutOffHollowCylConeSurfaces = cutOffHollowCylCone.orientedSurfaces();
76 BOOST_CHECK_EQUAL(cutOffHollowCylConeSurfaces.size(), 4);
80 auto cutOffHollowConeCylSurfaces = cutOffHollowConeCyl.orientedSurfaces();
81 BOOST_CHECK_EQUAL(cutOffHollowConeCylSurfaces.size(), 4);
90 BOOST_CHECK_EQUAL(cvbOrientedSurfaces.size(), 4);
97 for (
auto& os : cvbOrientedSurfaces) {
99 auto rot = os.first->transform(geoCtx).rotation();
100 BOOST_CHECK(rot.col(0).isApprox(xaxis));
101 BOOST_CHECK(rot.col(1).isApprox(yaxis));
102 BOOST_CHECK(rot.col(2).isApprox(zaxis));
106 BOOST_AUTO_TEST_SUITE_END()