84 SegmentSplitter splitter;
85 const SegmentList& segments = splitter.split(
zone, ray);
90 double volumeTotal = 0;
92 std::vector<ServiceVolume* > tmpServiceVec;
93 tmpServiceVec.reserve(segments.size());
94 for (
unsigned int i = 0;
i < segments.size(); ++
i) {
95 const Segment& seg = segments.getSegment(
i);
98 if (segments.horizontal()) {
99 if (param.splittableInZ()) {
100 paramNew->setZmin(seg.zmin());
101 paramNew->setZmax(seg.zmax());
105 std::cout <<
"Volume " << param.fullLabel() <<
" cannot be split in Z" << std::endl;
109 if (param.splittableInR()) {
110 paramNew->setRmin(seg.rmin());
111 paramNew->setRmax(seg.rmax());
113 std::cout <<
"Volume " << param.fullLabel() <<
" cannot be split in R" << std::endl;
122 double zminTmp = paramNew->zmin();
123 paramNew->setZmin(-paramNew->zmax());
124 paramNew->setZmax(-zminTmp);
125 paramNew->setNeedsRotation(
false);
129 if (param.splittableInZ()) {
133 paramNew->setRegion(seg.label());
134 tmpServiceVec.push_back(paramNew);
136 paramNew->getShape();
137 volumeTotal += paramNew->volume();
141 for (
unsigned int i = 0;
i < segments.size(); ++
i) {
143 if (segments.size() > 1) {
144 std::ostringstream ostr;
145 ostr <<
"_" <<
i + 1;
146 paramNew->addLabel(ostr.str());
148 paramNew->setOrigVolume(volumeTotal);