MCPcopy Create free account
hub / github.com/KratosMultiphysics/Kratos / BuildPath64

Function BuildPath64

external_libraries/clipper/src/clipper.engine.cpp:2807–2843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2805 }
2806
2807 bool BuildPath64(OutPt* op, bool reverse, bool isOpen, Path64& path)
2808 {
2809 if (!op || op->next == op || (!isOpen && op->next == op->prev))
2810 return false;
2811
2812 path.resize(0);
2813 Point64 lastPt;
2814 OutPt* op2;
2815 if (reverse)
2816 {
2817 lastPt = op->pt;
2818 op2 = op->prev;
2819 }
2820 else
2821 {
2822 op = op->next;
2823 lastPt = op->pt;
2824 op2 = op->next;
2825 }
2826 path.push_back(lastPt);
2827
2828 while (op2 != op)
2829 {
2830 if (op2->pt != lastPt)
2831 {
2832 lastPt = op2->pt;
2833 path.push_back(lastPt);
2834 }
2835 if (reverse)
2836 op2 = op2->prev;
2837 else
2838 op2 = op2->next;
2839 }
2840
2841 if (path.size() == 3 && IsVerySmallTriangle(*op2)) return false;
2842 else return true;
2843 }
2844
2845 bool ClipperBase::CheckBounds(OutRec* outrec)
2846 {

Callers 3

CheckBoundsMethod · 0.85
BuildPaths64Method · 0.85
BuildTree64Method · 0.85

Calls 4

IsVerySmallTriangleFunction · 0.85
resizeMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected