| 2938 | } |
| 2939 | |
| 2940 | void Clipper64::BuildTree64(PolyPath64& polytree, Paths64& open_paths) |
| 2941 | { |
| 2942 | polytree.Clear(); |
| 2943 | open_paths.resize(0); |
| 2944 | if (has_open_paths_) |
| 2945 | open_paths.reserve(outrec_list_.size()); |
| 2946 | |
| 2947 | // outrec_list_.size() is not static here because |
| 2948 | // CheckBounds below can indirectly add additional |
| 2949 | // OutRec (via FixOutRecPts & CleanCollinear) |
| 2950 | for (size_t i = 0; i < outrec_list_.size(); ++i) |
| 2951 | { |
| 2952 | OutRec* outrec = outrec_list_[i]; |
| 2953 | if (!outrec || !outrec->pts) continue; |
| 2954 | if (outrec->is_open) |
| 2955 | { |
| 2956 | Path64 path; |
| 2957 | if (BuildPath64(outrec->pts, ReverseSolution, true, path)) |
| 2958 | open_paths.push_back(path); |
| 2959 | continue; |
| 2960 | } |
| 2961 | |
| 2962 | if (CheckBounds(outrec)) |
| 2963 | RecursiveCheckOwners(outrec, &polytree); |
| 2964 | } |
| 2965 | } |
| 2966 | |
| 2967 | bool BuildPathD(OutPt* op, bool reverse, bool isOpen, PathD& path, double inv_scale) |
| 2968 | { |