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

Function BuildPath64

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

Source from the content-addressed store, hash-verified

2889 }
2890
2891 bool BuildPath64(OutPt* op, bool reverse, bool isOpen, Path64& path)
2892 {
2893 if (!op || op->next == op || (!isOpen && op->next == op->prev))
2894 return false;
2895
2896 path.resize(0);
2897 Point64 lastPt;
2898 OutPt* op2;
2899 if (reverse)
2900 {
2901 lastPt = op->pt;
2902 op2 = op->prev;
2903 }
2904 else
2905 {
2906 op = op->next;
2907 lastPt = op->pt;
2908 op2 = op->next;
2909 }
2910 path.emplace_back(lastPt);
2911
2912 while (op2 != op)
2913 {
2914 if (op2->pt != lastPt)
2915 {
2916 lastPt = op2->pt;
2917 path.emplace_back(lastPt);
2918 }
2919 if (reverse)
2920 op2 = op2->prev;
2921 else
2922 op2 = op2->next;
2923 }
2924
2925 if (!isOpen && path.size() == 3 && IsVerySmallTriangle(*op2)) return false;
2926 else return true;
2927 }
2928
2929 bool ClipperBase::CheckBounds(OutRec* outrec)
2930 {

Callers 3

CheckBoundsMethod · 0.85
BuildPaths64Method · 0.85
BuildTree64Method · 0.85

Calls 1

IsVerySmallTriangleFunction · 0.85

Tested by

no test coverage detected