This will write a cylindrical object.
124 std::vector<int> flip = {-1, 1};
125 std::vector<int> vfaces = {1, 2, 4, 3};
127 double phistep = 2 *
M_PI / nSegments;
129 std::vector<double> roffsets = {0.};
130 if (thickness != 0.) roffsets = {-0.5 * thickness, 0.5 * thickness};
132 unsigned int cvc = vtnCounter.vcounter;
134 for (
auto t : roffsets) {
137 for (; iphi < nSegments; ++iphi) {
139 double phi = -
M_PI + iphi * phistep;
140 for (
auto iflip : flip) {
152 unsigned int soff = 2 * iside * nSegments;
153 for (; iphi < nSegments - 1; ++iphi) {
156 for (
auto face : vfaces)
stream << soff + cvc + (2 * iphi) + face <<
" ";
160 stream <<
"f " << soff + cvc + (2 * iphi) + 1 <<
" "
161 << soff + cvc + (2 * iphi) + 2 <<
" " << soff + cvc + 2 <<
" "
162 << soff + cvc + 1 <<
'\n';
169 Acts::Vector3 nvectorSide =
transform.rotation().col(2);
174 if (thickness != 0.) {
176 for (iside = 0; iside < 2; ++iside) {
179 for (; iphi < nSegments - 1; ++iphi) {
181 unsigned int base = cvc + (2 * iphi) + 1;
184 stream << iside +
base + (2 * nSegments) + 2 << ntphr <<
" ";
185 stream << iside +
base + (2 * nSegments) << ntphr <<
'\n';
189 stream << iside + cvc + (2 * iphi) + 1 << ntphr <<
" ";
190 stream << iside + cvc + 1 << ntphr <<
" ";
191 stream << iside + cvc + 1 + (2 * nSegments) << ntphr <<
" ";
192 stream << iside + cvc + (2 * iphi) + 1 + (2 * nSegments) << ntphr <<
'\n';