9 #include <boost/test/unit_test.hpp>
27 BOOST_AUTO_TEST_SUITE(Geometry)
35 BOOST_CHECK_EQUAL(ccvb, copied);
39 BOOST_CHECK_EQUAL(ccvb, assigned);
44 std::array<double, CutoutCylinderVolumeBounds::eSize>
values;
45 std::vector<double> valvector = original.
values();
49 BOOST_CHECK_EQUAL(original, recreated);
53 double rmin{5}, rmed{10},
rmax{15},
hz{30}, hzc{25};
89 double rmin{5}, rmed{10},
rmax{15},
hz{30}, hzc{25};
103 BOOST_CHECK(!ccvb.
inside({0, 0, 0}));
104 BOOST_CHECK(!ccvb.inside({0, 3, 0}));
105 BOOST_CHECK(!ccvb.inside({3, 0, 0}));
106 BOOST_CHECK(!ccvb.inside({0, 7, 0}));
107 BOOST_CHECK(!ccvb.inside({7, 0, 0}));
108 BOOST_CHECK(ccvb.inside({0, 13, 0}));
109 BOOST_CHECK(ccvb.inside({13, 0, 0}));
110 BOOST_CHECK(!ccvb.inside({0, 17, 0}));
111 BOOST_CHECK(!ccvb.inside({17, 0, 0}));
114 BOOST_CHECK(!ccvb.inside({0, 0, 35}));
115 BOOST_CHECK(!ccvb.inside({0, 0, -35}));
116 BOOST_CHECK(!ccvb.inside({0, 3, 35}));
117 BOOST_CHECK(!ccvb.inside({0, 3, -35}));
118 BOOST_CHECK(!ccvb.inside({3, 0, 35}));
119 BOOST_CHECK(!ccvb.inside({3, 0, -35}));
120 BOOST_CHECK(!ccvb.inside({0, 10, 35}));
121 BOOST_CHECK(!ccvb.inside({0, 10, -35}));
122 BOOST_CHECK(!ccvb.inside({10, 0, 35}));
123 BOOST_CHECK(!ccvb.inside({10, 0, -35}));
124 BOOST_CHECK(!ccvb.inside({0, 20, 35}));
125 BOOST_CHECK(!ccvb.inside({0, 20, -35}));
126 BOOST_CHECK(!ccvb.inside({20, 0, 35}));
127 BOOST_CHECK(!ccvb.inside({20, 0, -35}));
130 BOOST_CHECK(!ccvb.inside({0, 0, 27}));
131 BOOST_CHECK(!ccvb.inside({0, 0, -27}));
132 BOOST_CHECK(!ccvb.inside({0, 3, 27}));
133 BOOST_CHECK(!ccvb.inside({0, 3, -27}));
134 BOOST_CHECK(!ccvb.inside({3, 0, 27}));
135 BOOST_CHECK(!ccvb.inside({3, 0, -27}));
136 BOOST_CHECK(ccvb.inside({0, 7, 27}));
137 BOOST_CHECK(ccvb.inside({0, 7, -27}));
138 BOOST_CHECK(ccvb.inside({7, 0, 27}));
139 BOOST_CHECK(ccvb.inside({7, 0, -27}));
140 BOOST_CHECK(ccvb.inside({0, 13, 27}));
141 BOOST_CHECK(ccvb.inside({0, 13, -27}));
142 BOOST_CHECK(ccvb.inside({13, 0, 27}));
143 BOOST_CHECK(ccvb.inside({13, 0, -27}));
144 BOOST_CHECK(!ccvb.inside({0, 17, 27}));
145 BOOST_CHECK(!ccvb.inside({0, 17, -27}));
146 BOOST_CHECK(!ccvb.inside({17, 0, 27}));
147 BOOST_CHECK(!ccvb.inside({17, 0, -27}));
150 BOOST_CHECK(!ccvb.inside({0, 0, 23}));
151 BOOST_CHECK(!ccvb.inside({0, 0, -23}));
152 BOOST_CHECK(!ccvb.inside({0, 3, 23}));
153 BOOST_CHECK(!ccvb.inside({0, 3, -23}));
154 BOOST_CHECK(!ccvb.inside({3, 0, 23}));
155 BOOST_CHECK(!ccvb.inside({3, 0, -23}));
156 BOOST_CHECK(!ccvb.inside({0, 7, 23}));
157 BOOST_CHECK(!ccvb.inside({0, 7, -23}));
158 BOOST_CHECK(!ccvb.inside({7, 0, 23}));
159 BOOST_CHECK(!ccvb.inside({7, 0, -23}));
160 BOOST_CHECK(ccvb.inside({0, 13, 23}));
161 BOOST_CHECK(ccvb.inside({0, 13, -23}));
162 BOOST_CHECK(ccvb.inside({13, 0, 23}));
163 BOOST_CHECK(ccvb.inside({13, 0, -23}));
164 BOOST_CHECK(!ccvb.inside({0, 17, 23}));
165 BOOST_CHECK(!ccvb.inside({0, 17, -23}));
166 BOOST_CHECK(!ccvb.inside({17, 0, 23}));
167 BOOST_CHECK(!ccvb.inside({17, 0, -23}));
172 std::vector<IdentifiedPolyderon> tPolyhedrons;
175 const std::string&
name) ->
void {
176 std::string writeBase = std::string(
"CutoutCylinderVolumeBounds") +
name;
180 for (
const auto& sf : surfaces) {
181 Polyhedron phComponent = sf->polyhedronRepresentation(tgContext, 72);
182 phCombined.
merge(phComponent);
183 tPolyhedrons.push_back(
187 tPolyhedrons.push_back({writeBase,
false, phCombined});
196 combineAndDecompose(ccvbSurfaces,
"");
197 ObjTestWriter::writeObj(
"CutoutCylinderVolumeBounds_BB",
box);
198 ObjTestWriter::writeObj(tPolyhedrons);
201 BOOST_AUTO_TEST_SUITE_END()