9 #include <boost/test/unit_test.hpp>
22 namespace tt = boost::test_tools;
26 using namespace UnitLiterals;
49 BOOST_CHECK_EQUAL(solidCone.
innerRmin(), 0.);
50 BOOST_CHECK_EQUAL(solidCone.
innerRmax(), 0.);
54 BOOST_CHECK_EQUAL(solidCone.
outerRmin(), 0.);
55 BOOST_CHECK_EQUAL(solidCone.
outerRmax(), outerRmax);
58 BOOST_CHECK_EQUAL(solidConeSurfaces.size(), 2);
62 auto cutOffConeSurfaces = cutOffCone.orientedSurfaces();
63 BOOST_CHECK_EQUAL(cutOffConeSurfaces.size(), 3);
66 ConeVolumeBounds cutOffHollowCone(0.35, 70_mm, 0.45, 80_mm, 50_mm, 0., M_PI);
67 auto cutOffHollowConeSurfaces = cutOffHollowCone.orientedSurfaces();
68 BOOST_CHECK_EQUAL(cutOffHollowConeSurfaces.size(), 4);
71 ConeVolumeBounds cutOffHollowSectoralCone(0.35, 70_mm, 0.45, 80_mm, 50_mm, 0.,
73 auto cutOffHollowSectoralConeSurfaces =
74 cutOffHollowSectoralCone.orientedSurfaces();
75 BOOST_CHECK_EQUAL(cutOffHollowSectoralConeSurfaces.size(), 6);
79 auto cutOffHollowCylConeSurfaces = cutOffHollowCylCone.orientedSurfaces();
80 BOOST_CHECK_EQUAL(cutOffHollowCylConeSurfaces.size(), 4);
84 auto cutOffHollowConeCylSurfaces = cutOffHollowConeCyl.orientedSurfaces();
85 BOOST_CHECK_EQUAL(cutOffHollowConeCylSurfaces.size(), 4);
94 BOOST_CHECK_EQUAL(cvbOrientedSurfaces.size(), 4);
101 for (
auto&
os : cvbOrientedSurfaces) {
103 auto rot =
os.first->transform(geoCtx).rotation();
104 BOOST_CHECK(rot.col(0).isApprox(xaxis));
105 BOOST_CHECK(rot.col(1).isApprox(yaxis));
106 BOOST_CHECK(rot.col(2).isApprox(zaxis));
110 BOOST_AUTO_TEST_SUITE_END()