MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / BuildTreeD

Method BuildTreeD

CPP/Clipper2Lib/src/clipper.engine.cpp:3137–3161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3135 }
3136
3137 void ClipperD::BuildTreeD(PolyPathD& polytree, PathsD& open_paths)
3138 {
3139 polytree.Clear();
3140 open_paths.resize(0);
3141 if (has_open_paths_)
3142 open_paths.reserve(outrec_list_.size());
3143
3144 // outrec_list_.size() is not static here because
3145 // BuildPathD below can indirectly add additional OutRec //#607
3146 for (size_t i = 0; i < outrec_list_.size(); ++i)
3147 {
3148 OutRec* outrec = outrec_list_[i];
3149 if (!outrec || !outrec->pts) continue;
3150 if (outrec->is_open)
3151 {
3152 PathD path;
3153 if (BuildPathD(outrec->pts, reverse_solution_, true, path, invScale_))
3154 open_paths.emplace_back(std::move(path));
3155 continue;
3156 }
3157
3158 if (CheckBounds(outrec))
3159 RecursiveCheckOwners(outrec, &polytree);
3160 }
3161 }
3162
3163} // namespace clipper2lib

Callers

nothing calls this directly

Calls 2

BuildPathDFunction · 0.85
ClearMethod · 0.45

Tested by

no test coverage detected