diff options
author | 2013-03-13 20:29:41 +0000 | |
---|---|---|
committer | 2013-03-13 20:29:41 +0000 | |
commit | 1304bb25aa3b0baa61fc2e2900fabcef88801b59 (patch) | |
tree | ed0c2c346ba327cc82e1d8850f840adeb4270cd3 /experimental/Intersection/as.htm | |
parent | dcf9c19d38d366a9f27ad0d8b5bda327c5edb164 (diff) |
shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@8137 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/as.htm')
-rw-r--r-- | experimental/Intersection/as.htm | 4626 |
1 files changed, 4301 insertions, 325 deletions
diff --git a/experimental/Intersection/as.htm b/experimental/Intersection/as.htm index e1efc3d322..7488c0965b 100644 --- a/experimental/Intersection/as.htm +++ b/experimental/Intersection/as.htm @@ -70,8 +70,7 @@ findNextOp chase.append id=4 activeOp op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 markWinding id=1 (0,1 1,6 2,0 5,1) t=0.238109917 [2] (0.741329789,2.94366908) tEnd=0.691654855 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 findNextOp chase.append id=1 -markDoneBinary id=4 (6,1 0,2Program received signal: “EXC_BAD_ACCESS”. -) t=0 [0] (6,1) tEnd=0.543879805 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +markDoneBinary id=4 (6,1 0,2) t=0 [0] (6,1) tEnd=0.543879805 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 findNextOp from:[4] to:[1] start=3 end=2 bridgeOp current id=4 from=(6,1) to=(2.73672128,1.54387975) findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 @@ -233,13 +232,3272 @@ debugShowActiveSpans id=2 (5,1 0,1) t=0 (5,1) tEnd=0.268518519 other=1 otherT=1 {{x = 0.64244110111854291, y = 2.5673840215265367}, {x = 0.63479413812245555, y = 2.5620057200094775}, {x = 0.64115438240274059, y = 2.533597555954064}, {x = 0.6620248993310307, y = 2.4876932484482714}} </div> +<div id="cubicOp38d"> + SimplifyNew_Test [cubicOp38d] +{{0,1}, {0,6}, {3,2}, {4,1}}, +{{4,1}, {0,1}}, +op difference +{{2,3}, {1,4}, {1,0}, {6,0}}, +{{6,0}, {2,3}}, +debugShowCubicIntersection no self intersect {{2,3}, {1,4}, {1,0}, {6,0}} +debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {1,4}, {1,0}, {6,0}} {{2,3}} wtTs[1]=1 {{6,0}} wnTs[0]=1 {{6,0}, {2,3}} wnTs[1]=0 +debugShowCubicIntersection no intersect {{2,3}, {1,4}, {1,0}, {6,0}} {{0,1}, {0,6}, {3,2}, {4,1}} +debugShowCubicLineIntersection wtTs[0]=0.666666667 {{2,3}, {1,4}, {1,0}, {6,0}} {{2.518518518518519,0.99999999999999967}} wnTs[0]=0.37037 {{4,1}, {0,1}} +debugShowCubicLineIntersection no intersect {{0,1}, {0,6}, {3,2}, {4,1}} {{6,0}, {2,3}} +debugShowLineIntersection no intersect {{6,0}, {2,3}} {{4,1}, {0,1}} +debugShowCubicIntersection no self intersect {{0,1}, {0,6}, {3,2}, {4,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {0,6}, {3,2}, {4,1}} {{0,1}} wtTs[1]=1 {{4,1}} wnTs[0]=1 {{4,1}, {0,1}} wnTs[1]=0 +debugShowActiveSpans id=3 (2,3 1,4 1,0 6,0) t=0 (2,3) tEnd=0.666666667 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,4 1,0 6,0) t=0.666666667 (2.51851845,1) tEnd=1 other=2 otherT=0.37037037 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,0 2,3) t=0 (6,0) tEnd=1 other=3 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 0,6 3,2 4,1) t=0 (0,1) tEnd=1 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,1 0,1) t=0 (4,1) tEnd=0.37037037 other=1 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,1 0,1) t=0.37037037 (2.51851845,1) tEnd=1 other=3 otherT=0.666666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=1 tEnd=0.666666667 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{6,0}, {2,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findTop xyE=(6,0) xyS=(2.51851845,1) +findTop dxyE=(15,0) dxyS=(6.33333349,-5) cross=-75 bumpsUp=false +markWinding id=3 (2,3 1,4 1,0 6,0) t=0.666666667 [1] (2.51851845,1) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (6,0 2,3) t=0 [0] (6,0) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 1,4 1,0 6,0) t=0 [0] (2,3) tEnd=0.666666667 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 1,4 1,0 6,0) t=0.666666667 [1] (2.51851845,1) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (2,3 1,4 1,0 6,0) t=0.666666667 [1] (2.51851845,1) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +markDoneBinary id=4 (6,0 2,3) t=0 [0] (6,0) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +markDoneBinary id=3 (2,3 1,4 1,0 6,0) t=0 [0] (2,3) tEnd=0.666666667 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,1}, {0,1}} tStart=0.37037037 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [3] {{4,1}, {0,1}} tStart=0.37037037 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,1}, {0,1}} tStart=0.37037037 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [3] {{4,1}, {0,1}} tStart=0.37037037 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=2 (4,1 0,1) t=0.37037037 [1] (2.51851845,1) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 0,6 3,2 4,1) t=0 [0] (0,1) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (4,1 0,1) t=0 [0] (4,1) tEnd=0.37037037 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (4,1 0,1) t=0 [0] (4,1) tEnd=0.37037037 newWindSum=1 newOppSum=-1 oppSum=0 windSum=1 windValue=1 +</div> + +<div id="cubicOp38da"> + {{0,1}, {0,6}, {3,2}, {4,1}}, + {{2,3}, {1,4}, {1,0}, {6,0}}, +computed quadratics set 2 + {{2,3}, {1.46296296,3.41666667}, {1.48148148,2.66666667}}, + {{1.48148148,2.66666667}, {1.5,1.91666667}, {2.51851852,1}}, + {{2.51851852,1}, {3.53703704,0.0833333333}, {6,0}}, +computed quadratics set 1 + {{0,1}, {0.0311951689,3.11686153}, {0.643808143,3.37716704}}, + {{0.643808143,3.37716704}, {1.25642112,3.63747255}, {2.07610987,2.9396429}}, + {{2.07610987,2.9396429}, {2.89579862,2.24181325}, {3.54822112,1.48426931}}, + {{3.54822112,1.48426931}, {3.81269436,1.19058669}, {4,1}}, +</div> + +<div id="cubicOp39d"> + SimplifyNew_Test [cubicOp39d] +{{0,1}, {2,3}, {5,1}, {4,3}}, +{{4,3}, {0,1}}, +op difference +{{1,5}, {3,4}, {1,0}, {3,2}}, +{{3,2}, {1,5}}, +debugShowCubicIntersection no self intersect {{0,1}, {2,3}, {5,1}, {4,3}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {2,3}, {5,1}, {4,3}} {{0,1}} wtTs[1]=0.285714286 {{1.8425655976676385,1.9212827988338192}} wtTs[2]=1 {{4,3}} wnTs[0]=1 {{4,3}, {0,1}} wnTs[1]=0.539358601 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0.311007457 {{0,1}, {2,3}, {5,1}, {4,3}} {{2.005809685956442,1.9459962410665144}} wnTs[0]=0.589885 {{1,5}, {3,4}, {1,0}, {3,2}} +debugShowCubicLineIntersection no intersect {{0,1}, {2,3}, {5,1}, {4,3}} {{3,2}, {1,5}} +debugShowCubicLineIntersection wtTs[0]=0.576935809 {{1,5}, {3,4}, {1,0}, {3,2}} {{2.0036431374219883,2.0018215687109939}} wnTs[0]=0.499089 {{4,3}, {0,1}} +debugShowLineIntersection wtTs[0]=0.3125 {{4,3}, {0,1}} {{2.75,2.375}} wnTs[0]=0.125 {{3,2}, {1,5}} +debugShowCubicIntersection no self intersect {{1,5}, {3,4}, {1,0}, {3,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{1,5}, {3,4}, {1,0}, {3,2}} {{1,5}} wtTs[1]=0.285714286 {{1.9212827988338184,3.6180758017492725}} wtTs[2]=1 {{3,2}} wnTs[0]=1 {{3,2}, {1,5}} wnTs[1]=0.539358601 wnTs[2]=0 +debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0 (0,1) tEnd=0.285714286 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.285714286 (1.84256566,1.92128277) tEnd=0.311007457 other=2 otherT=0.539358601 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.311007457 (2.00580978,1.94599628) tEnd=1 other=3 otherT=0.589885081 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,3 0,1) t=0 (4,3) tEnd=0.3125 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,3 0,1) t=0.3125 (2.75,2.375) tEnd=0.499089216 other=4 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,3 0,1) t=0.499089216 (2.00364304,2.00182152) tEnd=0.539358601 other=3 otherT=0.576935809 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,3 0,1) t=0.539358601 (1.84256566,1.92128277) tEnd=1 other=1 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0 (1,5) tEnd=0.285714286 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.285714286 (1.92128277,3.61807585) tEnd=0.576935809 other=4 otherT=0.539358601 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.576935809 (2.00364304,2.00182152) tEnd=0.589885081 other=2 otherT=0.499089216 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.589885081 (2.00580978,1.94599628) tEnd=1 other=1 otherT=0.311007457 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0.125 (2.75,2.375) tEnd=0.539358601 other=2 otherT=0.3125 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0.539358601 (1.92128277,3.61807585) tEnd=1 other=3 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0 tEnd=0.285714286 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,3}, {0,1}} tStart=1 tEnd=0.539358601 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +findTop xyE=(0,1) xyS=(1.84256566,1.92128277) +findTop dxyE=(6,6) dxyS=(6.48979568,1.10204077) cross=-32.3265305 bumpsUp=false +markWinding id=1 (0,1 2,3 5,1 4,3) t=0 [0] (0,1) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (4,3 0,1) t=0.539358601 [3] (1.84256566,1.92128277) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 2,3 5,1 4,3) t=0 [0] (0,1) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=1 (0,1 2,3 5,1 4,3) t=0 [0] (0,1) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=1 from=(1.84256566,1.92128277) to=(0,1) +path.moveTo(1.84256566,1.92128277); +path.cubicTo(1.22448969,1.8163265, 0.571428597,1.57142854, 0,1); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{4,3}, {0,1}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{4,3}, {0,1}} tStart=0.539358601 tEnd=0.499089216 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0.311007457 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markWinding id=2 (4,3 0,1) t=0.499089216 [2] (2.00364304,2.00182152) tEnd=0.539358601 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markWinding id=1 (0,1 2,3 5,1 4,3) t=0.285714286 [1] (1.84256566,1.92128277) tEnd=0.311007457 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +markDoneBinary id=2 (4,3 0,1) t=0.539358601 [3] (1.84256566,1.92128277) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[1] start=1 end=2 +bridgeOp current id=2 from=(0,1) to=(1.84256566,1.92128277) +path.lineTo(1.84256566,1.92128277); +path.close(); +debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.285714286 (1.84256566,1.92128277) tEnd=0.311007457 other=2 otherT=0.539358601 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.311007457 (2.00580978,1.94599628) tEnd=1 other=3 otherT=0.589885081 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,3 0,1) t=0 (4,3) tEnd=0.3125 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,3 0,1) t=0.3125 (2.75,2.375) tEnd=0.499089216 other=4 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,3 0,1) t=0.499089216 (2.00364304,2.00182152) tEnd=0.539358601 other=3 otherT=0.576935809 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0 (1,5) tEnd=0.285714286 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.285714286 (1.92128277,3.61807585) tEnd=0.576935809 other=4 otherT=0.539358601 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.576935809 (2.00364304,2.00182152) tEnd=0.589885081 other=2 otherT=0.499089216 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.589885081 (2.00580978,1.94599628) tEnd=1 other=1 otherT=0.311007457 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0.125 (2.75,2.375) tEnd=0.539358601 other=2 otherT=0.3125 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0.539358601 (1.92128277,3.61807585) tEnd=1 other=3 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [3] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0.311007457 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{4,3}, {0,1}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{4,3}, {0,1}} tStart=0.539358601 tEnd=0.499089216 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=1 (0,1 2,3 5,1 4,3) t=0.285714286 [1] (1.84256566,1.92128277) tEnd=0.311007457 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findNextOp from:[1] to:[2] start=3 end=2 +bridgeOp current id=1 from=(2.00580978,1.94599628) to=(1.84256566,1.92128277) +path.moveTo(2.00580978,1.94599628); +path.cubicTo(1.9517231,1.93876874, 1.89728141,1.93057418, 1.84256566,1.92128277); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [1] {{4,3}, {0,1}} tStart=0.499089216 tEnd=0.539358601 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.576935809 tEnd=0.285714286 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{4,3}, {0,1}} tStart=0.499089216 tEnd=0.3125 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.576935809 tEnd=0.589885081 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0.285714286 [1] (1.92128277,3.61807585) tEnd=0.576935809 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (4,3 0,1) t=0.3125 [1] (2.75,2.375) tEnd=0.499089216 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markWinding id=3 (1,5 3,4 1,0 3,2) t=0.576935809 [2] (2.00364304,2.00182152) tEnd=0.589885081 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +markDoneBinary id=2 (4,3 0,1) t=0.499089216 [2] (2.00364304,2.00182152) tEnd=0.539358601 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findNextOp from:[2] to:[3] start=2 end=3 +bridgeOp current id=2 from=(1.84256566,1.92128277) to=(2.00364304,2.00182152) +findNextOp debugShowSort contourWinding=0 oppContourWinding=-1 sign=1 +debugShowSort [2] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.589885081 tEnd=0.576935809 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.311007457 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [0] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.589885081 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.311007457 tEnd=0.285714286 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,1 2,3 5,1 4,3) t=0.311007457 [2] (2.00580978,1.94599628) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markDoneBinary id=2 (4,3 0,1) t=0 [0] (4,3) tEnd=0.3125 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0.589885081 [3] (2.00580978,1.94599628) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=4 (3,2 1,5) t=0 [0] (3,2) tEnd=0.125 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0.576935809 [2] (2.00364304,2.00182152) tEnd=0.589885081 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +findNextOp from:[3] to:[1] start=2 end=1 +bridgeOp current id=3 from=(2.00364304,2.00182152) to=(2.00580978,1.94599628) +path.lineTo(2.00364304,2.00182152); +path.cubicTo(2.00425649,1.98283899, 2.0049727,1.96422386, 2.00580978,1.94599628); +path.close(); +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{3,2}, {1,5}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,3}, {0,1}} tStart=0.3125 tEnd=0.499089216 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=1 tiny=0 opp=1 +debugShowSort [2] {{3,2}, {1,5}} tStart=0.125 tEnd=0.539358601 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,3}, {0,1}} tStart=0.3125 tEnd=0 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=1 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{3,2}, {1,5}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,3}, {0,1}} tStart=0.3125 tEnd=0.499089216 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=1 tiny=0 opp=1 +debugShowSort [2] {{3,2}, {1,5}} tStart=0.125 tEnd=0.539358601 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,3}, {0,1}} tStart=0.3125 tEnd=0 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=1 tiny=0 opp=1 +markWinding id=4 (3,2 1,5) t=0.125 [1] (2.75,2.375) tEnd=0.539358601 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0 (1,5) tEnd=0.285714286 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0.125 (2.75,2.375) tEnd=0.539358601 other=2 otherT=0.3125 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0.539358601 (1.92128277,3.61807585) tEnd=1 other=3 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [0] {{3,2}, {1,5}} tStart=0.539358601 tEnd=0.125 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0.576935809 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{3,2}, {1,5}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[0] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (3,2 1,5) t=0.539358601 [2] (1.92128277,3.61807585) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=3 (1,5 3,4 1,0 3,2) t=0 [0] (1,5) tEnd=0.285714286 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markDoneBinary id=4 (3,2 1,5) t=0.125 [1] (2.75,2.375) tEnd=0.539358601 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[3] start=1 end=0 +bridgeOp current id=4 from=(2.75,2.375) to=(1.92128277,3.61807585) +findNextOp simple +markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0 [0] (1,5) tEnd=0.285714286 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +bridgeOp current id=3 from=(1.92128277,3.61807585) to=(1,5) +path.moveTo(2.75,2.375); +path.lineTo(1.92128277,3.61807585); +path.cubicTo(1.8163265,4.18367338, 1.57142854,4.71428585, 1,5); +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1 +debugShowSort [2] {{3,2}, {1,5}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [0] {{3,2}, {1,5}} tStart=0.539358601 tEnd=0.125 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0.576935809 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +findNextOp firstIndex=[2] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markDoneBinary id=4 (3,2 1,5) t=0.539358601 [2] (1.92128277,3.61807585) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[4] to:[3] start=1 end=2 +bridgeOp current id=4 from=(1,5) to=(1.92128277,3.61807585) +</div> + +<div id="cubicOp39da"> +computed quadratics given + {{2.512,1.571}, {2.64,1.66}, {2.8,1.8}, {3,2}}, + {{2.41818762,1.98497726}, {2.82699049,2.00933065}, {3.20046793,1.99420472}, {3.49861995,2.00359946}}, +computed quadratics set 1 + {{2.512,1.571}, {2.702,1.70225}, {3,2}}, +computed quadratics set 2 + {{2.41818762,1.98497726}, {2.79879886,2.00375569}, {3.125,2}}, + {{3.125,2}, {3.32670858,1.99910014}, {3.49861995,2.00359946}}, +</div> + +<div id="cubicOp40d"> + SimplifyNew_Test [cubicOp40d] +{{0,1}, {1,5}, {3,2}, {4,2}}, +{{4,2}, {0,1}}, +op difference +{{2,3}, {2,4}, {1,0}, {5,1}}, +{{5,1}, {2,3}}, +debugShowCubicIntersection no self intersect {{2,3}, {2,4}, {1,0}, {5,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {2,4}, {1,0}, {5,1}} {{2,3}} wtTs[1]=1 {{5,1}} wnTs[0]=1 {{5,1}, {2,3}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=0 {{2,3}, {2,4}, {1,0}, {5,1}} {{2,3}} wtTs[1]=0.226611502 {{1.915764455286163,3.0259142027140675}} wnTs[0]=0.5 {{0,1}, {1,5}, {3,2}, {4,2}} wnTs[1]=0.481278074 +debugShowCubicLineIntersection wtTs[0]=0.601219833 {{2,3}, {2,4}, {1,0}, {5,1}} {{2.2195247359544519,1.554881183988613}} wnTs[0]=0.445119 {{4,2}, {0,1}} +debugShowCubicLineIntersection wtTs[0]=0.5 {{0,1}, {1,5}, {3,2}, {4,2}} {{2.0000000000000009,2.9999999999999996}} wnTs[0]=1 {{5,1}, {2,3}} +debugShowLineIntersection wtTs[0]=0.454545455 {{5,1}, {2,3}} {{3.6363636363636362,1.9090909090909089}} wnTs[0]=0.0909091 {{4,2}, {0,1}} +debugShowCubicIntersection no self intersect {{0,1}, {1,5}, {3,2}, {4,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,5}, {3,2}, {4,2}} {{0,1}} wtTs[1]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,1}} wnTs[1]=0 +debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0 (2,3) tEnd=0.226611502 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.226611502 (1.91576445,3.02591419) tEnd=0.601219833 other=1 otherT=0.481278074 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.601219833 (2.21952462,1.55488122) tEnd=1 other=2 otherT=0.445118816 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=0.454545455 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0 (0,1) tEnd=0.481278074 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.481278074 (1.91576445,3.02591419) tEnd=0.5 other=3 otherT=0.226611502 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0.0909090909 (3.63636374,1.90909088) tEnd=0.445118816 other=4 otherT=0.454545455 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0.445118816 (2.21952462,1.55488122) tEnd=1 other=3 otherT=0.601219833 otherIndex=3 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=1 tEnd=0.601219833 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,1}, {2,3}} tStart=0 tEnd=0.454545455 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findTop xyE=(5,1) xyS=(2.21952462,1.55488122) +findTop dxyE=(12,3) dxyS=(2.8990562,-4.19263649) cross=-59.0088043 bumpsUp=true +markWinding id=3 (2,3 2,4 1,0 5,1) t=0.601219833 [3] (2.21952462,1.55488122) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=0.454545455 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 2,4 1,0 5,1) t=0.601219833 [3] (2.21952462,1.55488122) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0.601219833 [3] (2.21952462,1.55488122) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +markDoneBinary id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=0.454545455 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{5,1}, {2,3}} tStart=0.454545455 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0.445118816 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{5,1}, {2,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{5,1}, {2,3}} tStart=0.454545455 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0.445118816 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{5,1}, {2,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=2 (4,2 0,1) t=0.0909090909 [1] (3.63636374,1.90909088) tEnd=0.445118816 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=4 (5,1 2,3) t=0.454545455 [1] (3.63636374,1.90909088) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=2 (4,2 0,1) t=0 [0] (4,2) tEnd=0.0909090909 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 1,5 3,2 4,2) t=0.5 [2] (2,3) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 1,5 3,2 4,2) t=0.5 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0 (2,3) tEnd=0.226611502 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.226611502 (1.91576445,3.02591419) tEnd=0.601219833 other=1 otherT=0.481278074 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0 (0,1) tEnd=0.481278074 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.481278074 (1.91576445,3.02591419) tEnd=0.5 other=3 otherT=0.226611502 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0.0909090909 (3.63636374,1.90909088) tEnd=0.445118816 other=4 otherT=0.454545455 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0.445118816 (2.21952462,1.55488122) tEnd=1 other=3 otherT=0.601219833 otherIndex=3 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (4,2 0,1) t=0.0909090909 [1] (3.63636374,1.90909088) tEnd=0.445118816 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,1}} tStart=0.445118816 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=0.226611502 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,1}} tStart=0.445118816 tEnd=0.0909090909 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,1}} tStart=0.445118816 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=0.226611502 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,1}} tStart=0.445118816 tEnd=0.0909090909 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +markWinding id=2 (4,2 0,1) t=0.445118816 [2] (2.21952462,1.55488122) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 1,5 3,2 4,2) t=0 [0] (0,1) tEnd=0.481278074 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 2,4 1,0 5,1) t=0.226611502 [2] (1.91576445,3.02591419) tEnd=0.601219833 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0 (2,3) tEnd=0.226611502 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.226611502 (1.91576445,3.02591419) tEnd=0.601219833 other=1 otherT=0.481278074 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0 (0,1) tEnd=0.481278074 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.481278074 (1.91576445,3.02591419) tEnd=0.5 other=3 otherT=0.226611502 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0.445118816 (2.21952462,1.55488122) tEnd=1 other=3 otherT=0.601219833 otherIndex=3 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=2 (4,2 0,1) t=0.445118816 [2] (2.21952462,1.55488122) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(2.21952462,1.55488122) to=(0,1) +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [2] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.481278074 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.226611502 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [0] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.481278074 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.226611502 tEnd=0.601219833 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0 [0] (2,3) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0 [1] (2,3) tEnd=0.226611502 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0.481278074 [1] (1.91576445,3.02591419) tEnd=0.5 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0 [0] (0,1) tEnd=0.481278074 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[3] start=2 end=3 +bridgeOp current id=1 from=(0,1) to=(1.91576445,3.02591419) +path.moveTo(2.21952462,1.55488122); +path.lineTo(0,1); +path.cubicTo(0.481278062,2.92511225, 1.19418478,3.22882462, 1.91576445,3.02591419); +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [2] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=0.226611502 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,1}} tStart=0.445118816 tEnd=0.0909090909 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,1}} tStart=0.445118816 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0.226611502 [2] (1.91576445,3.02591419) tEnd=0.601219833 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[2] start=2 end=3 +bridgeOp current id=3 from=(1.91576445,3.02591419) to=(2.21952462,1.55488122) +path.cubicTo(1.86140633,2.74398875, 1.8575213,2.07841325, 2.21952462,1.55488122); +path.close(); +debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0.5 [2] (2,3) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0.5 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=1 from=(2,3) to=(4,2) +path.moveTo(2,3); +path.cubicTo(2.75,2.75, 3.5,2, 4,2); +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [3] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{5,1}, {2,3}} tStart=0.454545455 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [1] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0.445118816 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{5,1}, {2,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markDoneBinary id=2 (4,2 0,1) t=0 [0] (4,2) tEnd=0.0909090909 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[4] start=1 end=2 +bridgeOp current id=2 from=(4,2) to=(3.63636374,1.90909088) +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [1] {{5,1}, {2,3}} tStart=1 tEnd=0.454545455 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=0.481278074 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [3] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0 tEnd=0.226611502 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [0] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=4 (5,1 2,3) t=0.454545455 [1] (3.63636374,1.90909088) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[1] start=3 end=4 +bridgeOp current id=4 from=(3.63636374,1.90909088) to=(2,3) +path.lineTo(3.63636374,1.90909088); +path.lineTo(2,3); +path.close(); +debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{5,1}, {2,3}} tStart=1 tEnd=0.454545455 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [2] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=0.481278074 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [3] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0 tEnd=0.226611502 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +</div> + +<div id="cubicOp41i"> + SimplifyNew_Test [cubicOp41i] +{{0,1}, {2,6}, {4,3}, {6,4}}, +{{6,4}, {0,1}}, +op intersect +{{3,4}, {4,6}, {1,0}, {6,2}}, +{{6,2}, {3,4}}, +debugShowCubicIntersection no self intersect {{0,1}, {2,6}, {4,3}, {6,4}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {2,6}, {4,3}, {6,4}} {{0,1}} wtTs[1]=1 {{6,4}} wnTs[0]=1 {{6,4}, {0,1}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=0.5 {{0,1}, {2,6}, {4,3}, {6,4}} {{2.9999999999509201,3.9999999999999996}} wtTs[1]=0.521137715 {{3.1268262924910069,3.9974325146613827}} wnTs[0]=0 {{3,4}, {4,6}, {1,0}, {6,2}} wnTs[1]=0.317571165 +debugShowCubicLineIntersection wtTs[0]=0.5 {{0,1}, {2,6}, {4,3}, {6,4}} {{3,4}} wnTs[0]=1 {{6,2}, {3,4}} +debugShowCubicLineIntersection wtTs[0]=0.580941393 {{3,4}, {4,6}, {1,0}, {6,2}} {{3.0456725133851208,2.5228362566925604}} wnTs[0]=0.492388 {{6,4}, {0,1}} +debugShowLineIntersection wtTs[0]=0.285714286 {{6,4}, {0,1}} {{4.2857142857142856,3.1428571428571428}} wnTs[0]=0.571429 {{6,2}, {3,4}} +debugShowCubicIntersection no self intersect {{3,4}, {4,6}, {1,0}, {6,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{3,4}, {4,6}, {1,0}, {6,2}} {{3,4}} wtTs[1]=0.333333333 {{3.1111111111111116,3.9259259259259256}} wtTs[2]=1 {{6,2}} wnTs[0]=1 {{6,2}, {3,4}} wnTs[1]=0.962962963 wnTs[2]=0 +debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0 (0,1) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.5 (3,4) tEnd=0.521137715 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.521137715 (3.12682629,3.99743247) tEnd=1 other=3 otherT=0.317571165 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,4 0,1) t=0 (6,4) tEnd=0.285714286 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,4 0,1) t=0.492387914 (3.04567242,2.52283621) tEnd=1 other=3 otherT=0.580941393 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0 (3,4) tEnd=0.317571165 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.317571165 (3.12682629,3.99743247) tEnd=0.333333333 other=1 otherT=0.521137715 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.333333333 (3.11111116,3.92592597) tEnd=0.580941393 other=4 otherT=0.962962963 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0.571428571 (4.28571415,3.14285707) tEnd=0.962962963 other=2 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0.962962963 (3.11111116,3.92592597) tEnd=1 other=3 otherT=0.333333333 otherIndex=3 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{6,4}, {0,1}} tStart=1 tEnd=0.492387914 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +findTop xyE=(0,1) xyS=(3,4) +findTop dxyE=(6,15) dxyS=(6,9.81599801e-11) cross=-90 bumpsUp=false +markWinding id=1 (0,1 2,6 4,3 6,4) t=0 [0] (0,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (6,4 0,1) t=0.492387914 [2] (3.04567242,2.52283621) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 2,6 4,3 6,4) t=0 [0] (0,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +activeOp op=sect miFrom=1 miTo=0 suFrom=0 suTo=0 result=0 +markDoneBinary id=1 (0,1 2,6 4,3 6,4) t=0 [0] (0,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markDoneBinary id=2 (6,4 0,1) t=0.492387914 [2] (3.04567242,2.52283621) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1 +debugShowSort [0] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{6,4}, {0,1}} tStart=0.492387914 tEnd=1 sign=-1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=0.333333333 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{6,4}, {0,1}} tStart=0.492387914 tEnd=0.285714286 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [1] {{6,4}, {0,1}} tStart=0.492387914 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=0.333333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{6,4}, {0,1}} tStart=0.492387914 tEnd=0.285714286 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +markWinding id=3 (3,4 4,6 1,0 6,2) t=0.333333333 [3] (3.11111116,3.92592597) tEnd=0.580941393 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=2 (6,4 0,1) t=0.285714286 [1] (4.28571415,3.14285707) tEnd=0.492387914 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=3 (3,4 4,6 1,0 6,2) t=0.580941393 [4] (3.04567242,2.52283621) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (6,2 3,4) t=0 [0] (6,2) tEnd=0.571428571 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.5 (3,4) tEnd=0.521137715 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.521137715 (3.12682629,3.99743247) tEnd=1 other=3 otherT=0.317571165 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,4 0,1) t=0 (6,4) tEnd=0.285714286 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0 (3,4) tEnd=0.317571165 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.317571165 (3.12682629,3.99743247) tEnd=0.333333333 other=1 otherT=0.521137715 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.333333333 (3.11111116,3.92592597) tEnd=0.580941393 other=4 otherT=0.962962963 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0.571428571 (4.28571415,3.14285707) tEnd=0.962962963 other=2 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0.962962963 (3.11111116,3.92592597) tEnd=1 other=3 otherT=0.333333333 otherIndex=3 windSum=? windValue=1 oppValue=0 +activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [1] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.580941393 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{6,2}, {3,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.317571165 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{6,2}, {3,4}} tStart=0.962962963 tEnd=0.571428571 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[1] sign=-1 +activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markWinding id=3 (3,4 4,6 1,0 6,2) t=0.317571165 [2] (3.12682629,3.99743247) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (6,2 3,4) t=0.571428571 [1] (4.28571415,3.14285707) tEnd=0.962962963 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0.333333333 [3] (3.11111116,3.92592597) tEnd=0.580941393 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[4] start=2 end=3 +bridgeOp current id=3 from=(3.04567242,2.52283621) to=(3.11111116,3.92592597) +path.moveTo(3.04567242,2.52283621); +path.cubicTo(2.9460392,2.99209714, 3.02857494,3.54075789, 3.11111116,3.92592597); +markUnsortable id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=0 windSum=1 windValue=1 +markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=0 windSum=? windValue=1 +markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [1] (3,4) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=3 (3,4 4,6 1,0 6,2) t=0 [1] (3,4) tEnd=0.317571165 newWindSum=0 windSum=? windValue=1 +findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1 +debugShowSort [0] {{6,2}, {3,4}} tStart=1 tEnd=0.962962963 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.521137715 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1 +debugShowSort [2] *** UNSORTABLE *** {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 2->1 (max=2) done=1 tiny=1 opp=1 +debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0 tEnd=0.317571165 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +markDoneBinary id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +path.lineTo(3,4); +debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.5 (3,4) tEnd=0.521137715 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.521137715 (3.12682629,3.99743247) tEnd=1 other=3 otherT=0.317571165 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,4 0,1) t=0 (6,4) tEnd=0.285714286 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0 (3,4) tEnd=0.317571165 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.317571165 (3.12682629,3.99743247) tEnd=0.333333333 other=1 otherT=0.521137715 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0.571428571 (4.28571415,3.14285707) tEnd=0.962962963 other=2 otherT=0.285714286 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [0] {{6,2}, {3,4}} tStart=0.962962963 tEnd=0.571428571 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.580941393 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{6,2}, {3,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.317571165 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[0] sign=1 +activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markDoneBinary id=4 (6,2 3,4) t=0.571428571 [1] (4.28571415,3.14285707) tEnd=0.962962963 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[3] start=3 end=2 +bridgeOp current id=4 from=(4.28571415,3.14285707) to=(3.11111116,3.92592597) +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1 +debugShowSort [1] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.317571165 tEnd=0.333333333 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.521137715 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.317571165 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.521137715 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=sect miFrom=1 miTo=0 suFrom=1 suTo=1 result=1 +markWinding id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=sect miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0 [0] (3,4) tEnd=0 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0 [1] (3,4) tEnd=0.317571165 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=sect miFrom=0 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=1 (0,1 2,6 4,3 6,4) t=0.521137715 [3] (3.12682629,3.99743247) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=2 (6,4 0,1) t=0 [0] (6,4) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0.317571165 [2] (3.12682629,3.99743247) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[3] to:[1] start=3 end=2 +bridgeOp current id=3 from=(3.11111116,3.92592597) to=(3.12682629,3.99743247) +path.moveTo(4.28571415,3.14285707); +path.lineTo(3.11111116,3.92592597); +path.cubicTo(3.11636519,3.9504447, 3.12161922,3.97430134, 3.12682629,3.99743247); +setSpans unsortable [2] (3,4) [3] (3.12682629,3.99743247) +setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597) +markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=0 windSum=1 windValue=1 +markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [1] (3,4) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=0 windSum=1 windValue=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1 +debugShowSort [0] *** UNSORTABLE *** {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.521137715 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] *** UNSORTABLE *** {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=1 tiny=1 opp=0 +debugShowSort [2] *** UNSORTABLE *** {{6,2}, {3,4}} tStart=1 tEnd=0.962962963 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +path.cubicTo(3.08455086,3.99910641, 3.04227543,4, 3,4); +markDoneBinary id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +activeOp op=sect miFrom=0 miTo=1 suFrom=1 suTo=1 result=1 +findNextOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1 +debugShowSort [3] {{6,4}, {0,1}} tStart=0.492387914 tEnd=0.285714286 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [1] {{6,4}, {0,1}} tStart=0.492387914 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=0.333333333 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=1 +activeOp op=sect miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=sect miFrom=0 miTo=1 suFrom=0 suTo=0 result=0 +activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markDoneBinary id=2 (6,4 0,1) t=0.285714286 [1] (4.28571415,3.14285707) tEnd=0.492387914 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +findNextOp from:[2] to:[3] start=4 end=3 +bridgeOp current id=2 from=(4.28571415,3.14285707) to=(3.04567242,2.52283621) +path.moveTo(4.28571415,3.14285707); +path.lineTo(3.04567242,2.52283621); +setSpans unsortable [1] (3,4) [2] (3.12682629,3.99743247) +setSpans all tiny unsortable [1] (3,4) [0] (0,1) +setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597) +setSpans unsortable [2] (3,4) [3] (3.12682629,3.99743247) +setSpans unsortable [1] (3,4) [2] (3.12682629,3.99743247) +setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597) +setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597) +setSpans unsortable [2] (3,4) [3] (3.12682629,3.99743247) +setSpans unsortable [1] (3,4) [2] (3.12682629,3.99743247) +debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +activeOp op=sect miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0.580941393 [4] (3.04567242,2.52283621) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +markDoneBinary id=4 (6,2 3,4) t=0 [0] (6,2) tEnd=0.571428571 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +</div> + +<div id="cubicOp42d"> + SimplifyNew_Test [cubicOp42d] +{{0,1}, {1,2}, {6,5}, {5,4}}, +{{5,4}, {0,1}}, +op difference +{{5,6}, {4,5}, {1,0}, {2,1}}, +{{2,1}, {5,6}}, +debugShowCubicIntersection no self intersect {{5,6}, {4,5}, {1,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{5,6}, {4,5}, {1,0}, {2,1}} {{5,6}} wtTs[1]=1 {{2,1}} wnTs[0]=1 {{2,1}, {5,6}} wnTs[1]=0 +debugShowCubicIntersection no intersect {{5,6}, {4,5}, {1,0}, {2,1}} {{0,1}, {1,2}, {6,5}, {5,4}} +debugShowCubicLineIntersection wtTs[0]=0.520955385 {{5,6}, {4,5}, {1,0}, {2,1}} {{2.6570733652881806,2.5942440191729084}} wnTs[0]=0.468585 {{5,4}, {0,1}} +debugShowCubicLineIntersection wtTs[0]=0.520955385 {{0,1}, {1,2}, {6,5}, {5,4}} {{3.4057559808270916,3.3429266347118194}} wnTs[0]=0.468585 {{2,1}, {5,6}} +debugShowLineIntersection wtTs[0]=0.375 {{2,1}, {5,6}} {{3.125,2.875}} wnTs[0]=0.375 {{5,4}, {0,1}} +debugShowCubicIntersection no self intersect {{0,1}, {1,2}, {6,5}, {5,4}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,2}, {6,5}, {5,4}} {{0,1}} wtTs[1]=1 {{5,4}} wnTs[0]=1 {{5,4}, {0,1}} wnTs[1]=0 +debugShowActiveSpans id=3 (5,6 4,5 1,0 2,1) t=0 (5,6) tEnd=0.520955385 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 4,5 1,0 2,1) t=0.520955385 (2.65707326,2.594244) tEnd=1 other=2 otherT=0.468585327 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 5,6) t=0 (2,1) tEnd=0.375 other=3 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 5,6) t=0.375 (3.125,2.875) tEnd=0.468585327 other=2 otherT=0.375 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 5,6) t=0.468585327 (3.405756,3.34292674) tEnd=1 other=1 otherT=0.520955385 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,2 6,5 5,4) t=0 (0,1) tEnd=0.520955385 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,2 6,5 5,4) t=0.520955385 (3.405756,3.34292674) tEnd=1 other=4 otherT=0.468585327 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.375 other=1 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0.375 (3.125,2.875) tEnd=0.468585327 other=4 otherT=0.375 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0.468585327 (2.65707326,2.594244) tEnd=1 other=3 otherT=0.520955385 otherIndex=1 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0 tEnd=0.520955385 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,4}, {0,1}} tStart=1 tEnd=0.468585327 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +findTop xyE=(0,1) xyS=(3.405756,3.34292674) +findTop dxyE=(3,3) dxyS=(7.361094,4.36636353) cross=-8.98419189 bumpsUp=false +markWinding id=1 (0,1 1,2 6,5 5,4) t=0 [0] (0,1) tEnd=0.520955385 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (5,4 0,1) t=0.468585327 [2] (2.65707326,2.594244) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 1,2 6,5 5,4) t=0 [0] (0,1) tEnd=0.520955385 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=1 (0,1 1,2 6,5 5,4) t=0 [0] (0,1) tEnd=0.520955385 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=1 from=(3.405756,3.34292674) to=(0,1) +path.moveTo(3.405756,3.34292674); +path.cubicTo(2.12748885,2.58469963, 0.520955384,1.52095544, 0,1); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [1] {{5,4}, {0,1}} tStart=0.468585327 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{5,6}, {4,5}, {1,0}, {2,1}} tStart=0.520955385 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{5,4}, {0,1}} tStart=0.468585327 tEnd=0.375 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{5,6}, {4,5}, {1,0}, {2,1}} tStart=0.520955385 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (5,6 4,5 1,0 2,1) t=0 [0] (5,6) tEnd=0.520955385 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (2,1 5,6) t=0.468585327 [2] (3.405756,3.34292674) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (5,4 0,1) t=0.375 [1] (3.125,2.875) tEnd=0.468585327 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (5,6 4,5 1,0 2,1) t=0.520955385 [1] (2.65707326,2.594244) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=4 (2,1 5,6) t=0 [0] (2,1) tEnd=0.375 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=2 (5,4 0,1) t=0.468585327 [2] (2.65707326,2.594244) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[3] start=1 end=0 +bridgeOp current id=2 from=(0,1) to=(2.65707326,2.594244) +findNextOp simple +markDoneBinary id=3 (5,6 4,5 1,0 2,1) t=0 [0] (5,6) tEnd=0.520955385 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=3 from=(2.65707326,2.594244) to=(5,6) +path.lineTo(2.65707326,2.594244); +path.cubicTo(3.41530037,3.87251115, 4.47904444,5.47904444, 5,6); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [2] {{2,1}, {5,6}} tStart=0.468585327 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1 +debugShowSort [0] {{2,1}, {5,6}} tStart=0.468585327 tEnd=0.375 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=1 (0,1 1,2 6,5 5,4) t=0.520955385 [1] (3.405756,3.34292674) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=2 (5,4 0,1) t=0 [0] (5,4) tEnd=0.375 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (2,1 5,6) t=0.375 [1] (3.125,2.875) tEnd=0.468585327 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (2,1 5,6) t=0.468585327 [2] (3.405756,3.34292674) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[4] start=2 end=1 +bridgeOp current id=4 from=(5,6) to=(3.405756,3.34292674) +path.lineTo(3.405756,3.34292674); +path.close(); +debugShowActiveSpans id=4 (2,1 5,6) t=0.375 (3.125,2.875) tEnd=0.468585327 other=2 otherT=0.375 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=2 sign=1 +debugShowSort [0] {{2,1}, {5,6}} tStart=0.468585327 tEnd=0.375 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1 +debugShowSort [2] {{2,1}, {5,6}} tStart=0.468585327 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [3] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=1 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=4 (2,1 5,6) t=0.375 [1] (3.125,2.875) tEnd=0.468585327 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1 +findNextOp from:[4] to:[4] start=2 end=3 +bridgeOp current id=4 from=(3.125,2.875) to=(3.405756,3.34292674) +</div> + +<div id="cubicOp42da"> +computed quadratics given + {{0,1}, {1,2}, {6,5}, {5,4}}, + {{5,6}, {4,5}, {1,0}, {2,1}}, +computed quadratics set 1 + {{0,1}, {0.4140625,1.3984375}, {1.34375,2.03125}}, + {{1.34375,2.03125}, {2.2734375,2.6640625}, {3.25,3.25}}, + {{3.25,3.25}, {4.2265625,3.8359375}, {4.78125,4.09375}}, + {{4.78125,4.09375}, {5.3359375,4.3515625}, {5,4}}, +computed quadratics set 2 + {{5,6}, {4.6015625,5.5859375}, {3.96875,4.65625}}, + {{3.96875,4.65625}, {3.3359375,3.7265625}, {2.75,2.75}}, + {{2.75,2.75}, {2.1640625,1.7734375}, {1.90625,1.21875}}, + {{1.90625,1.21875}, {1.6484375,0.6640625}, {2,1}}, +</div> + +<div id="cubicOp42db"> + {{1.34375,2.03125}, {2.2734375,2.6640625}, {3.25,3.25}}, + {{3.96875,4.65625}, {3.3359375,3.7265625}, {2.75,2.75}}, +</div> + +<div id="cubicOp43d"> + SimplifyNew_Test [cubicOp43d] +{{0,2}, {1,2}, {4,0}, {3,1}}, +{{3,1}, {0,2}}, +op difference +{{0,4}, {1,3}, {2,0}, {2,1}}, +{{2,1}, {0,4}}, +debugShowCubicIntersection no self intersect {{0,2}, {1,2}, {4,0}, {3,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {1,2}, {4,0}, {3,1}} {{0,2}} wtTs[1]=0.333333333 {{1.4444444444444446,1.5185185185185186}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {0,2}} wnTs[1]=0.518518519 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0.345547542 {{0,2}, {1,2}, {4,0}, {3,1}} {{1.5055045552472988,1.4898786220870244}} wnTs[0]=0.560544 {{0,4}, {1,3}, {2,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0.395188999 {{0,2}, {1,2}, {4,0}, {3,1}} {{1.7523027701818603,1.3715458447272095}} wnTs[0]=0.123849 {{2,1}, {0,4}} +debugShowCubicLineIntersection wtTs[0]=0.558102564 {{0,4}, {1,3}, {2,0}, {2,1}} {{1.5004707573680853,1.4998430808773049}} wnTs[0]=0.499843 {{3,1}, {0,2}} +debugShowLineIntersection wtTs[0]=0.428571429 {{3,1}, {0,2}} {{1.7142857142857142,1.4285714285714284}} wnTs[0]=0.142857 {{2,1}, {0,4}} +debugShowCubicIntersection no self intersect {{0,4}, {1,3}, {2,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {1,3}, {2,0}, {2,1}} {{0,4}} wtTs[1]=0.333333333 {{0.96296296296296258,2.5555555555555562}} wtTs[2]=1 {{2,1}} wnTs[0]=1 {{2,1}, {0,4}} wnTs[1]=0.518518519 wnTs[2]=0 +debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0 (0,2) tEnd=0.333333333 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0.333333333 (1.44444442,1.51851857) tEnd=0.345547542 other=2 otherT=0.518518519 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0.345547542 (1.50550461,1.48987865) tEnd=0.395188999 other=3 otherT=0.560544414 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0.395188999 (1.75230277,1.37154579) tEnd=1 other=4 otherT=0.123848615 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,1 0,2) t=0 (3,1) tEnd=0.428571429 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,1 0,2) t=0.428571429 (1.71428573,1.42857146) tEnd=0.499843081 other=4 otherT=0.142857143 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,1 0,2) t=0.499843081 (1.50047076,1.49984312) tEnd=0.518518519 other=3 otherT=0.558102564 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,1 0,2) t=0.518518519 (1.44444442,1.51851857) tEnd=1 other=1 otherT=0.333333333 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0 (0,4) tEnd=0.333333333 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0.333333333 (0.962962985,2.55555558) tEnd=0.558102564 other=4 otherT=0.518518519 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0.558102564 (1.50047076,1.49984312) tEnd=0.560544414 other=2 otherT=0.499843081 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0.560544414 (1.50550461,1.48987865) tEnd=1 other=1 otherT=0.345547542 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 0,4) t=0 (2,1) tEnd=0.123848615 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 0,4) t=0.123848615 (1.75230277,1.37154579) tEnd=0.142857143 other=1 otherT=0.395188999 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 0,4) t=0.142857143 (1.71428573,1.42857146) tEnd=0.518518519 other=2 otherT=0.428571429 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 0,4) t=0.518518519 (0.962962985,2.55555558) tEnd=1 other=3 otherT=0.333333333 otherIndex=1 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=1 tEnd=0.395188999 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,1}, {0,2}} tStart=0 tEnd=0.428571429 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findTop xyE=(3,1) xyS=(1.75230277,1.37154579) +findTop dxyE=(-3,3) dxyS=(4.93112993,-2.39965272) cross=-7.59443188 bumpsUp=true +findTop cross bump disagree +findTop swap +markWinding id=1 (0,2 1,2 4,0 3,1) t=0.395188999 [3] (1.75230277,1.37154579) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 1,2 4,0 3,1) t=0.395188999 [3] (1.75230277,1.37154579) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markWinding id=2 (3,1 0,2) t=0 [0] (3,1) tEnd=0.428571429 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.395188999 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {0,4}} tStart=0.123848615 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.395188999 tEnd=0.345547542 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,1}, {0,4}} tStart=0.123848615 tEnd=0.142857143 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (2,1 0,4) t=0 [0] (2,1) tEnd=0.123848615 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 1,3 2,0 2,1) t=0.560544414 [3] (1.50550461,1.48987865) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0.345547542 [2] (1.50550461,1.48987865) tEnd=0.395188999 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=4 (2,1 0,4) t=0.123848615 [1] (1.75230277,1.37154579) tEnd=0.142857143 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0.395188999 [3] (1.75230277,1.37154579) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[4] start=1 end=0 +bridgeOp current id=1 from=(3,1) to=(1.75230277,1.37154579) +path.moveTo(3,1); +path.cubicTo(3.60481095,0.395188987, 2.7464366,0.887767076, 1.75230277,1.37154579); +findNextOp simple +markDoneBinary id=4 (2,1 0,4) t=0 [0] (2,1) tEnd=0.123848615 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=4 from=(1.75230277,1.37154579) to=(2,1) +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.560544414 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.345547542 tEnd=0.333333333 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.560544414 tEnd=0.558102564 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.345547542 tEnd=0.395188999 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markWinding id=1 (0,2 1,2 4,0 3,1) t=0.333333333 [1] (1.44444442,1.51851857) tEnd=0.345547542 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0.558102564 [2] (1.50047076,1.49984312) tEnd=0.560544414 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0.560544414 [3] (1.50550461,1.48987865) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[1] start=2 end=1 +bridgeOp current id=3 from=(2,1) to=(1.50550461,1.48987865) +path.lineTo(2,1); +path.cubicTo(2,0.560544431, 1.80687881,0.893573642, 1.50550461,1.48987865); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [1] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.333333333 tEnd=0.345547542 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{3,1}, {0,2}} tStart=0.518518519 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0 +debugShowSort [0] {{3,1}, {0,2}} tStart=0.518518519 tEnd=0.499843081 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=2 (3,1 0,2) t=0.518518519 [3] (1.44444442,1.51851857) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0 [0] (0,2) tEnd=0.333333333 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markWinding id=2 (3,1 0,2) t=0.499843081 [2] (1.50047076,1.49984312) tEnd=0.518518519 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0.333333333 [1] (1.44444442,1.51851857) tEnd=0.345547542 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[2] start=3 end=2 +bridgeOp current id=1 from=(1.50550461,1.48987865) to=(1.44444442,1.51851857) +path.cubicTo(1.48515844,1.49946892, 1.46480155,1.50901854, 1.44444442,1.51851857); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [2] {{3,1}, {0,2}} tStart=0.499843081 tEnd=0.518518519 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.558102564 tEnd=0.333333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [0] {{3,1}, {0,2}} tStart=0.499843081 tEnd=0.428571429 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.558102564 tEnd=0.560544414 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (0,4 1,3 2,0 2,1) t=0.333333333 [1] (0.962962985,2.55555558) tEnd=0.558102564 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (3,1 0,2) t=0.428571429 [1] (1.71428573,1.42857146) tEnd=0.499843081 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=2 (3,1 0,2) t=0.499843081 [2] (1.50047076,1.49984312) tEnd=0.518518519 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[3] start=2 end=1 +bridgeOp current id=2 from=(1.44444442,1.51851857) to=(1.50047076,1.49984312) +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0.558102564 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{2,1}, {0,4}} tStart=0.518518519 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{2,1}, {0,4}} tStart=0.518518519 tEnd=0.142857143 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (2,1 0,4) t=0.518518519 [3] (0.962962985,2.55555558) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 1,3 2,0 2,1) t=0 [0] (0,4) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (2,1 0,4) t=0.142857143 [2] (1.71428573,1.42857146) tEnd=0.518518519 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0.333333333 [1] (0.962962985,2.55555558) tEnd=0.558102564 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[4] start=3 end=4 +bridgeOp current id=3 from=(1.50047076,1.49984312) to=(0.962962985,2.55555558) +path.lineTo(1.50047076,1.49984312); +path.cubicTo(1.3457123,1.80632472, 1.16275787,2.18094015, 0.962962985,2.55555558); +findNextOp simple +markDoneBinary id=4 (2,1 0,4) t=0.518518519 [3] (0.962962985,2.55555558) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +bridgeOp current id=4 from=(0.962962985,2.55555558) to=(0,4) +findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1 +debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{2,1}, {0,4}} tStart=0.518518519 tEnd=0.142857143 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0.558102564 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{2,1}, {0,4}} tStart=0.518518519 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0 [0] (0,4) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[3] to:[4] start=3 end=2 +bridgeOp current id=3 from=(0,4) to=(0.962962985,2.55555558) +path.lineTo(0,4); +path.cubicTo(0.333333343,3.66666675, 0.666666627,3.11111116, 0.962962985,2.55555558); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [3] {{2,1}, {0,4}} tStart=0.142857143 tEnd=0.518518519 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{3,1}, {0,2}} tStart=0.428571429 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=1 +debugShowSort [1] {{2,1}, {0,4}} tStart=0.142857143 tEnd=0.123848615 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{3,1}, {0,2}} tStart=0.428571429 tEnd=0.499843081 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (2,1 0,4) t=0.142857143 [2] (1.71428573,1.42857146) tEnd=0.518518519 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[2] start=1 end=0 +bridgeOp current id=4 from=(0.962962985,2.55555558) to=(1.71428573,1.42857146) +findNextOp simple +markDoneBinary id=2 (3,1 0,2) t=0 [0] (3,1) tEnd=0.428571429 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(1.71428573,1.42857146) to=(3,1) +path.lineTo(1.71428573,1.42857146); +path.lineTo(3,1); +path.close(); +assemble +assemble contour start=(3,1) end=(3,1) +</div> + +<div id="cubicOp44d"> + SimplifyNew_Test [cubicOp44d] +{{0,2}, {3,6}, {4,0}, {3,2}}, +{{3,2}, {0,2}}, +op difference +{{0,4}, {2,3}, {2,0}, {6,3}}, +{{6,3}, {0,4}}, +debugShowCubicIntersection no self intersect {{0,2}, {3,6}, {4,0}, {3,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {3,6}, {4,0}, {3,2}} {{0,2}} wtTs[1]=1 {{3,2}} wnTs[0]=1 {{3,2}, {0,2}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=0.135342164 {{0,2}, {3,6}, {4,0}, {3,2}} {{1.1081744689414279,3.1192052729330815}} wtTs[1]=0.754165096 {{3.3748959118747366,1.708000079031383}} wtTs[2]=0.93333707 {{3.1733251116708114,1.7013446943452044}} wnTs[0]=0.223477 {{0,4}, {2,3}, {2,0}, {6,3}} wnTs[1]=0.708782366 wnTs[2]=0.67692927 +debugShowCubicLineIntersection no intersect {{0,2}, {3,6}, {4,0}, {3,2}} {{6,3}, {0,4}} +debugShowCubicLineIntersection wtTs[0]=0.5 {{0,4}, {2,3}, {2,0}, {6,3}} {{2.25,2}} wnTs[0]=0.25 {{3,2}, {0,2}} +debugShowCubicIntersection no self intersect {{0,4}, {2,3}, {2,0}, {6,3}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {2,3}, {2,0}, {6,3}} {{0,4}} wtTs[1]=1 {{6,3}} wnTs[0]=1 {{6,3}, {0,4}} wnTs[1]=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0 (0,2) tEnd=0.135342164 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.135342164 (1.10817444,3.11920524) tEnd=0.754165096 other=3 otherT=0.223476766 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.754165096 (3.37489581,1.70800006) tEnd=0.93333707 other=3 otherT=0.708782366 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.93333707 (3.17332506,1.70134473) tEnd=1 other=3 otherT=0.67692927 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.25 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.25 (2.25,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0 (0,4) tEnd=0.223476766 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.223476766 (1.10817444,3.11920524) tEnd=0.5 other=1 otherT=0.135342164 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.5 (2.25,2) tEnd=0.67692927 other=2 otherT=0.25 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.67692927 (3.17332506,1.70134473) tEnd=0.708782366 other=1 otherT=0.93333707 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.708782366 (3.37489581,1.70800006) tEnd=1 other=1 otherT=0.754165096 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,3 0,4) t=0 (6,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.708782366 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=0.754165096 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findTop swap +markWinding id=3 (0,4 2,3 2,0 6,3) t=0.67692927 [3] (3.17332506,1.70134473) tEnd=0.708782366 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 2,3 2,0 6,3) t=0.67692927 [3] (3.17332506,1.70134473) tEnd=0.708782366 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.67692927 [3] (3.17332506,1.70134473) tEnd=0.708782366 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1 +debugShowSort [0] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.93333707 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=0.67692927 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.135342164 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=0.67692927 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.135342164 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.93333707 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +markWinding id=1 (0,2 3,6 4,0 3,2) t=0.135342164 [1] (1.10817444,3.11920524) tEnd=0.754165096 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 2,3 2,0 6,3) t=0.708782366 [4] (3.37489581,1.70800006) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=4 (6,3 0,4) t=0 [0] (6,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 2,3 2,0 6,3) t=0 [0] (0,4) tEnd=0.223476766 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 3,6 4,0 3,2) t=0.754165096 [2] (3.37489581,1.70800006) tEnd=0.93333707 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0 (0,2) tEnd=0.135342164 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.135342164 (1.10817444,3.11920524) tEnd=0.754165096 other=3 otherT=0.223476766 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.754165096 (3.37489581,1.70800006) tEnd=0.93333707 other=3 otherT=0.708782366 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.93333707 (3.17332506,1.70134473) tEnd=1 other=3 otherT=0.67692927 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.25 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.25 (2.25,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0 (0,4) tEnd=0.223476766 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.223476766 (1.10817444,3.11920524) tEnd=0.5 other=1 otherT=0.135342164 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.5 (2.25,2) tEnd=0.67692927 other=2 otherT=0.25 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.708782366 (3.37489581,1.70800006) tEnd=1 other=1 otherT=0.754165096 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,3 0,4) t=0 (6,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0.135342164 [1] (1.10817444,3.11920524) tEnd=0.754165096 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0 (0,2) tEnd=0.135342164 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.754165096 (3.37489581,1.70800006) tEnd=0.93333707 other=3 otherT=0.708782366 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.93333707 (3.17332506,1.70134473) tEnd=1 other=3 otherT=0.67692927 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.25 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.25 (2.25,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0 (0,4) tEnd=0.223476766 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.223476766 (1.10817444,3.11920524) tEnd=0.5 other=1 otherT=0.135342164 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.5 (2.25,2) tEnd=0.67692927 other=2 otherT=0.25 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.708782366 (3.37489581,1.70800006) tEnd=1 other=1 otherT=0.754165096 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,3 0,4) t=0 (6,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +findNextOp simple +markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0 [0] (0,4) tEnd=0.223476766 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +bridgeOp current id=3 from=(1.10817444,3.11920524) to=(0,4) +path.moveTo(1.10817444,3.11920524); +path.cubicTo(0.794023395,3.45316267, 0.446953505,3.77652311, 0,4); +findNextOp simple +markDoneBinary id=4 (6,3 0,4) t=0 [0] (6,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +bridgeOp current id=4 from=(0,4) to=(6,3) +findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.93333707 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=0.67692927 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.135342164 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.708782366 [4] (3.37489581,1.70800006) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +findNextOp from:[3] to:[1] start=2 end=3 +bridgeOp current id=3 from=(6,3) to=(3.37489581,1.70800006) +path.lineTo(6,3); +path.cubicTo(4.83512926,2.12634706, 4.00949001,1.76154041, 3.37489581,1.70800006); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=0.754165096 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.708782366 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (0,4 2,3 2,0 6,3) t=0.5 [2] (2.25,2) tEnd=0.67692927 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0.93333707 [3] (3.17332506,1.70134473) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markDoneBinary id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0.25 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0.754165096 [2] (3.37489581,1.70800006) tEnd=0.93333707 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findNextOp from:[1] to:[3] start=3 end=2 +bridgeOp current id=1 from=(3.37489581,1.70800006) to=(3.17332506,1.70134473) +path.cubicTo(3.37191081,1.55650449, 3.30472064,1.51977468, 3.17332506,1.70134473); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1 +debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.5 tEnd=0.67692927 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,2}, {0,2}} tStart=0.25 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.5 tEnd=0.223476766 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,2}, {0,2}} tStart=0.25 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markWinding id=2 (3,2 0,2) t=0.25 [1] (2.25,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 3,6 4,0 3,2) t=0 [0] (0,2) tEnd=0.135342164 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.223476766 [1] (1.10817444,3.11920524) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.5 [2] (2.25,2) tEnd=0.67692927 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +findNextOp from:[3] to:[2] start=1 end=2 +bridgeOp current id=3 from=(3.17332506,1.70134473) to=(2.25,2) +path.cubicTo(2.81209183,1.70874941, 2.51539397,1.82307076, 2.25,2); +findNextOp simple +markDoneBinary id=2 (3,2 0,2) t=0.25 [1] (2.25,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +bridgeOp current id=2 from=(2.25,2) to=(0,2) +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.135342164 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.223476766 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [3] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.135342164 tEnd=0.754165096 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.223476766 tEnd=0.5 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0 [0] (0,2) tEnd=0.135342164 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findNextOp from:[1] to:[3] start=1 end=0 +bridgeOp current id=1 from=(0,2) to=(1.10817444,3.11920524) +path.lineTo(0,2); +path.cubicTo(0.406026483,2.54136872, 0.775417984,2.89956236, 1.10817444,3.11920524); +path.close(); +assemble +assemble contour start=(1.10817444,3.11920524) end=(1.10817444,3.11920524) +</div> + +<div id="cubicOp45d"> + SimplifyNew_Test [cubicOp45d] +{{0,2}, {2,4}, {4,0}, {3,2}}, +{{3,2}, {0,2}}, +op difference +{{0,4}, {2,3}, {2,0}, {4,2}}, +{{4,2}, {0,4}}, +debugShowCubicIntersection no self intersect {{0,4}, {2,3}, {2,0}, {4,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {2,3}, {2,0}, {4,2}} {{0,4}} wtTs[1]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,4}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=0.341662805 {{0,4}, {2,3}, {2,0}, {4,2}} {{1.5091099386066631,2.5537951499735922}} wtTs[1]=0.856247521 {{3.2495913270767485,1.4266624658205882}} wtTs[2]=0.859816875 {{3.2657899721435943,1.4343874043112959}} wnTs[0]=0.260341 {{0,2}, {2,4}, {4,0}, {3,2}} wnTs[1]=0.768795564 wnTs[2]=0.821660252 +debugShowCubicLineIntersection wtTs[0]=0.467845317 {{0,4}, {2,3}, {2,0}, {4,2}} {{1.9034029684653309,1.9999999999999998}} wnTs[0]=0.365532 {{3,2}, {0,2}} +debugShowCubicLineIntersection no intersect {{0,2}, {2,4}, {4,0}, {3,2}} {{4,2}, {0,4}} +debugShowLineIntersection no intersect {{4,2}, {0,4}} {{3,2}, {0,2}} +debugShowCubicIntersection no self intersect {{0,2}, {2,4}, {4,0}, {3,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {2,4}, {4,0}, {3,2}} {{0,2}} wtTs[1]=0.5 {{2.625,2}} wtTs[2]=1 {{3,2}} wnTs[0]=1 {{3,2}, {0,2}} wnTs[1]=0.125 wnTs[2]=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.856247521 (3.24959135,1.42666245) tEnd=0.859816875 other=1 otherT=0.768795564 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.5 (2.625,2) tEnd=0.768795564 other=2 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.821660252 (3.26578999,1.43438745) tEnd=1 other=3 otherT=0.859816875 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=3 (0,4 2,3 2,0 4,2) t=0.856247521 [3] (3.24959135,1.42666245) tEnd=0.859816875 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 2,3 2,0 4,2) t=0.856247521 [3] (3.24959135,1.42666245) tEnd=0.859816875 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.856247521 [3] (3.24959135,1.42666245) tEnd=0.859816875 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=1 (0,2 2,4 4,0 3,2) t=0.821660252 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0.125 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 2,3 2,0 4,2) t=0.859816875 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (4,2 0,4) t=0 [0] (4,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,4 2,3 2,0 4,2) t=0 [0] (0,4) tEnd=0.341662805 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 2,4 4,0 3,2) t=0.768795564 [3] (3.24959135,1.42666245) tEnd=0.821660252 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.5 (2.625,2) tEnd=0.768795564 other=2 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.821660252 (3.26578999,1.43438745) tEnd=1 other=3 otherT=0.859816875 otherIndex=4 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.821660252 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0.125 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.768795564 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,2}, {0,2}} tStart=0.125 tEnd=0.365532344 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.260340927 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,2}, {0,2}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0 +findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1 +debugShowSort [3] {{3,2}, {0,2}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.768795564 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,2}, {0,2}} tStart=0.125 tEnd=0.365532344 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.260340927 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0 +markWinding id=1 (0,2 2,4 4,0 3,2) t=0.5 [2] (2.625,2) tEnd=0.768795564 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (3,2 0,2) t=0.125 [1] (2.625,2) tEnd=0.365532344 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 2,4 4,0 3,2) t=0.260340927 [1] (1.50910997,2.5537951) tEnd=0.5 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.5 (2.625,2) tEnd=0.768795564 other=2 otherT=0.125 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=2 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.5 [2] (2.625,2) tEnd=0.768795564 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=2 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.768795564 [3] (3.24959135,1.42666245) tEnd=0.821660252 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[3] start=4 end=5 +bridgeOp current id=1 from=(3.24959135,1.42666245) to=(3.26578999,1.43438745) +path.moveTo(3.24959135,1.42666245); +path.cubicTo(3.26158428,1.4196322, 3.26713157,1.42161608, 3.26578999,1.43438745); +findNextOp simple +markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.859816875 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=3 from=(3.26578999,1.43438745) to=(4,2) +path.cubicTo(3.47857022,1.53752398, 3.71963382,1.71963382, 4,2); +findNextOp simple +markDoneBinary id=4 (4,2 0,4) t=0 [0] (4,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=4 from=(4,2) to=(0,4) +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.341662805 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.260340927 tEnd=0.5 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=0 tiny=0 opp=1 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.341662805 tEnd=0.467845317 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.260340927 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markWinding id=3 (0,4 2,3 2,0 4,2) t=0.341662805 [1] (1.50910997,2.5537951) tEnd=0.467845317 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0 [0] (0,2) tEnd=0.260340927 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=2 (3,2 0,2) t=0.365532344 [2] (1.90340292,2) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0 [0] (0,4) tEnd=0.341662805 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[3] start=1 end=2 +bridgeOp current id=3 from=(0,4) to=(1.50910997,2.5537951) +path.lineTo(0,4); +path.cubicTo(0.683325648,3.65833712, 1.13318419,3.08320737, 1.50910997,2.5537951); +findNextOp debugShowSort contourWinding=0 oppContourWinding=2 sign=1 +debugShowSort [2] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.467845317 tEnd=0.341662805 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,2}, {0,2}} tStart=0.365532344 tEnd=0.125 sign=1 windValue=1 windSum=2 2->1 (max=2) done=0 tiny=0 opp=1 +debugShowSort [0] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.467845317 tEnd=0.856247521 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,2}, {0,2}} tStart=0.365532344 tEnd=1 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markWinding id=3 (0,4 2,3 2,0 4,2) t=0.467845317 [2] (1.90340292,2) tEnd=0.856247521 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.341662805 [1] (1.50910997,2.5537951) tEnd=0.467845317 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1 +findNextOp from:[3] to:[3] start=2 end=3 +bridgeOp current id=3 from=(1.50910997,2.5537951) to=(1.90340292,2) +path.cubicTo(1.64794636,2.35827327, 1.77669871,2.16898704, 1.90340292,2); +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.856247521 tEnd=0.467845317 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.768795564 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.856247521 tEnd=0.859816875 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.768795564 tEnd=0.821660252 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.467845317 [2] (1.90340292,2) tEnd=0.856247521 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[1] start=3 end=4 +bridgeOp current id=3 from=(1.90340292,2) to=(3.24959135,1.42666245) +path.cubicTo(2.29341149,1.47984147, 2.66401696,1.15201211, 3.24959135,1.42666245); +path.close(); +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=2 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (3,2 0,2) t=0.125 [1] (2.625,2) tEnd=0.365532344 newWindSum=2 newOppSum=-1 oppSum=-1 windSum=2 windValue=1 +debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.260340927 [1] (1.50910997,2.5537951) tEnd=0.5 newWindSum=2 newOppSum=-1 oppSum=-1 windSum=2 windValue=1 +</div> + +<div id="cubicOp46d"> + SimplifyNew_Test [cubicOp46d] +{{0,2}, {3,5}, {5,0}, {4,2}}, +{{4,2}, {0,2}}, +op difference +{{0,5}, {2,4}, {2,0}, {5,3}}, +{{5,3}, {0,5}}, +debugShowCubicIntersection no self intersect {{0,2}, {3,5}, {5,0}, {4,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {3,5}, {5,0}, {4,2}} {{0,2}} wtTs[1]=0.6 {{3.887999999999999,2.0000000000000013}} wtTs[2]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,2}} wnTs[1]=0.028 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0.215060475 {{0,2}, {3,5}, {5,0}, {4,2}} {{1.7768977226209808,2.9747215410507057}} wtTs[1]=0.578517386 {{3.8153702411617676,2.0785732044555085}} wnTs[0]=0.404694 {{0,5}, {2,4}, {2,0}, {5,3}} wnTs[1]=0.846938928 +debugShowCubicLineIntersection wtTs[0]=0.64696132 {{0,5}, {2,4}, {2,0}, {5,3}} {{2.7243714728959709,2}} wtTs[1]=0.819132784 {{3.6370281018311013,1.9999999999999996}} wnTs[0]=0.318907 {{4,2}, {0,2}} wnTs[1]=0.0907429745 +debugShowCubicIntersection no self intersect {{0,5}, {2,4}, {2,0}, {5,3}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {2,4}, {2,0}, {5,3}} {{0,5}} wtTs[1]=1 {{5,3}} wnTs[0]=1 {{5,3}, {0,5}} wnTs[1]=0 +debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0 (0,2) tEnd=0.215060475 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.215060475 (1.77689767,2.97472143) tEnd=0.578517386 other=3 otherT=0.404693629 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.578517386 (3.81537032,2.07857323) tEnd=0.6 other=3 otherT=0.846938928 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.6 (3.88800001,2) tEnd=1 other=2 otherT=0.028 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,2) t=0 (4,2) tEnd=0.028 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,2) t=0.028 (3.88800001,2) tEnd=0.0907429745 other=1 otherT=0.6 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,2) t=0.0907429745 (3.63702822,2) tEnd=0.318907132 other=3 otherT=0.819132784 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,2) t=0.318907132 (2.72437143,2) tEnd=1 other=3 otherT=0.64696132 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0 (0,5) tEnd=0.404693629 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.404693629 (1.77689767,2.97472143) tEnd=0.64696132 other=1 otherT=0.215060475 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.64696132 (2.72437143,2) tEnd=0.819132784 other=2 otherT=0.318907132 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.819132784 (3.63702822,2) tEnd=0.846938928 other=2 otherT=0.0907429745 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.846938928 (3.81537032,2.07857323) tEnd=1 other=1 otherT=0.578517386 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,3 0,5) t=0 (5,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=1 tEnd=0.6 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,2}} tStart=0 tEnd=0.028 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findTop swap +markWinding id=1 (0,2 3,5 5,0 4,2) t=0.6 [3] (3.88800001,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 3,5 5,0 4,2) t=0.6 [3] (3.88800001,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markWinding id=2 (4,2 0,2) t=0 [0] (4,2) tEnd=0.028 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.6 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,2}} tStart=0.028 tEnd=0.0907429745 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.6 tEnd=0.578517386 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,2}} tStart=0.028 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=2 (4,2 0,2) t=0.028 [1] (3.88800001,2) tEnd=0.0907429745 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0.578517386 [2] (3.81537032,2.07857323) tEnd=0.6 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0.6 [3] (3.88800001,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[2] start=1 end=0 +bridgeOp current id=1 from=(4,2) to=(3.88800001,2) +path.moveTo(4,2); +path.cubicTo(4.4000001,1.20000005, 4.32000017,1.51999998, 3.88800001,2); +findNextOp simple +markDoneBinary id=2 (4,2 0,2) t=0 [0] (4,2) tEnd=0.028 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(3.88800001,2) to=(4,2) +path.lineTo(4,2); +path.close(); +findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.6 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=0 +debugShowSort [1] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=0.819132784 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.215060475 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.6 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=0 +debugShowSort [1] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=0.819132784 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.215060475 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +markWinding id=3 (0,5 2,4 2,0 5,3) t=0.819132784 [3] (3.63702822,2) tEnd=0.846938928 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 3,5 5,0 4,2) t=0.215060475 [1] (1.77689767,2.97472143) tEnd=0.578517386 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,5 2,4 2,0 5,3) t=0.846938928 [4] (3.81537032,2.07857323) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (5,3 0,5) t=0 [0] (5,3) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,5 2,4 2,0 5,3) t=0 [0] (0,5) tEnd=0.404693629 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0 (0,2) tEnd=0.215060475 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.215060475 (1.77689767,2.97472143) tEnd=0.578517386 other=3 otherT=0.404693629 otherIndex=1 windSum=2 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,2) t=0.0907429745 (3.63702822,2) tEnd=0.318907132 other=3 otherT=0.819132784 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,2) t=0.318907132 (2.72437143,2) tEnd=1 other=3 otherT=0.64696132 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0 (0,5) tEnd=0.404693629 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.404693629 (1.77689767,2.97472143) tEnd=0.64696132 other=1 otherT=0.215060475 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.64696132 (2.72437143,2) tEnd=0.819132784 other=2 otherT=0.318907132 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.819132784 (3.63702822,2) tEnd=0.846938928 other=2 otherT=0.0907429745 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.846938928 (3.81537032,2.07857323) tEnd=1 other=1 otherT=0.578517386 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,3 0,5) t=0 (5,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +findNextOp debugShowSort contourWinding=-1 oppContourWinding=2 sign=-1 +debugShowSort [2] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.819132784 tEnd=0.846938928 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,2}} tStart=0.0907429745 tEnd=0.028 sign=1 windValue=1 windSum=2 2->1 (max=2) done=1 tiny=0 opp=1 +debugShowSort [0] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.819132784 tEnd=0.64696132 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,2}} tStart=0.0907429745 tEnd=0.318907132 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (0,5 2,4 2,0 5,3) t=0.64696132 [2] (2.72437143,2) tEnd=0.819132784 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (4,2 0,2) t=0.0907429745 [2] (3.63702822,2) tEnd=0.318907132 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.819132784 [3] (3.63702822,2) tEnd=0.846938928 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1 +findNextOp from:[3] to:[3] start=3 end=2 +bridgeOp current id=3 from=(3.81537032,2.07857323) to=(3.63702822,2) +path.moveTo(3.81537032,2.07857323); +path.cubicTo(3.75423074,2.04822493, 3.69481921,2.02210546, 3.63702822,2); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [0] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.64696132 tEnd=0.819132784 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,2}} tStart=0.318907132 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.64696132 tEnd=0.404693629 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,2}} tStart=0.318907132 tEnd=0.0907429745 sign=1 windValue=1 windSum=2 2->1 (max=2) done=1 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=2 (4,2 0,2) t=0.318907132 [3] (2.72437143,2) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0 [0] (0,2) tEnd=0.215060475 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (0,5 2,4 2,0 5,3) t=0.404693629 [1] (1.77689767,2.97472143) tEnd=0.64696132 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.64696132 [2] (2.72437143,2) tEnd=0.819132784 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[3] start=2 end=1 +bridgeOp current id=3 from=(3.63702822,2) to=(2.72437143,2) +path.cubicTo(3.2791934,1.86312568, 2.98348093,1.88013792, 2.72437143,2); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=2 sign=-1 +debugShowSort [0] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.404693629 tEnd=0.64696132 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.215060475 tEnd=0 sign=1 windValue=1 windSum=2 2->1 (max=2) done=1 tiny=0 opp=1 +debugShowSort [2] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.404693629 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.215060475 tEnd=0.578517386 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=0 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.404693629 [1] (1.77689767,2.97472143) tEnd=0.64696132 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1 +findNextOp from:[3] to:[3] start=1 end=0 +bridgeOp current id=3 from=(2.72437143,2) to=(1.77689767,2.97472143) +path.cubicTo(2.35977101,2.16866159, 2.06764531,2.54096746, 1.77689767,2.97472143); +findNextOp simple +markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0 [0] (0,5) tEnd=0.404693629 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=3 from=(1.77689767,2.97472143) to=(0,5) +path.cubicTo(1.29122055,3.69928193, 0.809387267,4.5953064, 0,5); +findNextOp simple +markDoneBinary id=4 (5,3 0,5) t=0 [0] (5,3) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=4 from=(0,5) to=(5,3) +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [3] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.6 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1 +debugShowSort [1] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=0.819132784 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.215060475 sign=1 windValue=1 windSum=2 2->1 (max=2) done=0 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.846938928 [4] (3.81537032,2.07857323) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[3] start=4 end=3 +bridgeOp current id=3 from=(5,3) to=(3.81537032,2.07857323) +path.lineTo(5,3); +path.cubicTo(4.54081678,2.54081678, 4.1519165,2.2456274, 3.81537032,2.07857323); +path.close(); +debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.215060475 (1.77689767,2.97472143) tEnd=0.578517386 other=3 otherT=0.404693629 otherIndex=1 windSum=2 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0.215060475 [1] (1.77689767,2.97472143) tEnd=0.578517386 newWindSum=2 newOppSum=-1 oppSum=-1 windSum=2 windValue=1 +assemble +assemble contour start=(4,2) end=(4,2) +</div> + +<div id="cubicOp46da"> + {{0,2}, {3,5}, {5,0}, {4,2}}, + + {{0,2}, {1.1328125,3.06640625}, {2.03125,2.984375}}, + {{2.03125,2.984375}, {2.9296875,2.90234375}, {3.5,2.375}}, + {{3.5,2.375}, {4.0703125,1.84765625}, {4.21875,1.578125}}, + {{4.21875,1.578125}, {4.3671875,1.30859375}, {4,2}}, +</div> + +<div id="cubicOp46db"> +{{x = 3, y = 4}, {x = 4.0000000000000009, y = 6}, {x = 0.99999999999999845, y = 7.894919286223335e-16}, {x = 6, y = 2}} +</div> + +<div id="cubicOp47d"> + SimplifyNew_Test [cubicOp47d] +{{0,1}, {1,6}, {6,2}, {5,4}}, +{{5,4}, {0,1}}, +op difference +{{2,6}, {4,5}, {1,0}, {6,1}}, +{{6,1}, {2,6}}, +debugShowCubicIntersection no self intersect {{2,6}, {4,5}, {1,0}, {6,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{2,6}, {4,5}, {1,0}, {6,1}} {{2,6}} wtTs[1]=0.171428571 {{2.6532478134110784,5.1834402332361513}} wtTs[2]=1 {{6,1}} wnTs[0]=1 {{6,1}, {2,6}} wnTs[1]=0.836688047 wnTs[2]=0 +debugShowCubicIntersection no intersect {{2,6}, {4,5}, {1,0}, {6,1}} {{0,1}, {1,6}, {6,2}, {5,4}} +debugShowCubicLineIntersection wtTs[0]=0.503145036 {{2,6}, {4,5}, {1,0}, {6,1}} {{2.8774036920020918,2.7264422152012551}} wnTs[0]=0.424519 {{5,4}, {0,1}} +debugShowCubicLineIntersection wtTs[0]=0.604274731 {{0,1}, {1,6}, {6,2}, {5,4}} {{3.9881028045490883,3.5148714943136397}} wnTs[0]=0.502974 {{6,1}, {2,6}} +debugShowLineIntersection wtTs[0]=0.486486486 {{6,1}, {2,6}} {{4.0540540540540535,3.4324324324324329}} wnTs[0]=0.189189 {{5,4}, {0,1}} +debugShowCubicIntersection no self intersect {{0,1}, {1,6}, {6,2}, {5,4}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,6}, {6,2}, {5,4}} {{0,1}} wtTs[1]=0.628571429 {{4.1434402332361522,3.486064139941691}} wtTs[2]=1 {{5,4}} wnTs[0]=1 {{5,4}, {0,1}} wnTs[1]=0.171311953 wnTs[2]=0 +debugShowActiveSpans id=3 (2,6 4,5 1,0 6,1) t=0 (2,6) tEnd=0.171428571 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,6 4,5 1,0 6,1) t=0.171428571 (2.65324783,5.18344021) tEnd=0.503145036 other=4 otherT=0.836688047 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,6 4,5 1,0 6,1) t=0.503145036 (2.87740374,2.7264421) tEnd=1 other=2 otherT=0.424519262 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 2,6) t=0 (6,1) tEnd=0.486486486 other=3 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 2,6) t=0.486486486 (4.05405426,3.43243241) tEnd=0.502974299 other=2 otherT=0.189189189 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 2,6) t=0.502974299 (3.98810291,3.5148716) tEnd=0.836688047 other=1 otherT=0.604274731 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 2,6) t=0.836688047 (2.65324783,5.18344021) tEnd=1 other=3 otherT=0.171428571 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0 (0,1) tEnd=0.604274731 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.604274731 (3.98810291,3.5148716) tEnd=0.628571429 other=4 otherT=0.502974299 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.628571429 (4.14344025,3.4860642) tEnd=1 other=2 otherT=0.171311953 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.171311953 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0.171311953 (4.14344025,3.4860642) tEnd=0.189189189 other=1 otherT=0.628571429 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0.189189189 (4.05405426,3.43243241) tEnd=0.424519262 other=4 otherT=0.486486486 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0.424519262 (2.87740374,2.7264421) tEnd=1 other=3 otherT=0.503145036 otherIndex=2 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0 tEnd=0.604274731 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,4}, {0,1}} tStart=1 tEnd=0.424519262 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +markWinding id=1 (0,1 1,6 6,2 5,4) t=0 [0] (0,1) tEnd=0.604274731 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (5,4 0,1) t=0.424519262 [3] (2.87740374,2.7264421) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,1 1,6 6,2 5,4) t=0 [0] (0,1) tEnd=0.604274731 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=1 (0,1 1,6 6,2 5,4) t=0 [0] (0,1) tEnd=0.604274731 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=1 from=(3.98810291,3.5148716) to=(0,1) +path.moveTo(3.98810291,3.5148716); +path.cubicTo(2.66914129,3.75641561, 0.60427475,4.02137375, 0,1); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [1] {{5,4}, {0,1}} tStart=0.424519262 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.503145036 tEnd=0.171428571 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{5,4}, {0,1}} tStart=0.424519262 tEnd=0.189189189 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.503145036 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (2,6 4,5 1,0 6,1) t=0.171428571 [1] (2.65324783,5.18344021) tEnd=0.503145036 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (5,4 0,1) t=0.189189189 [2] (4.05405426,3.43243241) tEnd=0.424519262 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (2,6 4,5 1,0 6,1) t=0.503145036 [2] (2.87740374,2.7264421) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=4 (6,1 2,6) t=0 [0] (6,1) tEnd=0.486486486 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=2 (5,4 0,1) t=0.424519262 [3] (2.87740374,2.7264421) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[3] start=2 end=1 +bridgeOp current id=2 from=(0,1) to=(2.87740374,2.7264421) +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [1] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0.503145036 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{6,1}, {2,6}} tStart=0.836688047 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{6,1}, {2,6}} tStart=0.836688047 tEnd=0.502974299 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (6,1 2,6) t=0.836688047 [3] (2.65324783,5.18344021) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,6 4,5 1,0 6,1) t=0 [0] (2,6) tEnd=0.171428571 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (6,1 2,6) t=0.502974299 [2] (3.98810291,3.5148716) tEnd=0.836688047 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=3 (2,6 4,5 1,0 6,1) t=0.171428571 [1] (2.65324783,5.18344021) tEnd=0.503145036 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[4] start=3 end=4 +bridgeOp current id=3 from=(2.87740374,2.7264421) to=(2.65324783,5.18344021) +path.lineTo(2.87740374,2.7264421); +path.cubicTo(2.7913022,3.55361414, 2.87475324,4.49428225, 2.65324783,5.18344021); +findNextOp simple +markDoneBinary id=4 (6,1 2,6) t=0.836688047 [3] (2.65324783,5.18344021) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +bridgeOp current id=4 from=(2.65324783,5.18344021) to=(2,6) +findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1 +debugShowSort [3] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{6,1}, {2,6}} tStart=0.836688047 tEnd=0.502974299 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0.503145036 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{6,1}, {2,6}} tStart=0.836688047 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markDoneBinary id=3 (2,6 4,5 1,0 6,1) t=0 [0] (2,6) tEnd=0.171428571 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[3] to:[4] start=3 end=2 +bridgeOp current id=3 from=(2,6) to=(2.65324783,5.18344021) +path.lineTo(2,6); +path.cubicTo(2.34285712,5.82857132, 2.53877544,5.53959179, 2.65324783,5.18344021); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [3] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.836688047 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0.628571429 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1 +debugShowSort [1] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.486486486 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=1 (0,1 1,6 6,2 5,4) t=0.604274731 [1] (3.98810291,3.5148716) tEnd=0.628571429 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (6,1 2,6) t=0.486486486 [1] (4.05405426,3.43243241) tEnd=0.502974299 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (6,1 2,6) t=0.502974299 [2] (3.98810291,3.5148716) tEnd=0.836688047 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[4] start=2 end=1 +bridgeOp current id=4 from=(2.65324783,5.18344021) to=(3.98810291,3.5148716) +path.lineTo(3.98810291,3.5148716); +path.close(); +debugShowActiveSpans id=4 (6,1 2,6) t=0.486486486 (4.05405426,3.43243241) tEnd=0.502974299 other=2 otherT=0.189189189 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.628571429 (4.14344025,3.4860642) tEnd=1 other=2 otherT=0.171311953 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.171311953 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0.171311953 (4.14344025,3.4860642) tEnd=0.189189189 other=1 otherT=0.628571429 otherIndex=2 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=2 sign=1 +debugShowSort [1] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.486486486 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1 +debugShowSort [3] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.836688047 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [0] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0.628571429 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=4 (6,1 2,6) t=0.486486486 [1] (4.05405426,3.43243241) tEnd=0.502974299 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1 +findNextOp from:[4] to:[4] start=2 end=3 +bridgeOp current id=4 from=(4.05405426,3.43243241) to=(3.98810291,3.5148716) +debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.628571429 (4.14344025,3.4860642) tEnd=1 other=2 otherT=0.171311953 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.171311953 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,4 0,1) t=0.171311953 (4.14344025,3.4860642) tEnd=0.189189189 other=1 otherT=0.628571429 otherIndex=2 windSum=? windValue=1 oppValue=0 +</div> + +<div id="cubicOp47da"> +computed quadratics given + {{2,6}, {4,5}, {1,0}, {6,1}}, + {{0,1}, {1,6}, {6,2}, {5,4}}, +computed quadratics set 1 + {{2,6}, {2.2404737,5.87759298}, {2.39345162,5.68487367}}, + {{2.39345162,5.68487367}, {2.67348969,5.31541246}, {2.74792918,4.77711896}}, + {{2.74792918,4.77711896}, {2.82236867,4.23882547}, {2.82848144,3.63729341}}, + {{2.82848144,3.63729341}, {2.83027876,3.57616472}, {2.83215462,3.51498289}}, + {{2.83215462,3.51498289}, {2.78850872,2.32758859}, {3.26769775,1.50382966}}, + {{3.26769775,1.50382966}, {3.55499101,1.08453908}, {4.20162956,0.930553195}}, + {{4.20162956,0.930553195}, {4.84826812,0.776567313}, {6,1}}, +computed quadratics set 2 + {{0,1}, {0.337189878,2.53658624}, {1.06305813,3.09524088}}, + {{1.06305813,3.09524088}, {1.78892639,3.65389552}, {2.62772567,3.64823958}}, + {{2.62772567,3.64823958}, {3.46652495,3.64258364}, {4.1425079,3.48623815}}, + {{4.1425079,3.48623815}, {4.88772835,3.3075243}, {5.09137748,3.46764237}}, + {{5.09137748,3.46764237}, {5.20611277,3.58418013}, {5,4}}, +</div> + +<div id="cubicOp47db"> + {{2.74792918,4.77711896}, {2.82236867,4.23882547}, {2.82848144,3.63729341}}, + {{2.62772567,3.64823958}, {3.46652495,3.64258364}, {4.1425079,3.48623815}}, +</div> + +<div id="cubicOp48d"> + SimplifyNew_Test [cubicOp48d] +{{0,2}, {2,3}, {5,1}, {3,2}}, +{{3,2}, {0,2}}, +op difference +{{1,5}, {2,3}, {2,0}, {3,2}}, +{{3,2}, {1,5}}, +debugShowCubicIntersection no self intersect {{1,5}, {2,3}, {2,0}, {3,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{1,5}, {2,3}, {2,0}, {3,2}} {{1,5}} wtTs[1]=1 {{3,2}} wnTs[0]=1 {{3,2}, {1,5}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=0.447821962 {{1,5}, {2,3}, {2,0}, {3,2}} {{1.921448828321461,2.2502841146969206}} wtTs[1]=1 {{3,2}} wnTs[0]=0.302178 {{0,2}, {2,3}, {5,1}, {3,2}} wnTs[1]=1 +debugShowCubicLineIntersection wtTs[0]=0.5 {{1,5}, {2,3}, {2,0}, {3,2}} {{2,2}} wtTs[1]=1 {{3,2}} wnTs[0]=0.333333 {{3,2}, {0,2}} wnTs[1]=0 +debugShowCubicLineIntersection wtTs[0]=0.5 {{0,2}, {2,3}, {5,1}, {3,2}} {{3,2}} wtTs[1]=1 {{3,2}} wnTs[0]=0 {{3,2}, {1,5}} wnTs[1]=0 +debugShowLineIntersection wtTs[0]=0 {{3,2}, {1,5}} {{3,2}} wnTs[0]=0 {{3,2}, {0,2}} +debugShowCubicIntersection wtTs[0]=0.5 {{0,2}, {2,3}, {5,1}, {3,2}} {{3,2}} wtTs[1]=1 +debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {2,3}, {5,1}, {3,2}} {{0,2}} wtTs[1]=0.5 {{3,2}} wtTs[2]=1 {{3,2}} wnTs[0]=1 {{3,2}, {0,2}} wnTs[1]=0 wnTs[2]=0 +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.447821962 (1.92144883,2.25028419) tEnd=0.5 other=1 otherT=0.302178051 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.5 (2,2) tEnd=1 other=2 otherT=0.333333333 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0 (0,2) tEnd=0.302178051 other=2 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.302178051 (1.92144883,2.25028419) tEnd=0.5 other=3 otherT=0.447821962 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.333333333 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.333333333 (2,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=3 (1,5 2,3 2,0 3,2) t=0.5 [2] (2,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (1,5 2,3 2,0 3,2) t=0.5 [2] (2,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (1,5 2,3 2,0 3,2) t=0.5 [2] (2,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1 +debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (3,2 0,2) t=0 [1] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (3,2 0,2) t=0 [2] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (3,2 0,2) t=0 [3] (3,2) tEnd=0.333333333 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=4 (3,2 1,5) t=0 [0] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (3,2 1,5) t=0 [1] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (3,2 1,5) t=0 [2] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (3,2 1,5) t=0 [3] (3,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=3 (1,5 2,3 2,0 3,2) t=0 [0] (1,5) tEnd=0.447821962 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 2,3 5,1 3,2) t=0.5 [3] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 2,3 5,1 3,2) t=0.5 [2] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 2,3 5,1 3,2) t=0.5 [4] (3,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.447821962 (1.92144883,2.25028419) tEnd=0.5 other=1 otherT=0.302178051 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0 (0,2) tEnd=0.302178051 other=2 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.302178051 (1.92144883,2.25028419) tEnd=0.5 other=3 otherT=0.447821962 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.333333333 other=3 otherT=1 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.333333333 (2,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=2 (3,2 0,2) t=0 [1] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=2 (3,2 0,2) t=0 [2] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=2 (3,2 0,2) t=0 [3] (3,2) tEnd=0.333333333 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{3,2}, {0,2}} tStart=0.333333333 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=0.447821962 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,2}, {0,2}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{3,2}, {0,2}} tStart=0.333333333 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=0.447821962 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,2}, {0,2}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +markWinding id=2 (3,2 0,2) t=0.333333333 [4] (2,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 2,3 5,1 3,2) t=0 [0] (0,2) tEnd=0.302178051 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (1,5 2,3 2,0 3,2) t=0.447821962 [1] (1.92144883,2.25028419) tEnd=0.5 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.447821962 (1.92144883,2.25028419) tEnd=0.5 other=1 otherT=0.302178051 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0 (0,2) tEnd=0.302178051 other=2 otherT=1 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.302178051 (1.92144883,2.25028419) tEnd=0.5 other=3 otherT=0.447821962 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (3,2 0,2) t=0.333333333 (2,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=2 (3,2 0,2) t=0.333333333 [4] (2,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(2,2) to=(0,2) +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [2] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0.5 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.302178051 [1] (1.92144883,2.25028419) tEnd=0.5 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0 [0] (0,2) tEnd=0.302178051 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[3] start=1 end=2 +bridgeOp current id=1 from=(0,2) to=(1.92144883,2.25028419) +path.moveTo(2,2); +path.lineTo(0,2); +path.cubicTo(0.60435605,2.30217814, 1.30002379,2.33042121, 1.92144883,2.25028419); +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=0.447821962 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,2}, {0,2}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [0] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{3,2}, {0,2}} tStart=0.333333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=3 (1,5 2,3 2,0 3,2) t=0.447821962 [1] (1.92144883,2.25028419) tEnd=0.5 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[2] start=4 end=5 +bridgeOp current id=3 from=(1.92144883,2.25028419) to=(2,2) +path.cubicTo(1.94782197,2.1619792, 1.97391093,2.0782671, 2,2); +path.close(); +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [1] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [3] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [4] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.5 tEnd=0.302178051 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [5] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.5 [2] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.5 [3] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.5 [4] (3,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[1] start=3 end=5 +bridgeOp current id=1 from=(3,2) to=(3,2) +path.moveTo(3,2); +path.cubicTo(3.75,1.75, 4,1.5, 3,2); +path.close(); +debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +findNextOp simple +markDoneBinary id=4 (3,2 1,5) t=0 [0] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +markDoneBinary id=4 (3,2 1,5) t=0 [1] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +markDoneBinary id=4 (3,2 1,5) t=0 [2] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +markDoneBinary id=4 (3,2 1,5) t=0 [3] (3,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=4 from=(3,2) to=(1,5) +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [3] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0.5 sign=-1 windValue=1 windSum=1 1->2 (max=2) done=1 tiny=0 opp=1 +debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0.5 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0 +markDoneBinary id=3 (1,5 2,3 2,0 3,2) t=0 [0] (1,5) tEnd=0.447821962 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[3] start=1 end=2 +bridgeOp current id=3 from=(1,5) to=(1.92144883,2.25028419) +path.moveTo(3,2); +path.lineTo(1,5); +path.cubicTo(1.44782197,4.10435629, 1.69509947,3.00816751, 1.92144883,2.25028419); +</div> + +<div id="cubicOp48da"> + {{0,2}, {2,3}, {5,1}, {3,2}}, + + {{0,2}, {0.796711951,2.36012932}, {1.63878124,2.27837338}}, + {{1.63878124,2.27837338}, {2.48085053,2.19661745}, {3.06246392,1.97878949}}, + {{3.06246392,1.97878949}, {3.64407731,1.76096154}, {3.65942155,1.71287481}}, + {{3.65942155,1.71287481}, {3.66835761,1.67480112}, {3,2}}, +</div> + +<div id="cubicOp32d"> + SimplifyNew_Test [cubicOp32d] +{{0,1}, {1,2}, {6,0}, {3,1}}, +{{3,1}, {0,1}}, +op difference +{{0,6}, {1,3}, {1,0}, {2,1}}, +{{2,1}, {0,6}}, +insert t=0.5 pts roughly equal +insert t=0.5 pts roughly equal +insert t=0.5 pts roughly equal +debugShowCubicIntersection wtTs[0]=1 {{0,1}, {1,2}, {6,0}, {3,1}} {{3,1}} wtTs[1]=0.5 +insert t=0.5 pts roughly equal +debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,2}, {6,0}, {3,1}} {{0,1}} wtTs[1]=0.5 {{3,1}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {0,1}} wnTs[1]=0 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0.235702334 {{0,1}, {1,2}, {6,0}, {3,1}} {{1.2166390977965289,1.2856741834504377}} wnTs[0]=0.640711 {{0,6}, {1,3}, {1,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0.336702456 {{0,1}, {1,2}, {6,0}, {3,1}} {{1.9124722896380537,1.2188192759048657}} wnTs[0]=0.0437639 {{2,1}, {0,6}} +debugShowCubicLineIntersection wtTs[0]=0.724744871 {{0,6}, {1,3}, {1,0}, {2,1}} {{1.359821149611685,1.0000000000000004}} wtTs[1]=1 {{2,1}} wnTs[0]=0.546726 {{3,1}, {0,1}} wnTs[1]=0.333333333 +debugShowLineIntersection wtTs[0]=0 {{3,1}, {0,1}} {{2,1}} wnTs[0]=0.333333 {{2,1}, {0,6}} +debugShowCubicIntersection no self intersect {{0,6}, {1,3}, {1,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,6}, {1,3}, {1,0}, {2,1}} {{0,6}} wtTs[1]=1 {{2,1}} wnTs[0]=1 {{2,1}, {0,6}} wnTs[1]=0 +debugShowActiveSpans id=1 (0,1 1,2 6,0 3,1) t=0 (0,1) tEnd=0.235702334 other=2 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,2 6,0 3,1) t=0.235702334 (1.21663904,1.28567421) tEnd=0.336702456 other=3 otherT=0.640711351 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,1 1,2 6,0 3,1) t=0.336702456 (1.91247225,1.21881926) tEnd=0.5 other=4 otherT=0.0437638552 otherIndex=2 windSum=? windValue=1 oppValue=0 +</div> + +<div id="cubicOp48db"> +computed quadratics given + {{0,2}, {2,3}, {5,1}, {3,2}}, + {{1,5}, {2,3}, {2,0}, {3,2}}, +computed quadratics set 1 + {{0,2}, {0.796711951,2.36012932}, {1.63878124,2.27837338}}, + {{1.63878124,2.27837338}, {2.48085053,2.19661745}, {3.06246392,1.97878949}}, + {{3.06246392,1.97878949}, {3.64407731,1.76096154}, {3.65942155,1.71287481}}, + {{3.65942155,1.71287481}, {3.66835761,1.67480112}, {3,2}}, +computed quadratics set 2 + {{1,5}, {1.50173477,3.89061296}, {1.76597918,2.79793753}}, + {{1.76597918,2.79793753}, {2.0153684,1.78464605}, {2.27205088,1.42969352}}, + {{2.27205088,1.42969352}, {2.52873337,1.07474099}, {3,2}}, +</div> + +<div id="cubicOp48dc"> + {{1.63878124,2.27837338}, {2.48085053,2.19661745}, {3.06246392,1.97878949}}, + {{2.27205088,1.42969352}, {2.52873337,1.07474099}, {3,2}}, +</div> + +<div id="cubicOp49d"> + SimplifyNew_Test [cubicOp49d] +{{0,2}, {1,5}, {3,2}, {4,1}}, +{{4,1}, {0,2}}, +op difference +{{2,3}, {1,4}, {2,0}, {5,1}}, +{{5,1}, {2,3}}, +debugShowCubicIntersection no self intersect {{2,3}, {1,4}, {2,0}, {5,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {1,4}, {2,0}, {5,1}} {{2,3}} wtTs[1]=1 {{5,1}} wnTs[0]=1 {{5,1}, {2,3}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=1.74609417e-09 {{2,3}, {1,4}, {2,0}, {5,1}} {{1.9999999947617175,3.0000000052382827}} wtTs[1]=0.122781788 {{1.7221068406383582,3.1607246577308117}} wnTs[0]=0.5 {{0,2}, {1,5}, {3,2}, {4,1}} wnTs[1]=0.438140761 +debugShowCubicLineIntersection wtTs[0]=0.651913155 {{2,3}, {1,4}, {2,0}, {5,1}} {{2.5942051033446676,1.3514487241638331}} wnTs[0]=0.351449 {{4,1}, {0,2}} +debugShowCubicLineIntersection wtTs[0]=0.5 {{0,2}, {1,5}, {3,2}, {4,1}} {{2,3}} wnTs[0]=1 {{5,1}, {2,3}} +debugShowLineIntersection no intersect {{5,1}, {2,3}} {{4,1}, {0,2}} +debugShowCubicIntersection no self intersect {{0,2}, {1,5}, {3,2}, {4,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {1,5}, {3,2}, {4,1}} {{0,2}} wtTs[1]=1 {{4,1}} wnTs[0]=1 {{4,1}, {0,2}} wnTs[1]=0 +debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 (2,3) tEnd=0.122781788 other=1 otherT=0.499999999 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.122781788 (1.72210681,3.16072464) tEnd=0.651913155 other=1 otherT=0.438140761 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.651913155 (2.59420514,1.35144877) tEnd=1 other=2 otherT=0.351448724 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=1 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0 (0,2) tEnd=0.438140761 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.438140761 (1.72210681,3.16072464) tEnd=0.499999999 other=3 otherT=0.122781788 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,1 0,2) t=0 (4,1) tEnd=0.351448724 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,1 0,2) t=0.351448724 (2.59420514,1.35144877) tEnd=1 other=3 otherT=0.651913155 otherIndex=3 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=0.651913155 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=1.74609417e-09 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0.499999999 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findTop swap +markWinding id=3 (2,3 1,4 2,0 5,1) t=0.122781788 [2] (1.72210681,3.16072464) tEnd=0.651913155 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 1,4 2,0 5,1) t=0.122781788 [2] (1.72210681,3.16072464) tEnd=0.651913155 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (2,3 1,4 2,0 5,1) t=0.122781788 [2] (1.72210681,3.16072464) tEnd=0.651913155 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1 +debugShowSort [0] {{4,1}, {0,2}} tStart=0.351448724 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +debugShowSort [2] {{4,1}, {0,2}} tStart=0.351448724 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=0.122781788 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=0.122781788 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [0] {{4,1}, {0,2}} tStart=0.351448724 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{4,1}, {0,2}} tStart=0.351448724 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +markWinding id=2 (4,1 0,2) t=0 [0] (4,1) tEnd=0.351448724 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 1,5 3,2 4,1) t=0.5 [3] (2,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 1,4 2,0 5,1) t=0.651913155 [3] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (4,1 0,2) t=0.351448724 [1] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,2 1,5 3,2 4,1) t=0 [0] (0,2) tEnd=0.438140761 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 (2,3) tEnd=0.122781788 other=1 otherT=0.499999999 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.651913155 (2.59420514,1.35144877) tEnd=1 other=2 otherT=0.351448724 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=1 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0 (0,2) tEnd=0.438140761 other=2 otherT=1 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.438140761 (1.72210681,3.16072464) tEnd=0.499999999 other=3 otherT=0.122781788 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,1 0,2) t=0 (4,1) tEnd=0.351448724 other=1 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,1 0,2) t=0.351448724 (2.59420514,1.35144877) tEnd=1 other=3 otherT=0.651913155 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (4,1 0,2) t=0 [0] (4,1) tEnd=0.351448724 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +markDoneBinary id=1 (0,2 1,5 3,2 4,1) t=0.5 [3] (2,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464) +debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 (2,3) tEnd=0.122781788 other=1 otherT=0.499999999 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.651913155 (2.59420514,1.35144877) tEnd=1 other=2 otherT=0.351448724 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=1 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0 (0,2) tEnd=0.438140761 other=2 otherT=1 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.438140761 (1.72210681,3.16072464) tEnd=0.499999999 other=3 otherT=0.122781788 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,1 0,2) t=0.351448724 (2.59420514,1.35144877) tEnd=1 other=3 otherT=0.651913155 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +findNextOp simple +markDoneBinary id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +bridgeOp current id=4 from=(2,3) to=(5,1) +findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1 +debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] {{4,1}, {0,2}} tStart=0.351448724 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=0.122781788 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [0] {{4,1}, {0,2}} tStart=0.351448724 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (2,3 1,4 2,0 5,1) t=0.651913155 [3] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +findNextOp from:[3] to:[2] start=1 end=2 +bridgeOp current id=3 from=(5,1) to=(2.59420514,1.35144877) +path.moveTo(2,3); +path.lineTo(5,1); +path.cubicTo(3.9557395,0.651913166, 3.15380788,0.909648538, 2.59420514,1.35144877); +findNextOp simple +markDoneBinary id=2 (4,1 0,2) t=0.351448724 [1] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +bridgeOp current id=2 from=(2.59420514,1.35144877) to=(0,2) +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [2] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=1.74609417e-09 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [0] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0.499999999 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=0.651913155 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 [1] (2,3) tEnd=0.122781788 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,2 1,5 3,2 4,1) t=0.438140761 [1] (1.72210681,3.16072464) tEnd=0.499999999 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=1 (0,2 1,5 3,2 4,1) t=0 [0] (0,2) tEnd=0.438140761 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findNextOp from:[1] to:[3] start=2 end=1 +bridgeOp current id=1 from=(0,2) to=(1.72210681,3.16072464) +path.lineTo(0,2); +path.cubicTo(0.43814075,3.31442237, 1.06824887,3.47704053, 1.72210681,3.16072464); +setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464) +setSpans all tiny unsortable [2] (2,3) [1] (1.72210681,3.16072464) +markUnsortable id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 [1] (2,3) tEnd=0.122781788 newWindSum=0 windSum=-1 windValue=1 +markUnsortable id=3 (2,3 1,4 2,0 5,1) t=0 [0] (2,3) tEnd=1.74609417e-09 newWindSum=0 windSum=? windValue=1 +markUnsortable id=1 (0,2 1,5 3,2 4,1) t=0.499999999 [2] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=1 (0,2 1,5 3,2 4,1) t=0.438140761 [1] (1.72210681,3.16072464) tEnd=0.499999999 newWindSum=0 windSum=-1 windValue=1 +findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1 +debugShowSort [0] *** UNSORTABLE *** {{2,3}, {1,4}, {2,0}, {5,1}} tStart=1.74609417e-09 tEnd=0.122781788 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] *** UNSORTABLE *** {{2,3}, {1,4}, {2,0}, {5,1}} tStart=1.74609417e-09 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=1 tiny=1 opp=0 +debugShowSort [2] *** UNSORTABLE *** {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.499999999 tEnd=0.5 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=1 tiny=1 opp=1 +debugShowSort [3] *** UNSORTABLE *** {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.499999999 tEnd=0.438140761 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1 +path.cubicTo(1.78458714,3.17018676, 1.87721825,3.12278175, 2,3); +markDoneBinary id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 [1] (2,3) tEnd=0.122781788 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 +path.close(); +setSpans all tiny unsortable [2] (2,3) [1] (1.72210681,3.16072464) +setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464) +setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464) +setSpans all tiny unsortable [2] (2,3) [1] (1.72210681,3.16072464) +setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464) +assemble +assemble contour start=(2,3) end=(2,3) +</div> + +<div id="cubicOp50d"> + SimplifyNew_Test [cubicOp50d] +{{0,3}, {1,6}, {5,0}, {5,1}}, +{{5,1}, {0,3}}, +op difference +{{0,5}, {1,5}, {3,0}, {6,1}}, +{{6,1}, {0,5}}, +debugShowCubicIntersection no self intersect {{0,5}, {1,5}, {3,0}, {6,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {1,5}, {3,0}, {6,1}} {{0,5}} wtTs[1]=0.181818182 {{0.64462809917355357,4.5702479338842981}} wtTs[2]=1 {{6,1}} wnTs[0]=1 {{6,1}, {0,5}} wnTs[1]=0.892561983 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0.326064989 {{0,5}, {1,5}, {3,0}, {6,1}} {{1.2971500960309803,3.7865580517965118}} wnTs[0]=0.265062 {{0,3}, {1,6}, {5,0}, {5,1}} +debugShowCubicLineIntersection wtTs[0]=0.639696212 {{0,5}, {1,5}, {3,0}, {6,1}} {{3.1467223651509295,1.7413110539396279}} wnTs[0]=0.370656 {{5,1}, {0,3}} +debugShowCubicLineIntersection no intersect {{0,3}, {1,6}, {5,0}, {5,1}} {{6,1}, {0,5}} +debugShowLineIntersection no intersect {{6,1}, {0,5}} {{5,1}, {0,3}} +debugShowCubicIntersection no self intersect {{0,3}, {1,6}, {5,0}, {5,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,3}, {1,6}, {5,0}, {5,1}} {{0,3}} wtTs[1]=0.772727273 {{4.4623403456048081,1.2150638617580767}} wtTs[2]=1 {{5,1}} wnTs[0]=1 {{5,1}, {0,3}} wnTs[1]=0.107531931 wnTs[2]=0 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0 (0,5) tEnd=0.181818182 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.181818182 (0.644628108,4.57024813) tEnd=0.326064989 other=4 otherT=0.892561983 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.326064989 (1.29715014,3.78655815) tEnd=0.639696212 other=1 otherT=0.26506234 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.639696212 (3.14672232,1.74131107) tEnd=1 other=2 otherT=0.370655527 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 0,5) t=0 (6,1) tEnd=0.892561983 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 0,5) t=0.892561983 (0.644628108,4.57024813) tEnd=1 other=3 otherT=0.181818182 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0 (0,3) tEnd=0.26506234 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0.26506234 (1.29715014,3.78655815) tEnd=0.772727273 other=3 otherT=0.326064989 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0.772727273 (4.46234035,1.21506381) tEnd=1 other=2 otherT=0.107531931 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,1 0,3) t=0 (5,1) tEnd=0.107531931 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,1 0,3) t=0.107531931 (4.46234035,1.21506381) tEnd=0.370655527 other=1 otherT=0.772727273 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,1 0,3) t=0.370655527 (3.14672232,1.74131107) tEnd=1 other=3 otherT=0.639696212 otherIndex=3 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=1 tEnd=0.772727273 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,1}, {0,3}} tStart=0 tEnd=0.107531931 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +markWinding id=1 (0,3 1,6 5,0 5,1) t=0.772727273 [2] (4.46234035,1.21506381) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (5,1 0,3) t=0 [0] (5,1) tEnd=0.107531931 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,3 1,6 5,0 5,1) t=0.772727273 [2] (4.46234035,1.21506381) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=1 (0,3 1,6 5,0 5,1) t=0.772727273 [2] (4.46234035,1.21506381) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +bridgeOp current id=1 from=(4.46234035,1.21506381) to=(5,1) +path.moveTo(4.46234035,1.21506381); +path.cubicTo(4.79338837,0.90702486, 5,0.772727251, 5,1); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0.370655527 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=0.26506234 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[0] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markWinding id=2 (5,1 0,3) t=0.107531931 [1] (4.46234035,1.21506381) tEnd=0.370655527 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markWinding id=1 (0,3 1,6 5,0 5,1) t=0.26506234 [1] (1.29715014,3.78655815) tEnd=0.772727273 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +markDoneBinary id=2 (5,1 0,3) t=0 [0] (5,1) tEnd=0.107531931 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findNextOp from:[2] to:[1] start=2 end=1 +bridgeOp current id=2 from=(5,1) to=(4.46234035,1.21506381) +path.lineTo(4.46234035,1.21506381); +path.close(); +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0 (0,5) tEnd=0.181818182 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.181818182 (0.644628108,4.57024813) tEnd=0.326064989 other=4 otherT=0.892561983 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.326064989 (1.29715014,3.78655815) tEnd=0.639696212 other=1 otherT=0.26506234 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.639696212 (3.14672232,1.74131107) tEnd=1 other=2 otherT=0.370655527 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 0,5) t=0 (6,1) tEnd=0.892561983 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 0,5) t=0.892561983 (0.644628108,4.57024813) tEnd=1 other=3 otherT=0.181818182 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0 (0,3) tEnd=0.26506234 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0.26506234 (1.29715014,3.78655815) tEnd=0.772727273 other=3 otherT=0.326064989 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,1 0,3) t=0.107531931 (4.46234035,1.21506381) tEnd=0.370655527 other=1 otherT=0.772727273 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,1 0,3) t=0.370655527 (3.14672232,1.74131107) tEnd=1 other=3 otherT=0.639696212 otherIndex=3 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [3] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=0.26506234 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0.370655527 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=1 (0,3 1,6 5,0 5,1) t=0.26506234 [1] (1.29715014,3.78655815) tEnd=0.772727273 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[2] start=1 end=2 +bridgeOp current id=1 from=(1.29715014,3.78655815) to=(4.46234035,1.21506381) +path.moveTo(1.29715014,3.78655815); +path.cubicTo(2.36251926,3.45810199, 3.72286963,1.90313876, 4.46234035,1.21506381); +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [0] {{5,1}, {0,3}} tStart=0.370655527 tEnd=0.107531931 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.639696212 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{5,1}, {0,3}} tStart=0.370655527 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.639696212 tEnd=0.326064989 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0.639696212 [3] (3.14672232,1.74131107) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=4 (6,1 0,5) t=0 [0] (6,1) tEnd=0.892561983 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (5,1 0,3) t=0.370655527 [2] (3.14672232,1.74131107) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +markDoneBinary id=1 (0,3 1,6 5,0 5,1) t=0 [0] (0,3) tEnd=0.26506234 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markWinding id=3 (0,5 1,5 3,0 6,1) t=0.326064989 [2] (1.29715014,3.78655815) tEnd=0.639696212 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +markDoneBinary id=2 (5,1 0,3) t=0.107531931 [1] (4.46234035,1.21506381) tEnd=0.370655527 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[3] start=3 end=2 +bridgeOp current id=2 from=(4.46234035,1.21506381) to=(3.14672232,1.74131107) +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1 +debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.326064989 tEnd=0.639696212 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.26506234 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.326064989 tEnd=0.181818182 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.26506234 tEnd=0.772727273 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0.181818182 [1] (0.644628108,4.57024813) tEnd=0.326064989 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0.326064989 [2] (1.29715014,3.78655815) tEnd=0.639696212 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[3] to:[1] start=1 end=2 +bridgeOp current id=3 from=(3.14672232,1.74131107) to=(1.29715014,3.78655815) +path.lineTo(3.14672232,1.74131107); +path.cubicTo(2.43183374,2.33584237, 1.81530964,3.13070869, 1.29715014,3.78655815); +path.close(); +findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [0] {{6,1}, {0,5}} tStart=0.892561983 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0.326064989 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{6,1}, {0,5}} tStart=0.892561983 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0 +findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [0] {{6,1}, {0,5}} tStart=0.892561983 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0.326064989 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{6,1}, {0,5}} tStart=0.892561983 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0 +markWinding id=4 (6,1 0,5) t=0.892561983 [1] (0.644628108,4.57024813) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,5 1,5 3,0 6,1) t=0 [0] (0,5) tEnd=0.181818182 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (0,5 1,5 3,0 6,1) t=0 [0] (0,5) tEnd=0.181818182 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 +debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0 (0,5) tEnd=0.181818182 other=4 otherT=1 otherIndex=2 windSum=2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (6,1 0,5) t=0.892561983 (0.644628108,4.57024813) tEnd=1 other=3 otherT=0.181818182 otherIndex=1 windSum=2 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (6,1 0,5) t=0.892561983 [1] (0.644628108,4.57024813) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 +markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0 [0] (0,5) tEnd=0.181818182 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 +assemble +assemble contour start=(4.46234035,1.21506381) end=(4.46234035,1.21506381) +path.moveTo(4.46234035,1.21506381); +path.cubicTo(4.79338837,0.90702486, 5,0.772727251, 5,1); +path.lineTo(4.46234035,1.21506381); +path.close(); +assemble contour start=(1.29715014,3.78655815) end=(1.29715014,3.78655815) +</div> + +<div id="cubicOp51d"> + SimplifyNew_Test [cubicOp51d] +{{0,3}, {1,2}, {4,1}, {6,0}}, +{{6,0}, {0,3}}, +op difference +{{1,4}, {0,6}, {3,0}, {2,1}}, +{{2,1}, {1,4}}, +debugShowCubicIntersection no self intersect {{0,3}, {1,2}, {4,1}, {6,0}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,3}, {1,2}, {4,1}, {6,0}} {{0,3}} wtTs[1]=1 {{6,0}} wnTs[0]=1 {{6,0}, {0,3}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=0.397354824 {{0,3}, {1,2}, {4,1}, {6,0}} {{1.9511935265302276,1.8079355291007386}} wnTs[0]=0.661665 {{1,4}, {0,6}, {3,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0.355273081 {{0,3}, {1,2}, {4,1}, {6,0}} {{1.6886064138367243,1.9341807584898274}} wnTs[0]=0.311394 {{2,1}, {1,4}} +debugShowCubicLineIntersection wtTs[0]=0.6185225 {{1,4}, {0,6}, {3,0}, {2,1}} {{1.8422478636338226,2.0788760681830887}} wnTs[0]=0.692959 {{6,0}, {0,3}} +debugShowLineIntersection wtTs[0]=0.733333333 {{6,0}, {0,3}} {{1.6000000000000003,2.1999999999999997}} wnTs[0]=0.4 {{2,1}, {1,4}} +debugShowCubicIntersection no self intersect {{1,4}, {0,6}, {3,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{1,4}, {0,6}, {3,0}, {2,1}} {{1,4}} wtTs[1]=0.333333333 {{1.0370370370370368,3.8888888888888897}} wtTs[2]=1 {{2,1}} wnTs[0]=1 {{2,1}, {1,4}} wnTs[1]=0.962962963 wnTs[2]=0 +debugShowActiveSpans id=1 (0,3 1,2 4,1 6,0) t=0 (0,3) tEnd=0.355273081 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 4,1 6,0) t=0.355273081 (1.68860638,1.93418074) tEnd=0.397354824 other=4 otherT=0.311393586 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 4,1 6,0) t=0.397354824 (1.95119357,1.80793548) tEnd=1 other=3 otherT=0.66166507 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,0 0,3) t=0 (6,0) tEnd=0.692958689 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,0 0,3) t=0.692958689 (1.84224784,2.07887602) tEnd=0.733333333 other=3 otherT=0.6185225 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,0 0,3) t=0.733333333 (1.60000002,2.20000005) tEnd=1 other=4 otherT=0.4 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0 (1,4) tEnd=0.333333333 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0.333333333 (1.03703701,3.88888884) tEnd=0.6185225 other=4 otherT=0.962962963 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0.6185225 (1.84224784,2.07887602) tEnd=0.66166507 other=2 otherT=0.692958689 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0.66166507 (1.95119357,1.80793548) tEnd=1 other=1 otherT=0.397354824 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 1,4) t=0 (2,1) tEnd=0.311393586 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 1,4) t=0.311393586 (1.68860638,1.93418074) tEnd=0.4 other=1 otherT=0.355273081 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 1,4) t=0.4 (1.60000002,2.20000005) tEnd=0.962962963 other=2 otherT=0.733333333 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 1,4) t=0.962962963 (1.03703701,3.88888884) tEnd=1 other=3 otherT=0.333333333 otherIndex=1 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=1 tEnd=0.397354824 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{6,0}, {0,3}} tStart=0 tEnd=0.692958689 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findTop swap +markWinding id=1 (0,3 1,2 4,1 6,0) t=0.397354824 [2] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,3 1,2 4,1 6,0) t=0.397354824 [2] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markWinding id=2 (6,0 0,3) t=0 [0] (6,0) tEnd=0.692958689 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.397354824 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.66166507 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.397354824 tEnd=0.355273081 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.66166507 tEnd=0.6185225 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (1,4 0,6 3,0 2,1) t=0.66166507 [3] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (2,1 1,4) t=0 [0] (2,1) tEnd=0.311393586 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,3 1,2 4,1 6,0) t=0.355273081 [1] (1.68860638,1.93418074) tEnd=0.397354824 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0.6185225 [2] (1.84224784,2.07887602) tEnd=0.66166507 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +markDoneBinary id=1 (0,3 1,2 4,1 6,0) t=0.397354824 [2] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[3] start=3 end=4 +bridgeOp current id=1 from=(6,0) to=(1.95119357,1.80793548) +path.moveTo(6,0); +path.cubicTo(4.79470968,0.602645159, 3.22623801,1.20529044, 1.95119357,1.80793548); +findNextOp simple +markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0.66166507 [3] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +bridgeOp current id=3 from=(1.95119357,1.80793548) to=(2,1) +path.cubicTo(2.21878767,1.12462389, 2.33833504,0.661665022, 2,1); +findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1 +debugShowSort [1] {{2,1}, {1,4}} tStart=0.311393586 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.355273081 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{2,1}, {1,4}} tStart=0.311393586 tEnd=0.4 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.355273081 tEnd=0.397354824 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markWinding id=1 (0,3 1,2 4,1 6,0) t=0 [0] (0,3) tEnd=0.355273081 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (6,0 0,3) t=0.733333333 [2] (1.60000002,2.20000005) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=4 (2,1 1,4) t=0.311393586 [1] (1.68860638,1.93418074) tEnd=0.4 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (2,1 1,4) t=0 [0] (2,1) tEnd=0.311393586 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[4] to:[1] start=1 end=0 +bridgeOp current id=4 from=(2,1) to=(1.68860638,1.93418074) +findNextOp simple +markDoneBinary id=1 (0,3 1,2 4,1 6,0) t=0 [0] (0,3) tEnd=0.355273081 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=1 from=(1.68860638,1.93418074) to=(0,3) +path.lineTo(1.68860638,1.93418074); +path.cubicTo(0.962984085,2.28945374, 0.355273068,2.64472699, 0,3); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [2] {{6,0}, {0,3}} tStart=0.733333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,1}, {1,4}} tStart=0.4 tEnd=0.962962963 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [0] {{6,0}, {0,3}} tStart=0.733333333 tEnd=0.692958689 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {1,4}} tStart=0.4 tEnd=0.311393586 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=4 (2,1 1,4) t=0.4 [2] (1.60000002,2.20000005) tEnd=0.962962963 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (6,0 0,3) t=0.692958689 [1] (1.84224784,2.07887602) tEnd=0.733333333 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=2 (6,0 0,3) t=0.733333333 [2] (1.60000002,2.20000005) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[4] start=2 end=3 +bridgeOp current id=2 from=(0,3) to=(1.60000002,2.20000005) +findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1 +debugShowSort [1] {{2,1}, {1,4}} tStart=0.962962963 tEnd=0.4 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,1}, {1,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0.6185225 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (1,4 0,6 3,0 2,1) t=0 [0] (1,4) tEnd=0.333333333 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (2,1 1,4) t=0.962962963 [3] (1.03703701,3.88888884) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (1,4 0,6 3,0 2,1) t=0.333333333 [1] (1.03703701,3.88888884) tEnd=0.6185225 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +markDoneBinary id=4 (2,1 1,4) t=0.4 [2] (1.60000002,2.20000005) tEnd=0.962962963 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[4] to:[3] start=1 end=0 +bridgeOp current id=4 from=(1.60000002,2.20000005) to=(1.03703701,3.88888884) +path.lineTo(1.60000002,2.20000005); +findNextOp simple +markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0 [0] (1,4) tEnd=0.333333333 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=3 from=(1.03703701,3.88888884) to=(1,4) +path.lineTo(1.03703701,3.88888884); +path.cubicTo(0.777777791,4.44444466, 0.666666687,4.66666651, 1,4); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [3] {{2,1}, {1,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0.6185225 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {1,4}} tStart=0.962962963 tEnd=0.4 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markDoneBinary id=4 (2,1 1,4) t=0.962962963 [3] (1.03703701,3.88888884) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[3] start=1 end=2 +bridgeOp current id=4 from=(1,4) to=(1.03703701,3.88888884) +findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1 +debugShowSort [3] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.6185225 tEnd=0.333333333 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{6,0}, {0,3}} tStart=0.692958689 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=1 +debugShowSort [1] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.6185225 tEnd=0.66166507 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{6,0}, {0,3}} tStart=0.692958689 tEnd=0.733333333 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0.333333333 [1] (1.03703701,3.88888884) tEnd=0.6185225 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[3] to:[2] start=1 end=0 +bridgeOp current id=3 from=(1.03703701,3.88888884) to=(1.84224784,2.07887602) +path.lineTo(1.03703701,3.88888884); +path.cubicTo(1.25885081,3.41357374, 1.58910847,2.69425988, 1.84224784,2.07887602); +findNextOp simple +markDoneBinary id=2 (6,0 0,3) t=0 [0] (6,0) tEnd=0.692958689 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(1.84224784,2.07887602) to=(6,0) +path.lineTo(6,0); +path.close(); +assemble +assemble contour start=(6,0) end=(6,0) +</div> + +<div id="cubicOp51da"> +$1 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 3.2262380859340407, y = 1.2052903527338259}, {x = 4.794709647266175, y = 0.60264517636691295}, {x = 6, y = 0}} +(gdb) p startEdge +$2 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 2.5538387028971403, y = 3.0829800885045522}} +(gdb) p endEdge +$3 = {{x = 6, y = 0}, {x = 5.3973548236330871, y = -1.205290352733825}} +</div> + +<div id="cubicOp52da"> +$3 = {{fX = 2.625, fY = 2.25}, {fX = 2.25, fY = 1.25}, {fX = 2, fY = 0.5}, {fX = 2, fY = 1}} +</div> + +<div id="cubicOp52db"> +$3 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 3.2262380859340407, y = 1.2052903527338259}, {x = 4.794709647266175, y = 0.60264517636691295}, {x = 6, y = 0}} +(gdb) p startEdge +$4 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 3.7591290556309662, y = 5.8567420025705115}} +(gdb) p endEdge +$5 = {{x = 6, y = 0}, {x = 7.8079355291007388, y = 4.0488064734697726}} +</div> + +<div id="cubicOp53d"> + SimplifyNew_Test [cubicOp53d] +{{0,3}, {1,2}, {5,3}, {2,1}}, +{{2,1}, {0,3}}, +op difference +{{3,5}, {1,2}, {3,0}, {2,1}}, +{{2,1}, {3,5}}, +debugShowCubicIntersection no self intersect {{3,5}, {1,2}, {3,0}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{3,5}, {1,2}, {3,0}, {2,1}} {{3,5}} wtTs[1]=0.5 {{2.125,1.5}} wtTs[2]=1 {{2,1}} wnTs[0]=1 {{2,1}, {3,5}} wnTs[1]=0.125 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0.32953467 {{3,5}, {1,2}, {3,0}, {2,1}} {{2.0754128281547217,2.4315376490509659}} wtTs[1]=0.59235675 {{2.2015477442470841,1.1371488033015213}} wtTs[2]=1 {{2,1}} wnTs[0]=0.414081 {{0,3}, {1,2}, {5,3}, {2,1}} wnTs[1]=0.976311205 wnTs[2]=1 +debugShowCubicLineIntersection wtTs[0]=1 {{3,5}, {1,2}, {3,0}, {2,1}} {{2,1}} wnTs[0]=0 {{2,1}, {0,3}} +debugShowCubicLineIntersection wtTs[0]=0.467845317 {{0,3}, {1,2}, {5,3}, {2,1}} {{2.3494328385891112,2.3977313543564462}} wtTs[1]=1 {{2,1}} wnTs[0]=0.349433 {{2,1}, {3,5}} wnTs[1]=0 +debugShowLineIntersection wtTs[0]=-0 {{2,1}, {3,5}} {{2,1}} wnTs[0]=0 {{2,1}, {0,3}} +debugShowCubicIntersection no self intersect {{0,3}, {1,2}, {5,3}, {2,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,3}, {1,2}, {5,3}, {2,1}} {{0,3}} wtTs[1]=1 {{2,1}} wnTs[0]=1 {{2,1}, {0,3}} wnTs[1]=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0 (3,5) tEnd=0.32953467 other=4 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.59235675 (2.20154786,1.13714886) tEnd=1 other=1 otherT=0.976311205 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.349432839 (2.34943295,2.3977313) tEnd=1 other=1 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0 (0,3) tEnd=0.414080655 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=3 otherT=1 otherIndex=6 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=4 otherT=-0 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=1 otherT=1 otherIndex=6 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,1}, {3,5}} tStart=0 tEnd=0.125 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=3 (3,5 1,2 3,0 2,1) t=0.59235675 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (3,5 1,2 3,0 2,1) t=0.59235675 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0.59235675 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,1}, {3,5}} tStart=0 tEnd=0.125 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,1}, {3,5}} tStart=0 tEnd=0.125 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=2 (2,1 0,3) t=0 [0] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (2,1 0,3) t=0 [1] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=2 (2,1 0,3) t=0 [2] (2,1) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,3 1,2 5,3 2,1) t=0 [0] (0,3) tEnd=0.414080655 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=4 (2,1 3,5) t=0 [0] (2,1) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (2,1 3,5) t=0 [1] (2,1) tEnd=-0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (2,1 3,5) t=-0 [2] (2,1) tEnd=0.125 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,3 1,2 5,3 2,1) t=0.976311205 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0 (3,5) tEnd=0.32953467 other=4 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.349432839 (2.34943295,2.3977313) tEnd=1 other=1 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0 (0,3) tEnd=0.414080655 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=3 otherT=1 otherIndex=6 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=4 otherT=-0 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=1 otherT=1 otherIndex=6 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (2,1 0,3) t=0 [0] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=2 (2,1 0,3) t=0 [1] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=2 (2,1 0,3) t=0 [2] (2,1) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0 [0] (0,3) tEnd=0.414080655 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1 +debugShowSort [0] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0.467845317 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0.5 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0 sign=1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0 +debugShowSort [3] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1 +debugShowSort [2] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [3] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=1 +debugShowSort [0] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0.467845317 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0.5 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=1 +markWinding id=3 (3,5 1,2 3,0 2,1) t=0 [0] (3,5) tEnd=0.32953467 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (2,1 3,5) t=0.349432839 [4] (2.34943295,2.3977313) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,3 1,2 5,3 2,1) t=0.414080655 [1] (2.07541275,2.43153763) tEnd=0.467845317 newWindSum=1 newOppSum=-2 oppSum=? windSum=? windValue=1 +markWinding id=3 (3,5 1,2 3,0 2,1) t=0.32953467 [1] (2.07541275,2.43153763) tEnd=0.5 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0 (3,5) tEnd=0.32953467 other=4 otherT=1 otherIndex=5 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.349432839 (2.34943295,2.3977313) tEnd=1 other=1 otherT=0.467845317 otherIndex=2 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0 [0] (3,5) tEnd=0.32953467 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 +markDoneBinary id=4 (2,1 3,5) t=0.349432839 [4] (2.34943295,2.3977313) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0.414080655 [1] (2.07541275,2.43153763) tEnd=0.467845317 newWindSum=1 newOppSum=-2 oppSum=-2 windSum=1 windValue=1 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0.32953467 [1] (2.07541275,2.43153763) tEnd=0.5 newWindSum=-2 newOppSum=1 oppSum=1 windSum=-2 windValue=1 +debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [2] {{2,1}, {3,5}} tStart=-0 tEnd=0.125 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=1 +debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (2,1 3,5) t=0 [1] (2,1) tEnd=-0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +markDoneBinary id=4 (2,1 3,5) t=0 [0] (2,1) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +markDoneBinary id=4 (2,1 3,5) t=-0 [2] (2,1) tEnd=0.125 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[4] to:[1] start=5 end=3 +bridgeOp current id=4 from=(2.125,1.5) to=(2,1) +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [1] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.976311205 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.59235675 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.976311205 tEnd=0.467845317 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.59235675 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (3,5 1,2 3,0 2,1) t=0.5 [2] (2.125,1.5) tEnd=0.59235675 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0.467845317 [2] (2.34943295,2.3977313) tEnd=0.976311205 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0.976311205 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[3] start=3 end=2 +bridgeOp current id=1 from=(2,1) to=(2.20154786,1.13714886) +path.moveTo(2.125,1.5); +path.lineTo(2,1); +path.cubicTo(2.07106638,1.04737759, 2.13820457,1.0930717, 2.20154786,1.13714886); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.5 tEnd=0.59235675 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,1}, {3,5}} tStart=0.125 tEnd=-0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.5 tEnd=0.32953467 sign=1 windValue=1 windSum=-2 -1->-2 (max=-2) done=1 tiny=0 opp=0 +debugShowSort [3] {{2,1}, {3,5}} tStart=0.125 tEnd=0.349432839 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (2,1 3,5) t=0.125 [3] (2.125,1.5) tEnd=0.349432839 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0.5 [2] (2.125,1.5) tEnd=0.59235675 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[4] start=3 end=2 +bridgeOp current id=3 from=(2.20154786,1.13714886) to=(2.125,1.5) +path.cubicTo(2.17544317,1.23998928, 2.14808917,1.36146486, 2.125,1.5); +path.close(); +assemble +assemble contour start=(2.125,1.5) end=(2.125,1.5) +</div> + +<div id="cubicOp53da"> +$1 = {{fX = 2.20154786, fY = 1.13714886}, {fX = 2.31676745, fY = 0.683232486}, {fX = 2.40764332, fY = 0.592356741}, {fX = 2, fY = 1}} +</div> + +<div id="cubicOp53db"> +$5 = {{x = 2.2015477442470841, y = 1.1371488033015216}, {x = 2.3167674423028313, y = 0.68323255769716895}, {x = 2.4076432497431508, y = 0.59235675025684875}, {x = 2, y = 1}} +(gdb) p startEdge +$2 = {{x = 2.2015477442470841, y = 1.1371488033015216}, {x = 2.6554639898514365, y = 1.2523685013572687}} +(gdb) p endEdge +$3 = {{x = 2, y = 1}, {x = 2.4076432497431512, y = 1.4076432497431508}} +</div> + +<div id="cubicOp54d"> + SimplifyNew_Test [cubicOp54d] +{{0,4}, {1,3}, {5,4}, {4,2}}, +{{4,2}, {0,4}}, +op difference +{{4,5}, {2,4}, {4,0}, {3,1}}, +{{3,1}, {4,5}}, +debugShowCubicIntersection no self intersect {{4,5}, {2,4}, {4,0}, {3,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{4,5}, {2,4}, {4,0}, {3,1}} {{4,5}} wtTs[1]=0.583333333 {{3.1938657407407405,1.7754629629629624}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {4,5}} wnTs[1]=0.193865741 wnTs[2]=0 +debugShowCubicIntersection no intersect {{4,5}, {2,4}, {4,0}, {3,1}} {{0,4}, {1,3}, {5,4}, {4,2}} +debugShowCubicLineIntersection wtTs[0]=0.467349523 {{4,5}, {2,4}, {4,0}, {3,1}} {{3.1023548730676489,2.4488225634661758}} wnTs[0]=0.224411 {{4,2}, {0,4}} +debugShowCubicLineIntersection wtTs[0]=0.649488354 {{0,4}, {1,3}, {5,4}, {4,2}} {{3.5531651685912107,3.2126606743648427}} wnTs[0]=0.553165 {{3,1}, {4,5}} +debugShowLineIntersection wtTs[0]=0.333333333 {{3,1}, {4,5}} {{3.333333333333333,2.333333333333333}} wnTs[0]=0.166667 {{4,2}, {0,4}} +debugShowCubicIntersection no self intersect {{0,4}, {1,3}, {5,4}, {4,2}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {1,3}, {5,4}, {4,2}} {{0,4}} wtTs[1]=0.166666667 {{0.7129629629629628,3.6435185185185186}} wtTs[2]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,4}} wnTs[1]=0.821759259 wnTs[2]=0 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.467349523 (3.10235476,2.4488225) tEnd=0.583333333 other=2 otherT=0.224411282 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.583333333 (3.19386578,1.77546299) tEnd=1 other=4 otherT=0.193865741 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0 (3,1) tEnd=0.193865741 other=3 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=1 tEnd=0.583333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,1}, {4,5}} tStart=0 tEnd=0.193865741 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findTop swap serpentine=0 +markWinding id=3 (4,5 2,4 4,0 3,1) t=0.583333333 [2] (3.19386578,1.77546299) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (4,5 2,4 4,0 3,1) t=0.583333333 [2] (3.19386578,1.77546299) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markWinding id=4 (3,1 4,5) t=0 [0] (3,1) tEnd=0.193865741 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (4,5 2,4 4,0 3,1) t=0.583333333 [2] (3.19386578,1.77546299) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.467349523 (3.10235476,2.4488225) tEnd=0.583333333 other=2 otherT=0.224411282 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0 (3,1) tEnd=0.193865741 other=3 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=4 (3,1 4,5) t=0 [0] (3,1) tEnd=0.193865741 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=0.467349523 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0.333333333 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=0.467349523 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0.333333333 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +markWinding id=3 (4,5 2,4 4,0 3,1) t=0.467349523 [1] (3.10235476,2.4488225) tEnd=0.583333333 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (3,1 4,5) t=0.193865741 [1] (3.19386578,1.77546299) tEnd=0.333333333 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.467349523 (3.10235476,2.4488225) tEnd=0.583333333 other=2 otherT=0.224411282 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=3 (4,5 2,4 4,0 3,1) t=0.467349523 [1] (3.10235476,2.4488225) tEnd=0.583333333 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1 +debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=2 (4,2 0,4) t=0.224411282 [2] (3.10235476,2.4488225) tEnd=0.821759259 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (4,5 2,4 4,0 3,1) t=0 [0] (4,5) tEnd=0.467349523 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (3,1 4,5) t=0.553165169 [3] (3.5531652,3.21266079) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=2 (4,2 0,4) t=0.166666667 [1] (3.33333325,2.33333325) tEnd=0.224411282 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [1] {{4,2}, {0,4}} tStart=0.821759259 tEnd=0.224411282 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,2}, {0,4}} tStart=0.821759259 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0.649488354 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markWinding id=1 (0,4 1,3 5,4 4,2) t=0 [0] (0,4) tEnd=0.166666667 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (4,2 0,4) t=0.821759259 [3] (0.712962985,3.64351845) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markWinding id=1 (0,4 1,3 5,4 4,2) t=0.166666667 [1] (0.712962985,3.64351845) tEnd=0.649488354 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +markDoneBinary id=2 (4,2 0,4) t=0.224411282 [2] (3.10235476,2.4488225) tEnd=0.821759259 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[1] start=1 end=0 +bridgeOp current id=2 from=(3.10235476,2.4488225) to=(0.712962985,3.64351845) +findNextOp simple +markDoneBinary id=1 (0,4 1,3 5,4 4,2) t=0 [0] (0,4) tEnd=0.166666667 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +bridgeOp current id=1 from=(0.712962985,3.64351845) to=(0,4) +path.moveTo(3.10235476,2.4488225); +path.lineTo(0.712962985,3.64351845); +path.cubicTo(0.416666657,3.72222233, 0.166666672,3.83333325, 0,4); +findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [3] {{4,2}, {0,4}} tStart=0.821759259 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0.649488354 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,2}, {0,4}} tStart=0.821759259 tEnd=0.224411282 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [2] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=2 (4,2 0,4) t=0.821759259 [3] (0.712962985,3.64351845) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findNextOp from:[2] to:[1] start=1 end=2 +bridgeOp current id=2 from=(0,4) to=(0.712962985,3.64351845) +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [2] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.649488354 tEnd=0.166666667 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{3,1}, {4,5}} tStart=0.553165169 tEnd=1 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [0] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.649488354 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,1}, {4,5}} tStart=0.553165169 tEnd=0.333333333 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[2] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,4 1,3 5,4 4,2) t=0.649488354 [2] (3.5531652,3.21266079) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +markDoneBinary id=2 (4,2 0,4) t=0 [0] (4,2) tEnd=0.166666667 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +markWinding id=4 (3,1 4,5) t=0.333333333 [2] (3.33333325,2.33333325) tEnd=0.553165169 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +markDoneBinary id=1 (0,4 1,3 5,4 4,2) t=0.166666667 [1] (0.712962985,3.64351845) tEnd=0.649488354 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[4] start=3 end=2 +bridgeOp current id=1 from=(0.712962985,3.64351845) to=(3.5531652,3.21266079) +path.lineTo(0.712962985,3.64351845); +path.cubicTo(1.57131267,3.41551948, 2.81819034,3.45948982, 3.5531652,3.21266079); +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1 +debugShowSort [3] {{3,1}, {4,5}} tStart=0.333333333 tEnd=0.553165169 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{4,2}, {0,4}} tStart=0.166666667 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [1] {{3,1}, {4,5}} tStart=0.333333333 tEnd=0.193865741 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{4,2}, {0,4}} tStart=0.166666667 tEnd=0.224411282 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=4 (3,1 4,5) t=0.333333333 [2] (3.33333325,2.33333325) tEnd=0.553165169 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[4] to:[2] start=1 end=2 +bridgeOp current id=4 from=(3.5531652,3.21266079) to=(3.33333325,2.33333325) +findNextOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1 +debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0 +debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markDoneBinary id=2 (4,2 0,4) t=0.166666667 [1] (3.33333325,2.33333325) tEnd=0.224411282 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +findNextOp from:[2] to:[2] start=2 end=3 +sharedlibrary apply-load-rules all +bridgeOp current id=2 from=(3.33333325,2.33333325) to=(3.10235476,2.4488225) +path.lineTo(3.33333325,2.33333325); +path.lineTo(3.10235476,2.4488225); +path.close(); +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=4 (3,1 4,5) t=0.193865741 [1] (3.19386578,1.77546299) tEnd=0.333333333 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=-1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +findNextOp simple +markDoneBinary id=4 (3,1 4,5) t=0.553165169 [3] (3.5531652,3.21266079) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +bridgeOp current id=4 from=(3.5531652,3.21266079) to=(4,5) +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +markDoneBinary id=3 (4,5 2,4 4,0 3,1) t=0 [0] (4,5) tEnd=0.467349523 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +findNextOp from:[3] to:[2] start=2 end=3 +bridgeOp current id=3 from=(4,5) to=(3.10235476,2.4488225) +path.moveTo(3.5531652,3.21266079); +path.lineTo(4,5); +path.cubicTo(3.06530094,4.53265047, 3.00426435,3.41005421, 3.10235476,2.4488225); +</div> + +<div id="cubicOp54da"> +computed quadratics given + {{0,4}, {1,3}, {5,4}, {4,2}}, + {{4,5}, {2,4}, {4,0}, {3,1}}, +computed quadratics set 1 + {{0,4}, {0.313151522,3.71221453}, {0.886767898,3.60197476}}, + {{0.886767898,3.60197476}, {1.46038427,3.491735}, {2.10714698,3.44196686}}, + {{2.10714698,3.44196686}, {3.12180288,3.38575704}, {3.75968569,3.1281838}}, + {{3.75968569,3.1281838}, {4.3975685,2.87061055}, {4,2}}, +computed quadratics set 2 + {{4,5}, {3.59856947,4.79217123}, {3.39068129,4.44939202}}, + {{3.39068129,4.44939202}, {3.03659239,3.81843234}, {3.06844529,3.02100922}}, + {{3.06844529,3.02100922}, {3.09985637,2.22825976}, {3.22177695,1.60368348}}, + {{3.22177695,1.60368348}, {3.35239933,0.944897345}, {3.25461667,0.846601983}}, + {{3.25461667,0.846601983}, {3.19302952,0.807536747}, {3,1}}, +</div> + +<div id="cubicOp54db"> + {{3.39068129,4.44939202}, {3.03659239,3.81843234}, {3.06844529,3.02100922}}, + {{2.10714698,3.44196686}, {3.12180288,3.38575704}, {3.75968569,3.1281838}}, +</div> + +<div id="cubicOp54dc"> +(gdb) p cSub1 +$2 = {{x = 3.0774019473063863, y = 3.35198509346713}, {x = 3.0763003260366699, y = 3.3355427495692078}, {x = 3.0753041923884408, y = 3.3190757607779853}, {x = 3.0744102085015879, y = 3.3025879417907196}} +(gdb) p cSub2 +$3 = {{x = 3.053913680774329, y = 3.3310471586283938}, {x = 3.0685526504546785, y = 3.3285797268698434}, {x = 3.0831050944309708, y = 3.3260658459407866}, {x = 3.0975671980059394, y = 3.3235031316554351}} +(gdb) p s1 +$4 = {{x = 3.0774019473063863, y = 3.35198509346713}, {x = 3.0757503498668397, y = 3.327320623945933}, {x = 3.0744102085015879, y = 3.3025879417907196}} +(gdb) p s2 +$5 = {{x = 3.053913680774329, y = 3.3310471586283938}, {x = 3.0758730889691694, y = 3.3273466070370152}, {x = 3.0975671980059394, y = 3.3235031316554351}} +</div> + +<div id="cubicOp54dd"> +{{x = 3.053913680774329, y = 3.3310471586283938}, {x = 3.0758730889691694, y = 3.3273466070370152}, {x = 3.0975671980059394, y = 3.3235031316554351}} +{{x = 3.0744102085015879, y = 3.3025879417907196}, {x = 3.0774019473063863, y = 3.35198509346713}} +</div> + +<div id="cubicOp55d"> + SimplifyNew_Test [cubicOp55d] +{{0,5}, {1,3}, {3,2}, {5,0}}, +{{5,0}, {0,5}}, +op difference +{{2,3}, {0,5}, {5,0}, {3,1}}, +{{3,1}, {2,3}}, +debugShowCubicIntersection no self intersect {{0,5}, {1,3}, {3,2}, {5,0}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {1,3}, {3,2}, {5,0}} {{0,5}} wtTs[1]=1 {{5,0}} wnTs[0]=1 {{5,0}, {0,5}} wnTs[1]=0 +debugShowCubicIntersection wtTs[0]=0.658239823 {{0,5}, {1,3}, {3,2}, {5,0}} {{2.9893565350663849,1.7799961946192431}} wnTs[0]=0.613267 {{2,3}, {0,5}, {5,0}, {3,1}} +debugShowCubicLineIntersection wtTs[0]=0.540876747 {{0,5}, {1,3}, {3,2}, {5,0}} {{2.3420409812806477,2.3159180374387045}} wnTs[0]=0.657959 {{3,1}, {2,3}} +debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {0,5}, {5,0}, {3,1}} {{2,3}} wnTs[0]=0.6 {{5,0}, {0,5}} +debugShowLineIntersection wtTs[0]=0.6 {{5,0}, {0,5}} {{2,3}} wnTs[0]=1 {{3,1}, {2,3}} +debugShowCubicIntersection no self intersect {{2,3}, {0,5}, {5,0}, {3,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {0,5}, {5,0}, {3,1}} {{2,3}} wtTs[1]=0.4 {{2.0640000000000005,2.871999999999999}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {2,3}} wnTs[1]=0.936 wnTs[2]=0 +debugShowActiveSpans id=1 (0,5 1,3 3,2 5,0) t=0 (0,5) tEnd=0.540876747 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 1,3 3,2 5,0) t=0.540876747 (2.34204102,2.31591797) tEnd=0.658239823 other=4 otherT=0.657959019 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 1,3 3,2 5,0) t=0.658239823 (2.98935652,1.77999616) tEnd=1 other=3 otherT=0.613266786 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,0 0,5) t=0 (5,0) tEnd=0.6 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,0 0,5) t=0.6 (2,3) tEnd=1 other=3 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,0 0,5) t=0.6 (2,3) tEnd=1 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0 (2,3) tEnd=0.4 other=2 otherT=0.6 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0 (2,3) tEnd=0.4 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0.4 (2.06399989,2.87199998) tEnd=0.613266786 other=4 otherT=0.936 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0.613266786 (2.98935652,1.77999616) tEnd=1 other=1 otherT=0.658239823 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 2,3) t=0 (3,1) tEnd=0.657959019 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 2,3) t=0.657959019 (2.34204102,2.31591797) tEnd=0.936 other=1 otherT=0.540876747 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (3,1 2,3) t=0.936 (2.06399989,2.87199998) tEnd=1 other=3 otherT=0.4 otherIndex=2 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=1 tEnd=0.658239823 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,0}, {0,5}} tStart=0 tEnd=0.6 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +findTop swap serpentine=0 +markWinding id=1 (0,5 1,3 3,2 5,0) t=0.658239823 [2] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,5 1,3 3,2 5,0) t=0.658239823 [2] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markWinding id=2 (5,0 0,5) t=0 [0] (5,0) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.658239823 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{2,3}, {0,5}, {5,0}, {3,1}} tStart=0.613266786 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [2] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.658239823 tEnd=0.540876747 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,3}, {0,5}, {5,0}, {3,1}} tStart=0.613266786 tEnd=0.4 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[0] sign=-1 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markWinding id=3 (2,3 0,5 5,0 3,1) t=0.613266786 [3] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=4 (3,1 2,3) t=0 [0] (3,1) tEnd=0.657959019 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,5 1,3 3,2 5,0) t=0.540876747 [1] (2.34204102,2.31591797) tEnd=0.658239823 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0.4 [2] (2.06399989,2.87199998) tEnd=0.613266786 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +markDoneBinary id=1 (0,5 1,3 3,2 5,0) t=0.658239823 [2] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[1] to:[3] start=3 end=4 +bridgeOp current id=1 from=(5,0) to=(2.98935652,1.77999616) +path.moveTo(5,0); +path.cubicTo(4.31647968,0.683520317, 3.63295937,1.25024068, 2.98935652,1.77999616); +findNextOp simple +markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0.613266786 [3] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +bridgeOp current id=3 from=(2.98935652,1.77999616) to=(3,1) +path.cubicTo(3.49999475,1.123909, 3.77346635,0.613266766, 3,1); +findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1 +debugShowSort [1] {{3,1}, {2,3}} tStart=0.657959019 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [2] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.540876747 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{3,1}, {2,3}} tStart=0.657959019 tEnd=0.936 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.540876747 tEnd=0.658239823 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +findNextOp firstIndex=[1] sign=1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +markWinding id=1 (0,5 1,3 3,2 5,0) t=0 [0] (0,5) tEnd=0.540876747 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (5,0 0,5) t=0.6 [1] (2,3) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=2 (5,0 0,5) t=0.6 [2] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=2 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=4 (3,1 2,3) t=0.657959019 [1] (2.34204102,2.31591797) tEnd=0.936 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (3,1 2,3) t=0 [0] (3,1) tEnd=0.657959019 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1 +findNextOp from:[4] to:[1] start=1 end=0 +bridgeOp current id=4 from=(3,1) to=(2.34204102,2.31591797) +findNextOp simple +markDoneBinary id=1 (0,5 1,3 3,2 5,0) t=0 [0] (0,5) tEnd=0.540876747 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=1 from=(2.34204102,2.31591797) to=(0,5) +path.lineTo(2.34204102,2.31591797); +path.cubicTo(1.37430108,3.12904072, 0.540876746,3.91824651, 0,5); +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [3] {{5,0}, {0,5}} tStart=0.6 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [0] {{5,0}, {0,5}} tStart=0.6 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] {{3,1}, {2,3}} tStart=1 tEnd=0.936 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +debugShowSort [2] {{2,3}, {0,5}, {5,0}, {3,1}} tStart=0 tEnd=0.4 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1 +findNextOp firstIndex=[3] sign=-1 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0 +markDoneBinary id=4 (3,1 2,3) t=0.936 [2] (2.06399989,2.87199998) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=4 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0 [0] (2,3) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0 [1] (2,3) tEnd=0.4 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +findNextOp chase.append id=3 +markDoneBinary id=2 (5,0 0,5) t=0.6 [1] (2,3) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +markDoneBinary id=2 (5,0 0,5) t=0.6 [2] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +findNextOp from:[2] to:[2] start=2 end=0 +bridgeOp current id=2 from=(0,5) to=(2,3) +findNextOp simple +markDoneBinary id=2 (5,0 0,5) t=0 [0] (5,0) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(2,3) to=(5,0) +path.lineTo(5,0); +path.close(); +assemble +assemble contour start=(5,0) end=(5,0) +</div> + +<div id="cubicOp55da"> +$1 = {{x = 2.9893565350663844, y = 1.7799961946192431}, {x = 3.6329592934456443, y = 1.250240688218315}, {x = 4.3164796467228257, y = 0.68352035327717708}, {x = 5, y = 0}} +</div> + +<div id="cubicOp56da"> +$3 = {{x = 3.2077595567431376, y = 1.2121007383531144}, {x = 3.0712003892698903, y = 0.91360430885366861}, {x = 2.6980028578011237, y = 0.76733238073295829}, {x = 2, y = 1}} +</div> + +<div id="cubicOp57da"> +computed quadratics given + {{0,5}, {0,5}, {5,4}, {6,4}}, + {{4,5}, {4,6}, {5,0}, {5,0}}, +computed quadratics set 1 + {{0,5}, {0.0833333333,4.98148148}, {1.33333333,4.74074074}}, + {{1.33333333,4.74074074}, {2.58333333,4.5}, {4,4.25925926}}, + {{4,4.25925926}, {5.41666667,4.01851852}, {6,4}}, +computed quadratics set 2 + {{4,5}, {4.0078125,5.32421875}, {4.15625,4.640625}}, + {{4.15625,4.640625}, {4.3046875,3.95703125}, {4.5,2.875}}, + {{4.5,2.875}, {4.6953125,1.79296875}, {4.84375,0.921875}}, + {{4.84375,0.921875}, {4.9921875,0.05078125}, {5,0}}, +</div> + +<div id="cubicOp58d"> + SimplifyNew_Test [cubicOp58d] +{{0,5}, {3,4}, {6,5}, {5,3}}, +{{5,3}, {0,5}}, +op difference +{{5,6}, {3,5}, {5,0}, {4,3}}, +{{4,3}, {5,6}}, +debugShowCubicIntersection no self intersect {{5,6}, {3,5}, {5,0}, {4,3}} +debugShowCubicLineIntersection wtTs[0]=0 {{5,6}, {3,5}, {5,0}, {4,3}} {{5,6}} wtTs[1]=0.454545455 {{4.0946656649135988,3.2839969947407956}} wtTs[2]=1 {{4,3}} wnTs[0]=1 {{4,3}, {5,6}} wnTs[1]=0.0946656649 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0.297296392 {{5,6}, {3,5}, {5,0}, {4,3}} {{4.0929072920341625,4.362808103638363}} wnTs[0]=0.515735 {{0,5}, {3,4}, {6,5}, {5,3}} +debugShowCubicLineIntersection wtTs[0]=0.442158094 {{5,6}, {3,5}, {5,0}, {4,3}} {{4.0879917456946373,3.3648033017221453}} wnTs[0]=0.182402 {{5,3}, {0,5}} +debugShowCubicLineIntersection wtTs[0]=0.579011103 {{0,5}, {3,4}, {6,5}, {5,3}} {{4.4346371023199076,4.3039113069597246}} wnTs[0]=0.434637 {{4,3}, {5,6}} +debugShowLineIntersection wtTs[0]=0.117647059 {{4,3}, {5,6}} {{4.117647058823529,3.3529411764705879}} wnTs[0]=0.176471 {{5,3}, {0,5}} +debugShowCubicIntersection no self intersect {{0,5}, {3,4}, {6,5}, {5,3}} +debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {3,4}, {6,5}, {5,3}} {{0,5}} wtTs[1]=1 {{5,3}} wnTs[0]=1 {{5,3}, {0,5}} wnTs[1]=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.442158094 (4.08799171,3.36480331) tEnd=0.454545455 other=2 otherT=0.182401651 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.454545455 (4.09466553,3.28399706) tEnd=1 other=4 otherT=0.0946656649 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0 (4,3) tEnd=0.0946656649 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0 (0,5) tEnd=0.515734731 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.182401651 (4.08799171,3.36480331) tEnd=1 other=3 otherT=0.442158094 otherIndex=2 windSum=? windValue=1 oppValue=0 +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=1 tEnd=0.454545455 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,3}, {5,6}} tStart=0 tEnd=0.0946656649 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +markWinding id=3 (5,6 3,5 5,0 4,3) t=0.454545455 [3] (4.09466553,3.28399706) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (4,3 5,6) t=0 [0] (4,3) tEnd=0.0946656649 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (5,6 3,5 5,0 4,3) t=0.454545455 [3] (4.09466553,3.28399706) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0.454545455 [3] (4.09466553,3.28399706) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +markDoneBinary id=4 (4,3 5,6) t=0 [0] (4,3) tEnd=0.0946656649 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=0.442158094 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0.117647059 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1 +debugShowSort [0] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [1] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=0.442158094 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0 +debugShowSort [3] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0.117647059 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0 +markWinding id=3 (5,6 3,5 5,0 4,3) t=0.442158094 [2] (4.08799171,3.36480331) tEnd=0.454545455 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (4,3 5,6) t=0.0946656649 [1] (4.09466553,3.28399706) tEnd=0.117647059 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.442158094 (4.08799171,3.36480331) tEnd=0.454545455 other=2 otherT=0.182401651 otherIndex=2 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0 (0,5) tEnd=0.515734731 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.182401651 (4.08799171,3.36480331) tEnd=1 other=3 otherT=0.442158094 otherIndex=2 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0.442158094 [2] (4.08799171,3.36480331) tEnd=0.454545455 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1 +debugShowSort [0] {{5,3}, {0,5}} tStart=0.182401651 tEnd=0.176470588 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.454545455 sign=-1 windValue=1 windSum=-2 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{5,3}, {0,5}} tStart=0.182401651 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.297296392 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=-2 oppContourWinding=0 sign=-1 +debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.454545455 sign=-1 windValue=1 windSum=-2 -2->-1 (max=-2) done=1 tiny=0 opp=0 +debugShowSort [2] {{5,3}, {0,5}} tStart=0.182401651 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.297296392 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0 +debugShowSort [0] {{5,3}, {0,5}} tStart=0.182401651 tEnd=0.176470588 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=2 (5,3 0,5) t=0.182401651 [2] (4.08799171,3.36480331) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,5 3,4 6,5 5,3) t=0 [0] (0,5) tEnd=0.515734731 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=3 (5,6 3,5 5,0 4,3) t=0.297296392 [1] (4.09290743,4.36280823) tEnd=0.442158094 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=2 (5,3 0,5) t=0.176470588 [1] (4.11764717,3.35294127) tEnd=0.182401651 newWindSum=1 newOppSum=-2 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0 (0,5) tEnd=0.515734731 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.182401651 (4.08799171,3.36480331) tEnd=1 other=3 otherT=0.442158094 otherIndex=2 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (5,3 0,5) t=0.182401651 [2] (4.08799171,3.36480331) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=1 (0,5 3,4 6,5 5,3) t=0 [0] (0,5) tEnd=0.515734731 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0.297296392 [1] (4.09290743,4.36280823) tEnd=0.442158094 newWindSum=-2 newOppSum=1 oppSum=1 windSum=-2 windValue=1 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (5,3 0,5) t=0.176470588 [1] (4.11764717,3.35294127) tEnd=0.182401651 newWindSum=1 newOppSum=-2 oppSum=-2 windSum=1 windValue=1 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (4,3 5,6) t=0.0946656649 [1] (4.09466553,3.28399706) tEnd=0.117647059 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1 +debugShowSort [0] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0.579011103 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0.442158094 sign=-1 windValue=1 windSum=-2 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0 sign=1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0 +debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=-2 oppContourWinding=1 sign=-1 +debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0.442158094 sign=-1 windValue=1 windSum=-2 -2->-1 (max=-2) done=1 tiny=0 opp=0 +debugShowSort [2] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1 +debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0 +debugShowSort [0] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0.579011103 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +markWinding id=3 (5,6 3,5 5,0 4,3) t=0 [0] (5,6) tEnd=0.297296392 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (4,3 5,6) t=0.434637102 [3] (4.43463707,4.30391121) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,5 3,4 6,5 5,3) t=0.515734731 [1] (4.09290743,4.36280823) tEnd=0.579011103 newWindSum=1 newOppSum=-2 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0 [0] (5,6) tEnd=0.297296392 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 +markDoneBinary id=4 (4,3 5,6) t=0.434637102 [3] (4.43463707,4.30391121) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,5 3,4 6,5 5,3) t=0.515734731 [1] (4.09290743,4.36280823) tEnd=0.579011103 newWindSum=1 newOppSum=-2 oppSum=-2 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1 +debugShowSort [0] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.0946656649 sign=1 windValue=1 windSum=-2 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0.182401651 sign=-1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0 +debugShowSort [3] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.434637102 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=1 +debugShowSort [1] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.0946656649 sign=1 windValue=1 windSum=-2 -1->-2 (max=-2) done=1 tiny=0 opp=0 +debugShowSort [2] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0.182401651 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1 +debugShowSort [3] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.434637102 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0 +debugShowSort [0] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=4 (4,3 5,6) t=0.117647059 [2] (4.11764717,3.35294127) tEnd=0.434637102 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=2 (5,3 0,5) t=0 [0] (5,3) tEnd=0.176470588 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=1 (0,5 3,4 6,5 5,3) t=0.579011103 [2] (4.43463707,4.30391121) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=-2 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=4 (4,3 5,6) t=0.117647059 [2] (4.11764717,3.35294127) tEnd=0.434637102 newWindSum=-2 newOppSum=1 oppSum=1 windSum=-2 windValue=1 +debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=1 (0,5 3,4 6,5 5,3) t=0.579011103 [2] (4.43463707,4.30391121) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +markDoneBinary id=2 (5,3 0,5) t=0 [0] (5,3) tEnd=0.176470588 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +assemble +</div> + +<div id="cubicOp58da"> +$1 = {{fX = 4.09466553, fY = 3.28399706}, {fX = 4.19834709, fY = 2.10743785}, {fX = 4.5454545, fY = 1.36363637}, {fX = 4, fY = 3}} +</div> + +<div id="cubicOp61d"> + SimplifyNew_Test [cubicOp61d] +{{1,2}, {0,5}, {3,2}, {6,1}}, +{{6,1}, {1,2}}, +op difference +{{2,3}, {1,6}, {2,1}, {5,0}}, +{{5,0}, {2,3}}, +debugShowCubicIntersection wtTs[0]=0 {{2,3}, {1,6}, {2,1}, {5,0}} {{2,3}} wtTs[1]=0.5 +debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {1,6}, {2,1}, {5,0}} {{2,3}} wtTs[1]=0.5 {{2,3}} wtTs[2]=1 {{5,0}} wnTs[0]=1 {{5,0}, {2,3}} wnTs[1]=1 wnTs[2]=0 +debugShowCubicIntersection wtTs[0]=0 {{2,3}, {1,6}, {2,1}, {5,0}} {{2,3}} wtTs[1]=0.5 {{2.0000000000728706,2.9999999998542584}} wnTs[0]=0.5 {{1,2}, {0,5}, {3,2}, {6,1}} wnTs[1]=0.500000029 +debugShowCubicLineIntersection wtTs[0]=0.704088595 {{2,3}, {1,6}, {2,1}, {5,0}} {{2.8621787139852466,1.6275642572029505}} wnTs[0]=0.627564 {{6,1}, {1,2}} +debugShowCubicLineIntersection wtTs[0]=0.5 {{1,2}, {0,5}, {3,2}, {6,1}} {{2,3}} wnTs[0]=1 {{5,0}, {2,3}} +debugShowLineIntersection wtTs[0]=0.5 {{5,0}, {2,3}} {{3.5,1.5}} wnTs[0]=0.5 {{6,1}, {1,2}} +debugShowCubicIntersection no self intersect {{1,2}, {0,5}, {3,2}, {6,1}} +debugShowCubicLineIntersection wtTs[0]=0 {{1,2}, {0,5}, {3,2}, {6,1}} {{1,2}} wtTs[1]=1 {{6,1}} wnTs[0]=1 {{6,1}, {1,2}} wnTs[1]=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.704088595 (2.8621788,1.62756431) tEnd=1 other=2 otherT=0.627564257 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,0 2,3) t=0 (5,0) tEnd=0.5 other=3 otherT=1 otherIndex=7 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0 (1,2) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0.5 (3.5,1.5) tEnd=0.627564257 other=4 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0.627564257 (2.8621788,1.62756431) tEnd=1 other=3 otherT=0.704088595 otherIndex=6 windSum=? windValue=1 oppValue=0 +(gdb) continue +findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [0] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=1 tEnd=0.704088595 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,0}, {2,3}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +markWinding id=3 (2,3 1,6 2,1 5,0) t=0.704088595 [6] (2.8621788,1.62756431) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=4 (5,0 2,3) t=0 [0] (5,0) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 1,6 2,1 5,0) t=0.704088595 [6] (2.8621788,1.62756431) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0 +markDoneBinary id=3 (2,3 1,6 2,1 5,0) t=0.704088595 [6] (2.8621788,1.62756431) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +markDoneBinary id=4 (5,0 2,3) t=0 [0] (5,0) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 +findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1 +debugShowSort [0] {{6,1}, {1,2}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [1] {{5,0}, {2,3}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1 +debugShowSort [2] {{6,1}, {1,2}} tStart=0.5 tEnd=0.627564257 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0 +debugShowSort [3] {{5,0}, {2,3}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1 +debugShowSort [1] {{5,0}, {2,3}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0 +debugShowSort [2] {{6,1}, {1,2}} tStart=0.5 tEnd=0.627564257 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{5,0}, {2,3}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [0] {{6,1}, {1,2}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1 +markWinding id=2 (6,1 1,2) t=0.5 [1] (3.5,1.5) tEnd=0.627564257 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 +markWinding id=4 (5,0 2,3) t=0.5 [1] (3.5,1.5) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +markWinding id=2 (6,1 1,2) t=0 [0] (6,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0 (1,2) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0.5 (3.5,1.5) tEnd=0.627564257 other=4 otherT=0.5 otherIndex=1 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0.627564257 (2.8621788,1.62756431) tEnd=1 other=3 otherT=0.704088595 otherIndex=6 windSum=? windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 +markDoneBinary id=2 (6,1 1,2) t=0.5 [1] (3.5,1.5) tEnd=0.627564257 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 +findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1 +debugShowSort [0] {{6,1}, {1,2}} tStart=0.627564257 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [2] {{6,1}, {1,2}} tStart=0.627564257 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1 +debugShowSort [0] {{6,1}, {1,2}} tStart=0.627564257 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0 +debugShowSort [1] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1 +debugShowSort [2] {{6,1}, {1,2}} tStart=0.627564257 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [3] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1 +markWinding id=2 (6,1 1,2) t=0.627564257 [2] (2.8621788,1.62756431) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=1 (1,2 0,5 3,2 6,1) t=0 [0] (1,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 +markWinding id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0 (1,2) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0.627564257 (2.8621788,1.62756431) tEnd=1 other=3 otherT=0.704088595 otherIndex=6 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=2 (6,1 1,2) t=0.627564257 [2] (2.8621788,1.62756431) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(2.8621788,1.62756431) to=(1,2) +setSpans all tiny unsortable [1] (2,3) [0] (1,2) +setSpans all tiny unsortable [1] (2,3) [3] (2.00000024,3) +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0 [0] (1,2) tEnd=0.5 newWindSum=0 windSum=1 windValue=1 +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [1] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0 [2] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=4 (5,0 2,3) t=1 [3] (2,3) tEnd=1 newWindSum=0 windSum=? windValue=1 +findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1 +debugShowSort [0] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0.500000029 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=1 tiny=1 opp=0 +debugShowSort [2] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1 +debugShowSort [3] {{5,0}, {2,3}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=0 tiny=0 opp=1 +path.moveTo(2.8621788,1.62756431); +path.lineTo(1,2); +path.cubicTo(0.5,3.5, 1,3.5, 2,3); +markDoneBinary id=1 (1,2 0,5 3,2 6,1) t=0 [0] (1,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1 +setSpans unsortable [2] (2,3) [3] (2,3) +setSpans all tiny unsortable [4] (2,3) [2] (2,3) +setSpans all tiny unsortable [2] (2,3) [3] (2.00000024,3) +setSpans all tiny unsortable [2] (2,3) [0] (1,2) +markUnsortable id=4 (5,0 2,3) t=0.5 [1] (3.5,1.5) tEnd=1 newWindSum=0 windSum=-1 windValue=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0 [1] (2,3) tEnd=0 newWindSum=0 windSum=? windValue=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [4] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [3] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [2] (2,3) tEnd=0.500000029 newWindSum=0 windSum=? windValue=1 +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [1] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1 +debugShowSort [0] {{5,0}, {2,3}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [2] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=1 tiny=1 opp=0 +debugShowSort [3] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0 +debugShowSort [4] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0.500000029 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=1 tiny=1 opp=1 +debugShowSort [5] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1 +markDoneBinary id=4 (5,0 2,3) t=0.5 [1] (3.5,1.5) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +path.moveTo(3.5,1.5); +path.lineTo(2,3); +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=-1 windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=0 windSum=-1 windValue=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [4] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=0 windSum=1 windValue=1 +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [2] (2,3) tEnd=0.500000029 newWindSum=0 windSum=? windValue=1 +findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1 +debugShowSort [0] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.704088595 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0 +debugShowSort [1] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=1 tiny=1 opp=0 +debugShowSort [2] {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=1 sign=-1 windValue=1 windSum=1 1->2 (max=2) done=0 tiny=0 opp=1 +debugShowSort [3] {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=0.5 sign=1 windValue=1 windSum=? 2->1 (max=2) done=1 tiny=1 opp=1 +path.moveTo(2.8621788,1.62756431); +path.cubicTo(2.49148154,2.10034132, 2.20408869,2.59182286, 2,3); +markDoneBinary id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0 +debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0 +activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 +findNextOp simple +markDoneBinary id=2 (6,1 1,2) t=0 [0] (6,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +bridgeOp current id=2 from=(3.5,1.5) to=(6,1) +setSpans unsortable [3] (2.00000024,3) [4] (6,1) +setSpans unsortable [3] (2.00000024,3) [2] (2,3) +setSpans unsortable [5] (2,3) [6] (2.8621788,1.62756431) +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=0 windSum=1 windValue=1 +markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [2] (2,3) tEnd=0.500000029 newWindSum=0 windSum=? windValue=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=0 windSum=-1 windValue=1 +markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [4] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1 +findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1 +debugShowSort [0] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0 +debugShowSort [1] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=1 tiny=1 opp=0 +debugShowSort [2] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.704088595 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=1 tiny=0 opp=1 +debugShowSort [3] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=1 tiny=1 opp=1 +path.moveTo(3.5,1.5); +path.lineTo(6,1); +path.cubicTo(4.5,1.5, 3.00000024,2.49999976, 2,3); +markDoneBinary id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 +debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0 +</div> + </div> <script type="text/javascript"> var testDivs = [ + cubicOp61d, + cubicOp58da, + cubicOp58d, + cubicOp57da, + cubicOp56da, + cubicOp55da, + cubicOp55d, + cubicOp54dd, + cubicOp54dc, + cubicOp54db, + cubicOp54da, + cubicOp54d, + cubicOp53db, + cubicOp53da, + cubicOp53d, + cubicOp52db, + cubicOp52da, + cubicOp51da, + cubicOp51d, + cubicOp50d, + cubicOp49d, + cubicOp48dc, + cubicOp48db, + cubicOp48da, + cubicOp48d, + cubicOp47db, + cubicOp47da, + cubicOp47d, + cubicOp46db, + cubicOp46da, + cubicOp46d, + cubicOp45d, + cubicOp44d, + cubicOp43d, + cubicOp42d, + cubicOp42da, + cubicOp42db, + cubicOp41i, + cubicOp40d, + cubicOp39da, + cubicOp39d, + cubicOp38d, + cubicOp38da, cubicOp36u, cubicOp35da, + cubicOp32d, ]; var decimal_places = 3; // make this 3 to show more precision @@ -259,23 +3517,43 @@ var screenWidth, screenHeight; var drawnPts, drawnLines, drawnQuads, drawnCubics; var curveT = 0; -var pt_labels = true; -var control_lines = false; +var pt_labels = 2; +var control_lines = 0; var curve_t = false; var debug_xy = false; -var info_mode = false; var step_limit = 0; var draw_active = false; var draw_add = false; -var draw_intersection = false; +var draw_deriviatives = 0; +var draw_hints = false; +var draw_hodo = 0; +var draw_intersection = 0; var draw_intersectT = false; -var draw_legend = false; +var draw_legend = true; var draw_log = false; var draw_mark = false; +var draw_midpoint = false; +var draw_sequence = false; var draw_sort = false; -var draw_path = true; +var draw_path = 3; var draw_computed = 0; +var activeCount = 0; +var addCount = 0; +var sectCount = 0; +var sortCount = 0; +var markCount = 0; +var activeMax = 0; +var addMax = 0; +var sectMax = 0; +var sectMax2 = 0; +var sortMax = 0; +var markMax = 0; +var stepMax = 0; +var lastIndex = 0; +var hasPath = false; +var hasComputedPath = false; + var SPAN_ID = 0; var SPAN_X1 = SPAN_ID + 1; var SPAN_Y1 = SPAN_X1 + 1; @@ -359,7 +3637,15 @@ var SORT_LINE = INTERSECT_CUBIC_NO + 1; var SORT_QUAD = SORT_LINE + 1; var SORT_CUBIC = SORT_QUAD + 1; -var OP_DIFFERENCE = SORT_CUBIC + 1; +var SORT_LINE_UNSORTABLE = SORT_CUBIC + 1; +var SORT_QUAD_UNSORTABLE = SORT_LINE_UNSORTABLE + 1; +var SORT_CUBIC_UNSORTABLE = SORT_QUAD_UNSORTABLE + 1; + +var SORT_LINE_COMPACT = SORT_CUBIC_UNSORTABLE + 1; +var SORT_QUAD_COMPACT = SORT_LINE_COMPACT + 1; +var SORT_CUBIC_COMPACT = SORT_QUAD_COMPACT + 1; + +var OP_DIFFERENCE = SORT_CUBIC_COMPACT + 1; var OP_INTERSECT = OP_DIFFERENCE + 1; var OP_UNION = OP_INTERSECT + 1; var OP_XOR = OP_UNION + 1; @@ -370,9 +3656,13 @@ var MARK_CUBIC = MARK_QUAD + 1; var MARK_DONE_LINE = MARK_CUBIC + 1; var MARK_DONE_QUAD = MARK_DONE_LINE + 1; var MARK_DONE_CUBIC = MARK_DONE_QUAD + 1; +var MARK_UNSORTABLE_LINE = MARK_DONE_CUBIC + 1; +var MARK_UNSORTABLE_QUAD = MARK_UNSORTABLE_LINE + 1; +var MARK_UNSORTABLE_CUBIC = MARK_UNSORTABLE_QUAD + 1; -var COMPUTED_ORIGINAL = MARK_DONE_CUBIC + 1; -var COMPUTED_QUAD = COMPUTED_ORIGINAL + 1; +var COMPUTED_SET_1 = MARK_UNSORTABLE_CUBIC + 1; +var COMPUTED_SET_2 = COMPUTED_SET_1 + 1; +var FRAG_TYPE_LAST = COMPUTED_SET_2; var REC_TYPE_UNKNOWN = -1; var REC_TYPE_PATH = 0; @@ -399,52 +3689,6 @@ function strs_to_nums(strs) { return result; } -function construct_regexp(pattern) { - var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); - escape = escape.replace(/PT_VAL/g, "(\\d+\\.?\\d*),(\\d+\\.?\\d*)"); - escape = escape.replace(/T_VAL/g, "(\\d+\\.?\\d*e?-?\\d*)"); - escape = escape.replace(/IDX/g, "(\\d+)"); - escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); - return new RegExp(escape, 'i'); -} - -function parse_debugShowActiveSpans(test, title) { - var re_cubic = construct_regexp(" id=IDX (PT_VAL PT_VAL PT_VAL PT_VAL) t=T_VAL (PT_VAL) tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=IDX"); - var re_quad = construct_regexp(" id=IDX (PT_VAL PT_VAL PT_VAL) t=T_VAL (PT_VAL) tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=IDX"); - var re_line = construct_regexp(" id=IDX (PT_VAL PT_VAL) t=T_VAL (PT_VAL) tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=IDX"); - - var strs = test.split("debugShowActiveSpans"); - if (strs.length == 1) - return; - var spans = []; - for (var s = 0; s < strs.length; ++s) { - var str = strs[s]; - if (str == "\n") { - continue; - } - if (re_line.test(str)) { - var lineStrs = re_line.exec(str); - var line = strs_to_nums(lineStrs); - spans.push(ACTIVE_LINE_SPAN); - spans.push(line); - } else if (re_quad.test(str)) { - var quadStrs = re_quad.exec(str); - var quad = strs_to_nums(quadStrs); - spans.push(ACTIVE_QUAD_SPAN); - spans.push(quad); - } else if (re_cubic.test(str)) { - var cubicStrs = re_cubic.exec(str); - var cubic = strs_to_nums(cubicStrs); - spans.push(ACTIVE_CUBIC_SPAN); - spans.push(cubic); - } - } - if (spans.length >= 1) { - tests.push(spans); - testTitles.push(title); - } -} - function filter_str_by(id, str, regex, array) { if (regex.test(str)) { var strs = regex.exec(str); @@ -456,45 +3700,15 @@ function filter_str_by(id, str, regex, array) { return false; } -// FIXME: add cubic support -function parse_intersections(test, title) { - var re_quad_line = construct_regexp(" wtTs[0]=T_VAL (PT_VAL PT_VAL PT_VAL) (PT_VAL) wnTs[0]=T_VAL (PT_VAL PT_VAL) (PT_VAL)"); - var re_quad_line_2 = construct_regexp(" wtTs[0]=T_VAL (PT_VAL PT_VAL PT_VAL) (PT_VAL) wtTs[1]=T_VAL (PT_VAL) wnTs[0]=T_VAL (PT_VAL PT_VAL) (PT_VAL) wnTs[1]=T_VAL (PT_VAL)"); - var re_quad_line_no_intersect = construct_regexp(" no intersect (PT_VAL PT_VAL PT_VAL) (PT_VAL PT_VAL)"); - var re_quad = construct_regexp(" wtTs[0]=T_VAL (PT_VAL PT_VAL PT_VAL) (PT_VAL) wnTs[0]=T_VAL (PT_VAL PT_VAL PT_VAL) (PT_VAL)"); - var re_quad_2 = construct_regexp(" wtTs[0]=T_VAL (PT_VAL PT_VAL PT_VAL) (PT_VAL) wtTs[1]=T_VAL wnTs[0]=T_VAL (PT_VAL PT_VAL PT_VAL) (PT_VAL) wnTs[1]=T_VAL"); - var re_quad_no_intersect = construct_regexp(" no intersect (PT_VAL PT_VAL PT_VAL) (PT_VAL PT_VAL PT_VAL)"); - - var strs = test.split(/debugShow[A-Za-z]+Intersection/); - if (strs.length == 1) - return; - var spans = []; - for (var s = 0; s < strs.length; ++s) { - var str = strs[s]; - if (str == "\n") { - continue; - } - filter_str_by(INTERSECT_QUAD_LINE, str, re_quad_line, spans); - filter_str_by(INTERSECT_QUAD_LINE_2, str, re_quad_line_2, spans); - filter_str_by(INTERSECT_QUAD_LINE_NO, str, re_quad_line_no_intersect, spans); - filter_str_by(INTERSECT_QUAD, str, re_quad, spans); - filter_str_by(INTERSECT_QUAD_2, str, re_quad_2, spans); - filter_str_by(INTERSECT_QUAD_NO, str, re_quad_no_intersect, spans); - } - if (spans.length >= 1) { - tests.push(spans); - testTitles.push(title); - } -} - function construct_regexp2(pattern) { var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); + escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); escape = escape.replace(/CUBIC_VAL/g, "\\(P_VAL P_VAL P_VAL P_VAL\\)"); escape = escape.replace(/QUAD_VAL/g, "\\(P_VAL P_VAL P_VAL\\)"); escape = escape.replace(/LINE_VAL/g, "\\(P_VAL P_VAL\\)"); escape = escape.replace(/PT_VAL/g, "\\(P_VAL\\)"); - escape = escape.replace(/P_VAL/g, "(\\d+\\.?\\d*),(\\d+\\.?\\d*)"); - escape = escape.replace(/T_VAL/g, "(\\d+\\.?\\d*e?-?\\d*)"); + escape = escape.replace(/P_VAL/g, "(-?\\d+\\.?\\d*e?-?\\d*),(-?\\d+\\.?\\d*e?-?\\d*)"); + escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*e?-?\\d*)"); escape = escape.replace(/IDX/g, "(\\d+)"); escape = escape.replace(/NUM/g, "(-?\\d+)"); escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); @@ -503,12 +3717,13 @@ function construct_regexp2(pattern) { function construct_regexp2c(pattern) { var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); - escape = escape.replace(/CUBIC_VAL/g, "\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}"); - escape = escape.replace(/QUAD_VAL/g, "\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}"); - escape = escape.replace(/LINE_VAL/g, "\\{\\{P_VAL\\}, \\{P_VAL\\}\\}"); + escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); + escape = escape.replace(/CUBIC_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}"); + escape = escape.replace(/QUAD_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}"); + escape = escape.replace(/LINE_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}\\}"); escape = escape.replace(/PT_VAL/g, "\\{\\{P_VAL\\}\\}"); - escape = escape.replace(/P_VAL/g, "(?:x = )?(\\d+\\.?\\d*),(?: y = )?(\\d+\\.?\\d*)"); - escape = escape.replace(/T_VAL/g, "(\\d+\\.?\\d*e?-?\\d*)"); + escape = escape.replace(/P_VAL/g, "(?:f?[xX] = )?(-?\\d+\\.?\\d*e?-?\\d*),(?: f?[yY] = )?(-?\\d+\\.?\\d*e?-?\\d*)"); + escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*e?-?\\d*)"); escape = escape.replace(/IDX/g, "(\\d+)"); escape = escape.replace(/NUM/g, "(-?\\d+)"); escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); @@ -524,12 +3739,13 @@ function match_regexp(str, lineNo, array, id, pattern) { return filter_str_by(id, str, regex, array); } -function parse_all(test, title) { +function parse_all(test) { var lines = test.match(/[^\r\n]+/g); var records = []; // a rec can be the original paths, a set of intersections, a set of active spans, a sort, or a path add var record = []; var recType = REC_TYPE_UNKNOWN; var lastLineNo; + var moveX, moveY; for (var lineNo = 0; lineNo < lines.length; ++lineNo) { var line = lines[lineNo]; if (line.length == 0) { @@ -538,14 +3754,15 @@ function parse_all(test, title) { var type = line.lastIndexOf("debugShowSort", 0) === 0 ? REC_TYPE_SORT : line.lastIndexOf("debugShowActiveSpans", 0) === 0 ? REC_TYPE_ACTIVE : line.lastIndexOf("debugShow", 0) === 0 ? REC_TYPE_SECT + : line.lastIndexOf("computed", 0) === 0 ? REC_TYPE_COMPUTED : line.lastIndexOf("path.", 0) === 0 ? REC_TYPE_ADD : line.lastIndexOf("mark", 0) === 0 ? REC_TYPE_MARK - : line.lastIndexOf("{{", 0) === 0 ? REC_TYPE_PATH : line.lastIndexOf(" {{", 0) === 0 ? REC_TYPE_COMPUTED + : line.lastIndexOf("{{", 0) === 0 ? REC_TYPE_PATH : line.lastIndexOf("op", 0) === 0 ? REC_TYPE_OP - : line.lastIndexOf("computed", 0) === 0 ? REC_TYPE_COMPUTED + : line.lastIndexOf("$", 0) === 0 ? REC_TYPE_PATH : REC_TYPE_UNKNOWN; - if (recType != type || recType == REC_TYPE_ADD) { + if (recType != type || recType == REC_TYPE_ADD || recType == REC_TYPE_SECT) { if (recType != REC_TYPE_UNKNOWN) { records.push(recType); records.push(lastLineNo); @@ -567,16 +3784,37 @@ function parse_all(test, title) { ); break; case REC_TYPE_ADD: - found = match_regexp(line, lineNo, record, ADD_MOVETO, "path.moveTo(P_VAL);" - ) || match_regexp(line, lineNo, record, ADD_LINETO, "path.lineTo(P_VAL);" - ) || match_regexp(line, lineNo, record, ADD_QUADTO, "path.quadTo(P_VAL, P_VAL);" - ) || match_regexp(line, lineNo, record, ADD_CUBICTO, "path.cubicTo(P_VAL, P_VAL, P_VAL);" - ) || match_regexp(line, lineNo, record, ADD_CLOSE, "path.close();" - ); + if (match_regexp(line, lineNo, record, ADD_MOVETO, "path.moveTo(P_VAL);")) { + moveX = record[1][0]; + moveY = record[1][1]; + found = true; + } else if (match_regexp(line, lineNo, record, ADD_LINETO, "path.lineTo(P_VAL);")) { + record[1].unshift(moveY); + record[1].unshift(moveX); + moveX = record[1][2]; + moveY = record[1][3]; + found = true; + } else if (match_regexp(line, lineNo, record, ADD_QUADTO, "path.quadTo(P_VAL, P_VAL);")) { + record[1].unshift(moveY); + record[1].unshift(moveX); + moveX = record[1][4]; + moveY = record[1][5]; + found = true; + } else if (match_regexp(line, lineNo, record, ADD_CUBICTO, "path.cubicTo(P_VAL, P_VAL, P_VAL);")) { + record[1].unshift(moveY); + record[1].unshift(moveX); + moveX = record[1][6]; + moveY = record[1][7]; + found = true; + } else { + found = match_regexp(line, lineNo, record, ADD_CLOSE, "path.close();"); + } break; case REC_TYPE_COMPUTED: - found = line == "computed quadratics given" - || match_regexp(line, lineNo, record, PATH_QUAD, " QUAD_VAL," + found = line == "computed quadratics given" + || match_regexp(line, lineNo, record, COMPUTED_SET_1, "computed quadratics set 1" + ) || match_regexp(line, lineNo, record, COMPUTED_SET_2, "computed quadratics set 2" + ) || match_regexp(line, lineNo, record, PATH_QUAD, " QUAD_VAL," ) || match_regexp(line, lineNo, record, PATH_CUBIC, " CUBIC_VAL," ); break; @@ -631,17 +3869,23 @@ function parse_all(test, title) { break; case REC_TYPE_SORT: found = match_regexp(line, lineNo, record, SORT_LINE, "debugShowSort" + -" [IDX] LINE_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT NUM->NUM (max=NUM) done=IDX tiny=IDX opp=IDX" +" [IDX] LINE_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" ) || match_regexp(line, lineNo, record, SORT_QUAD, "debugShowSort" + -" [IDX] QUAD_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT NUM->NUM (max=NUM) done=IDX tiny=IDX opp=IDX" +" [IDX] QUAD_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" ) || match_regexp(line, lineNo, record, SORT_CUBIC, "debugShowSort" + -" [IDX] CUBIC_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT NUM->NUM (max=NUM) done=IDX tiny=IDX opp=IDX" +" [IDX] CUBIC_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" + ) || match_regexp(line, lineNo, record, SORT_LINE_UNSORTABLE, "debugShowSort" + +" [IDX] UNSORTABLE LINE_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" + ) || match_regexp(line, lineNo, record, SORT_QUAD_UNSORTABLE, "debugShowSort" + +" [IDX] UNSORTABLE QUAD_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" + ) || match_regexp(line, lineNo, record, SORT_CUBIC_UNSORTABLE, "debugShowSort" + +" [IDX] UNSORTABLE CUBIC_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" ) || match_regexp(line, lineNo, record, SORT_LINE_COMPACT, "debugShowSort" + -" [IDX] id=IDX line start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT NUM->NUM (max=NUM) done=IDX tiny=IDX opp=IDX" +" [IDX] id=IDX line start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" ) || match_regexp(line, lineNo, record, SORT_QUAD_COMPACT, "debugShowSort" + -" [IDX] id=IDX quad start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT NUM->NUM (max=NUM) done=IDX tiny=IDX opp=IDX" +" [IDX] id=IDX quad start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" ) || match_regexp(line, lineNo, record, SORT_CUBIC_COMPACT, "debugShowSort" + -" [IDX] id=IDX cubic start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT NUM->NUM (max=NUM) done=IDX tiny=IDX opp=IDX" +" [IDX] id=IDX cubic start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX" ); break; case REC_TYPE_MARK: @@ -657,6 +3901,12 @@ function parse_all(test, title) { " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" ) || match_regexp(line, lineNo, record, MARK_DONE_CUBIC, "markDoneBinary" + " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" + ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_LINE, "markUnsortable" + +" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" + ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_QUAD, "markUnsortable" + +" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" + ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_CUBIC, "markUnsortable" + +" id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" ); break; case REC_TYPE_OP: @@ -680,9 +3930,8 @@ function parse_all(test, title) { records.push(record); } if (records.length >= 1) { - tests.push(records); - testLines.push(lines); - testTitles.push(title); + tests[testIndex] = records; + testLines[testIndex] = lines; } } @@ -696,6 +3945,7 @@ function init(test) { xmax = -Infinity; ymin = Infinity; ymax = -Infinity; + hasPath = hasComputedPath = false; for (var testIndex = 0; testIndex < test.length; testIndex += 3) { var recType = test[testIndex]; if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { @@ -705,7 +3955,7 @@ function init(test) { var records = test[testIndex + 2]; for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { var fragType = records[recordIndex]; - if (!typeof fragType == 'number' || fragType < 1 || recType > SORT_CUBIC) { + if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { console.log("unknown in range frag type: " + fragType); throw "stop execution"; } @@ -716,6 +3966,10 @@ function init(test) { var last2 = 0; switch (recType) { case REC_TYPE_COMPUTED: + if (fragType == COMPUTED_SET_1 || fragType == COMPUTED_SET_2) { + break; + } + hasComputedPath = true; case REC_TYPE_PATH: switch (fragType) { case PATH_LINE: @@ -732,6 +3986,9 @@ function init(test) { : "REC_TYPE_COMPUTED") + " frag type:" + fragType); throw "stop execution"; } + if (recType == REC_TYPE_PATH) { + hasPath = true; + } break; case REC_TYPE_ACTIVE: first = 1; @@ -753,16 +4010,15 @@ function init(test) { case REC_TYPE_ADD: switch (fragType) { case ADD_MOVETO: - last = 2; break; case ADD_LINETO: - last = 2; + last = 4; break; case ADD_QUADTO: - last = 4; + last = 6; break; case ADD_CUBICTO: - last = 6; + last = 8; break; case ADD_CLOSE: break; @@ -856,6 +4112,12 @@ function init(test) { } } setScale(); + if (hasPath == false && hasComputedPath == true && !draw_computed) { + draw_computed = 3; // show both quadratics and cubics + } + if (hasPath == true && hasComputedPath == false && draw_computed) { + draw_computed = 0; + } } function setScale() { @@ -878,7 +4140,7 @@ function setScale() { srcTop = symin; } -function drawPoint(px, py) { +function drawPoint(px, py, end) { for (var pts = 0; pts < drawnPts.length; pts += 2) { var x = drawnPts[pts]; var y = drawnPts[pts + 1]; @@ -889,50 +4151,67 @@ function drawPoint(px, py) { drawnPts.push(px); drawnPts.push(py); var label = px.toFixed(decimal_places) + ", " + py.toFixed(decimal_places); - var _px = (px - srcLeft)* scale; + var _px = (px - srcLeft) * scale; var _py = (py - srcTop) * scale; ctx.beginPath(); ctx.arc(_px, _py, 3, 0, Math.PI*2, true); ctx.closePath(); - ctx.fill(); + if (end) { + ctx.fill(); + } else { + ctx.stroke(); + } + ctx.textAlign = "left"; ctx.fillText(label, _px + 5, _py); } -function drawPoints(ptArray, curveType) { +function drawPoints(ptArray, curveType, drawControls) { var count = (curveType - PATH_LINE + 2) * 2; for (var idx = 0; idx < count; idx += 2) { - drawPoint(ptArray[idx], ptArray[idx + 1]); + if (!drawControls && idx != 0 && idx != count - 2) { + continue; + } + drawPoint(ptArray[idx], ptArray[idx + 1], idx == 0 || idx == count - 2); } } -function drawControlLines(curve, curveType) { +function drawControlLines(curve, curveType, drawEnd) { if (curveType == PATH_LINE) { return; } ctx.strokeStyle = "rgba(0,0,0, 0.3)"; drawLine(curve[0], curve[1], curve[2], curve[3]); drawLine(curve[2], curve[3], curve[4], curve[5]); - if (curveType == PATH_CUBIC) - drawLine(curve[4], curve[5], curve[4], curve[5]); + if (curveType == PATH_CUBIC) { + drawLine(curve[4], curve[5], curve[6], curve[7]); + if (drawEnd > 1) { + drawLine(curve[6], curve[7], curve[0], curve[1]); + if (drawEnd > 2) { + drawLine(curve[0], curve[1], curve[4], curve[5]); + drawLine(curve[6], curve[7], curve[2], curve[3]); + } + } + } else if (drawEnd > 1) { + drawLine(curve[4], curve[5], curve[0], curve[1]); + } } -function drawPointAtT(curve, curveType) { - var x, y; - var t = curveT; +function pointAtT(curve, curveType, t) { + var xy = {}; switch (curveType) { case PATH_LINE: var a = 1 - t; var b = t; - x = a * curve[0] + b * curve[2]; - y = a * curve[1] + b * curve[3]; + xy.x = a * curve[0] + b * curve[2]; + xy.y = a * curve[1] + b * curve[3]; break; case PATH_QUAD: var one_t = 1 - t; var a = one_t * one_t; var b = 2 * one_t * t; var c = t * t; - x = a * curve[0] + b * curve[2] + c * curve[4]; - y = a * curve[1] + b * curve[3] + c * curve[5]; + xy.x = a * curve[0] + b * curve[2] + c * curve[4]; + xy.y = a * curve[1] + b * curve[3] + c * curve[5]; break; case PATH_CUBIC: var one_t = 1 - t; @@ -942,16 +4221,22 @@ function drawPointAtT(curve, curveType) { var t2 = t * t; var c = 3 * one_t * t2; var d = t2 * t; - x = a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; - y = a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; + xy.x = a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; + xy.y = a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; break; } - drawPoint(x, y); + return xy; +} + +function drawPointAtT(curve, curveType) { + var x, y; + var xy = pointAtT(curve, curveType, curveT); + drawPoint(xy.x, xy.y, true); if (!draw_intersectT) { return; } ctx.fillStyle = "red"; - drawTAtPointUp(x, y, curveT); + drawTAtPointUp(xy.x, xy.y, curveT); } function drawTAtPointUp(px, py, t) { @@ -968,19 +4253,24 @@ function drawTAtPointDown(px, py, t) { ctx.fillText(label, _px + 5, _py + 10); } -function drawLine(x1, y1, x2, y2) { +function alreadyDrawnLine(x1, y1, x2, y2) { for (var pts = 0; pts < drawnLines.length; pts += 4) { - if (x1 == drawnLines[pts] && y1 == drawnLines[pts + 1]) { - return; - } - if (x2 == drawnLines[pts + 2] && y2 == drawnLines[pts + 3]) { - return; + if (x1 == drawnLines[pts] && y1 == drawnLines[pts + 1] + && x2 == drawnLines[pts + 2] && y2 == drawnLines[pts + 3]) { + return true; } } drawnLines.push(x1); drawnLines.push(y1); drawnLines.push(x2); drawnLines.push(y2); + return false; +} + +function drawLine(x1, y1, x2, y2) { + if (alreadyDrawnLine(x1, y1, x2, y2)) { + return; + } ctx.beginPath(); ctx.moveTo((x1 - srcLeft) * scale, (y1 - srcTop) * scale); @@ -989,13 +4279,27 @@ function drawLine(x1, y1, x2, y2) { ctx.stroke(); } -function drawLinePartial(x1, y1, x2, y2, t1, t2) { +function linePartial(x1, y1, x2, y2, t1, t2) { var dx = x1 - x2; var dy = y1 - y2; - var ax = x1 - t1 * dx; - var ay = y1 - t1 * dy; - var bx = x1 - t2 * dx; - var by = y1 - t2 * dy; + var array = [ + x1 - t1 * dx, + y1 - t1 * dy, + x1 - t2 * dx, + y1 - t2 * dy + ]; + return array; +} + +function drawLinePartial(x1, y1, x2, y2, t1, t2) { + var a = linePartial(x1, y1, x2, y2, t1, t2); + var ax = a[0]; + var ay = a[1]; + var bx = a[2]; + var by = a[3]; + if (alreadyDrawnLine(ax, ay, bx, by)) { + return; + } ctx.beginPath(); ctx.moveTo((ax - srcLeft) * scale, (ay - srcTop) * scale); @@ -1004,16 +4308,12 @@ function drawLinePartial(x1, y1, x2, y2, t1, t2) { ctx.stroke(); } -function drawQuad(x1, y1, x2, y2, x3, y3) { +function alreadyDrawnQuad(x1, y1, x2, y2, x3, y3) { for (var pts = 0; pts < drawnQuads.length; pts += 6) { - if (x1 == drawnQuads[pts] && y1 == drawnQuads[pts + 1]) { - return; - } - if (x2 == drawnQuads[pts + 2] && y2 == drawnQuads[pts + 3]) { - return; - } - if (x3 == drawnQuads[pts + 4] && x3 == drawnQuads[pts + 5]) { - return; + if (x1 == drawnQuads[pts] && y1 == drawnQuads[pts + 1] + && x2 == drawnQuads[pts + 2] && y2 == drawnQuads[pts + 3] + && x3 == drawnQuads[pts + 4] && x3 == drawnQuads[pts + 5]) { + return true; } } drawnQuads.push(x1); @@ -1022,6 +4322,13 @@ function drawQuad(x1, y1, x2, y2, x3, y3) { drawnQuads.push(y2); drawnQuads.push(x3); drawnQuads.push(y3); + return false; +} + +function drawQuad(x1, y1, x2, y2, x3, y3) { + if (alreadyDrawnQuad(x1, y1, x2, y2, x3, y3)) { + return; + } ctx.beginPath(); ctx.moveTo((x1 - srcLeft) * scale, (y1 - srcTop) * scale); @@ -1044,7 +4351,7 @@ function interp_quad_coords(x1, x2, x3, t) return abc; } -function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { +function quadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { var ax = interp_quad_coords(x1, x2, x3, t1); var ay = interp_quad_coords(y1, y2, y3, t1); var dx = interp_quad_coords(x1, x2, x3, (t1 + t2) / 2); @@ -1053,6 +4360,23 @@ function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { var cy = interp_quad_coords(y1, y2, y3, t2); var bx = 2*dx - (ax + cx)/2; var by = 2*dy - (ay + cy)/2; + var array = [ + ax, ay, bx, by, cx, cy + ]; + return array; +} + +function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { + var a = quadPartial(x1, y1, x2, y2, x3, y3, t1, t2); + var ax = a[0]; + var ay = a[1]; + var bx = a[2]; + var by = a[3]; + var cx = a[4]; + var cy = a[5]; + if (alreadyDrawnQuad(ax, ay, bx, by, cx, cy)) { + return; + } ctx.beginPath(); ctx.moveTo((ax - srcLeft) * scale, (ay - srcTop) * scale); @@ -1063,19 +4387,13 @@ function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { ctx.stroke(); } -function drawCubic(x1, y1, x2, y2, x3, y3, x4, y4) { +function alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4) { for (var pts = 0; pts < drawnCubics.length; pts += 8) { - if (x1 == drawnCubics[pts] && y1 == drawnCubics[pts + 1]) { - return; - } - if (x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3]) { - return; - } - if (x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5]) { - return; - } - if (x4 == drawnCubics[pts + 6] && y4 == drawnCubics[pts + 7]) { - return; + if (x1 == drawnCubics[pts] && y1 == drawnCubics[pts + 1] + && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3] + && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5] + && x4 == drawnCubics[pts + 6] && y4 == drawnCubics[pts + 7]) { + return true; } } drawnCubics.push(x1); @@ -1086,6 +4404,13 @@ function drawCubic(x1, y1, x2, y2, x3, y3, x4, y4) { drawnCubics.push(y3); drawnCubics.push(x4); drawnCubics.push(y4); + return false; +} + +function drawCubic(x1, y1, x2, y2, x3, y3, x4, y4) { + if (alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4)) { + return; + } ctx.beginPath(); ctx.moveTo((x1 - srcLeft) * scale, (y1 - srcTop) * scale); @@ -1109,7 +4434,7 @@ function interp_cubic_coords(x1, x2, x3, x4, t) return abcd; } -function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { +function cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { var ax = interp_cubic_coords(x1, x2, x3, x4, t1); var ay = interp_cubic_coords(y1, y2, y3, y4, t1); var ex = interp_cubic_coords(x1, x2, x3, x4, (t1*2+t2)/3); @@ -1126,6 +4451,25 @@ function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { var by = (my * 2 - ny) / 18; var cx = (nx * 2 - mx) / 18; var cy = (ny * 2 - my) / 18; + var array = [ + ax, ay, bx, by, cx, cy, dx, dy + ]; + return array; +} + +function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { + var a = cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); + var ax = a[0]; + var ay = a[1]; + var bx = a[2]; + var by = a[3]; + var cx = a[4]; + var cy = a[5]; + var dx = a[6]; + var dy = a[7]; + if (alreadyDrawnCubic(ax, ay, bx, by, cx, cy, dx, dy)) { + return; + } ctx.beginPath(); ctx.moveTo((ax - srcLeft) * scale, (ay - srcTop) * scale); @@ -1134,19 +4478,334 @@ function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { (cx - srcLeft) * scale, (cy - srcTop) * scale, (dx - srcLeft) * scale, - (dy - srcTop) * scale, - (ex - srcLeft) * scale, - (ey - srcTop) * scale); + (dy - srcTop) * scale); + ctx.stroke(); +} + +function boundsWidth(pts) { + var min = pts[0]; + var max = pts[0]; + for (var idx = 2; idx < pts.length; idx += 2) { + min = Math.min(min, pts[idx]); + max = Math.max(max, pts[idx]); + } + return max - min; +} + +function boundsHeight(pts) { + var min = pts[1]; + var max = pts[1]; + for (var idx = 3; idx < pts.length; idx += 2) { + min = Math.min(min, pts[idx]); + max = Math.max(max, pts[idx]); + } + return max - min; +} + +function tangent(pts) { + var dx = pts[2] - pts[0]; + var dy = pts[3] - pts[1]; + if (dx == 0 && dy == 0 && pts.length > 4) { + dx = pts[4] - pts[0]; + dy = pts[5] - pts[1]; + if (dx == 0 && dy == 0 && pts.length > 6) { + dx = pts[6] - pts[0]; + dy = pts[7] - pts[1]; + } + } + return Math.atan2(-dy, dx); +} + +function hodograph(cubic) { + var hodo = []; + hodo[0] = 3 * (cubic[2] - cubic[0]); + hodo[1] = 3 * (cubic[3] - cubic[1]); + hodo[2] = 3 * (cubic[4] - cubic[2]); + hodo[3] = 3 * (cubic[5] - cubic[3]); + hodo[4] = 3 * (cubic[6] - cubic[4]); + hodo[5] = 3 * (cubic[7] - cubic[5]); + return hodo; +} + +function hodograph2(cubic) { + var quad = hodograph(cubic); + var hodo = []; + hodo[0] = 2 * (quad[2] - quad[0]); + hodo[1] = 2 * (quad[3] - quad[1]); + hodo[2] = 2 * (quad[4] - quad[2]); + hodo[3] = 2 * (quad[5] - quad[3]); + return hodo; +} + +function quadraticRootsReal(A, B, C, s) { + if (A == 0) { + if (B == 0) { + s[0] = 0; + return C == 0; + } + s[0] = -C / B; + return 1; + } + /* normal form: x^2 + px + q = 0 */ + var p = B / (2 * A); + var q = C / A; + var p2 = p * p; + if (p2 < q) { + return 0; + } + var sqrt_D = 0; + if (p2 > q) { + sqrt_D = sqrt(p2 - q); + } + s[0] = sqrt_D - p; + s[1] = -sqrt_D - p; + return 1 + s[0] != s[1]; +} + +function add_valid_ts(s, realRoots, t) { + var foundRoots = 0; + for (var index = 0; index < realRoots; ++index) { + var tValue = s[index]; + if (tValue >= 0 && tValue <= 1) { + for (var idx2 = 0; idx2 < foundRoots; ++idx2) { + if (t[idx2] != tValue) { + t[foundRoots++] = tValue; + } + } + } + } + return foundRoots; +} + +function quadraticRootsValidT(a, b, c, t) { + var s = []; + var realRoots = quadraticRootsReal(A, B, C, s); + var foundRoots = add_valid_ts(s, realRoots, t); + return foundRoots != 0; +} + +function find_cubic_inflections(cubic, tValues) { + var Ax = src[2] - src[0]; + var Ay = src[3] - src[1]; + var Bx = src[4] - 2 * src[2] + src[0]; + var By = src[5] - 2 * src[3] + src[1]; + var Cx = src[6] + 3 * (src[2] - src[4]) - src[0]; + var Cy = src[7] + 3 * (src[3] - src[5]) - src[1]; + return quadraticRootsValidT(Bx * Cy - By * Cx, (Ax * Cy - Ay * Cx), + Ax * By - Ay * Bx, tValues); +} + +function dxy_at_t(curve, type, t) { + var dxy = {}; + if (type == PATH_QUAD) { + var a = t - 1; + var b = 1 - 2 * t; + var c = t; + dxy.x = a * curve[0] + b * curve[2] + c * curve[4]; + dxy.y = a * curve[1] + b * curve[3] + c * curve[5]; + } else if (type == PATH_CUBIC) { + var one_t = 1 - t; + var a = curve[0]; + var b = curve[2]; + var c = curve[4]; + var d = curve[6]; + dxy.x = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); + a = curve[1]; + b = curve[3]; + c = curve[5]; + d = curve[7]; + dxy.y = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); + } + return dxy; +} + +function drawLabel(num, px, py) { + ctx.beginPath(); + ctx.arc(px, py, 8, 0, Math.PI*2, true); + ctx.closePath(); + ctx.strokeStyle = "rgba(0,0,0, 0.4)"; + ctx.lineWidth = num == 0 || num == 3 ? 2 : 1; ctx.stroke(); + ctx.fillStyle = "black"; + ctx.font = "normal 10px Arial"; + // ctx.rotate(0.001); + ctx.fillText(num, px - 2, py + 3); + // ctx.rotate(-0.001); +} + +function drawLabelX(ymin, num, loc) { + var px = (loc - srcLeft) * scale; + var py = (ymin - srcTop) * scale - 20; + drawLabel(num, px, py); +} + +function drawLabelY(xmin, num, loc) { + var px = (xmin - srcLeft) * scale - 20; + var py = (loc - srcTop) * scale; + drawLabel(num, px, py); +} + +function drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY) { + ctx.beginPath(); + ctx.moveTo(hx, hy - 100); + ctx.lineTo(hx, hy); + ctx.strokeStyle = hMinY < 0 ? "green" : "blue"; + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(hx, hy); + ctx.lineTo(hx, hy + 100); + ctx.strokeStyle = hMaxY > 0 ? "green" : "blue"; + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(hx - 100, hy); + ctx.lineTo(hx, hy); + ctx.strokeStyle = hMinX < 0 ? "green" : "blue"; + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(hx, hy); + ctx.lineTo(hx + 100, hy); + ctx.strokeStyle = hMaxX > 0 ? "green" : "blue"; + ctx.stroke(); +} + +function scalexy(x, y, mag) { + var length = Math.sqrt(x * x + y * y); + return mag / length; +} + +function drawArrow(x, y, dx, dy) { + var dscale = scalexy(dx, dy, 1 / scale * 100); + dx *= dscale; + dy *= dscale; + ctx.beginPath(); + ctx.moveTo((x - srcLeft) * scale, (y - srcTop) * scale); + x += dx; + y += dy; + ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); + dx /= 10; + dy /= 10; + ctx.lineTo((x - dy - srcLeft) * scale, (y + dx - srcTop) * scale); + ctx.lineTo((x + dx * 2 - srcLeft) * scale, (y + dy * 2 - srcTop) * scale); + ctx.lineTo((x + dy - srcLeft) * scale, (y - dx - srcTop) * scale); + ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); + ctx.strokeStyle = "rgba(0,75,0, 0.4)"; + ctx.stroke(); +} + +function drawCurveSpecials(curve, type) { + if (pt_labels) { + drawPoints(curve, type, pt_labels == 2); + } + if (control_lines != 0) { + drawControlLines(curve, type, control_lines); + } + if (curve_t) { + drawPointAtT(curve, type); + } + if (draw_midpoint) { + var mid = pointAtT(curve, type, 0.5); + drawPoint(mid.x, mid.y, true); + } + if (type == PATH_LINE) { + return; + } + if (draw_deriviatives > 0) { + var d = dxy_at_t(curve, type, 0); + drawArrow(curve[0], curve[1], d.x, d.y); + if (draw_deriviatives == 2) { + d = dxy_at_t(curve, type, 1); + if (type == PATH_CUBIC) { + drawArrow(curve[6], curve[7], d.x, d.y); + } else { + drawArrow(curve[4], curve[5], d.x, d.y); + } + } + if (draw_midpoint) { + var mid = pointAtT(curve, 0.5); + d = dxy_at_t(curve, type, 0.5); + drawArrow(mid.x, mid.y, d.x, d.y); + } + } + if (type != PATH_CUBIC) { + return; + } + if (draw_hodo == 1 || draw_hodo == 2) { + var hodo = hodograph(curve); + var hMinX = Math.min(0, hodo[0], hodo[2], hodo[4]); + var hMinY = Math.min(0, hodo[1], hodo[3], hodo[5]); + var hMaxX = Math.max(0, hodo[0], hodo[2], hodo[4]); + var hMaxY = Math.max(0, hodo[1], hodo[3], hodo[5]); + var hScaleX = hMaxX - hMinX > 0 ? ctx.canvas.width / (hMaxX - hMinX) : 1; + var hScaleY = hMaxY - hMinY > 0 ? ctx.canvas.height / (hMaxY - hMinY) : 1; + var hUnit = Math.min(hScaleX, hScaleY); + hUnit /= 2; + var hx = xoffset - hMinX * hUnit; + var hy = yoffset - hMinY * hUnit; + ctx.moveTo(hx + hodo[0] * hUnit, hy + hodo[1] * hUnit); + ctx.quadraticCurveTo( + hx + hodo[2] * hUnit, hy + hodo[3] * hUnit, + hx + hodo[4] * hUnit, hy + hodo[5] * hUnit); + ctx.strokeStyle = "red"; + ctx.stroke(); + if (draw_hodo == 1) { + drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY); + } + } + if (draw_hodo == 3) { + var hodo = hodograph2(curve); + var hMinX = Math.min(0, hodo[0], hodo[2]); + var hMinY = Math.min(0, hodo[1], hodo[3]); + var hMaxX = Math.max(0, hodo[0], hodo[2]); + var hMaxY = Math.max(0, hodo[1], hodo[3]); + var hScaleX = hMaxX - hMinX > 0 ? ctx.canvas.width / (hMaxX - hMinX) : 1; + var hScaleY = hMaxY - hMinY > 0 ? ctx.canvas.height / (hMaxY - hMinY) : 1; + var hUnit = Math.min(hScaleX, hScaleY); + hUnit /= 2; + var hx = xoffset - hMinX * hUnit; + var hy = yoffset - hMinY * hUnit; + ctx.moveTo(hx + hodo[0] * hUnit, hy + hodo[1] * hUnit); + ctx.lineTo(hx + hodo[2] * hUnit, hy + hodo[3] * hUnit); + ctx.strokeStyle = "red"; + ctx.stroke(); + drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY); + } + if (draw_sequence) { + var ymin = Math.min(curve[1], curve[3], curve[5], curve[7]); + for (var i = 0; i < 8; i+= 2) { + drawLabelX(ymin, i >> 1, curve[i]); + } + var xmin = Math.min(curve[0], curve[2], curve[4], curve[6]); + for (var i = 1; i < 8; i+= 2) { + drawLabelY(xmin, i >> 1, curve[i]); + } + } +} + +function logCurves(test) { + for (curves in test) { + var curve = test[curves]; + if (curve.length != 8) { + continue; + } + var str = "{{"; + for (i = 0; i < 8; i += 2) { + str += curve[i].toFixed(decimal_places) + "," + curve[i + 1].toFixed(decimal_places); + if (i < 6) { + str += "}, {"; + } + } + str += "}}"; + console.log(str); + } } function draw(test, lines, title) { ctx.fillStyle = "rgba(0,0,0, 0.1)"; ctx.font = "normal 50px Arial"; + ctx.textAlign = "left"; ctx.fillText(title, 50, 50); ctx.font = "normal 10px Arial"; ctx.lineWidth = "1.001"; "0.999"; - var moveX, moveY; var secondPath = test.length; var closeCount = 0; var logStart = -1; @@ -1154,14 +4813,24 @@ function draw(test, lines, title) { // find last active rec type at this step var curType = test[0]; var curStep = 0; - var lastIndex = test.length - 1; var hasOp = false; var lastActive = 0; + var lastAdd = 0; + var lastSect = 0; var lastSort = 0; var lastMark = 0; - var activeCount = 0; - var sortCount = 0; - var markCount = 0; + activeCount = 0; + addCount = 0; + sectCount = 0; + sortCount = 0; + markCount = 0; + activeMax = 0; + addMax = 0; + sectMax = 0; + sectMax2 = 0; + sortMax = 0; + markMax = 0; + lastIndex = test.length - 3; for (var testIndex = 0; testIndex < test.length; testIndex += 3) { var recType = test[testIndex]; if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { @@ -1171,72 +4840,140 @@ function draw(test, lines, title) { // if (curType == recType && curType != REC_TYPE_ADD) { // continue; // } - if (step_limit > 0 && curStep >= step_limit) { - break; - } + var inStepRange = step_limit == 0 || curStep < step_limit; curType = recType; if (recType == REC_TYPE_OP) { hasOp = true; continue; } - if (recType == REC_TYPE_SECT || recType == REC_TYPE_UNKNOWN) { + if (recType == REC_TYPE_UNKNOWN) { // these types do not advance step continue; } + var bumpStep = false; + var records = test[testIndex + 2]; + var fragType = records[0]; if (recType == REC_TYPE_ADD) { - var records = test[testIndex + 2]; if (records.length != 2) { console.log("expect only two elements: " + records.length); throw "stop execution"; } - var fragType = records[0]; if (fragType == ADD_MOVETO || fragType == ADD_CLOSE) { continue; } - if (!draw_add) { + ++addMax; + if (!draw_add || !inStepRange) { continue; } + lastAdd = testIndex; + ++addCount; + bumpStep = true; } - if ((recType == REC_TYPE_PATH || recType == REC_TYPE_COMPUTED) && hasOp) { + if (recType == REC_TYPE_PATH && hasOp) { secondPath = testIndex; } if (recType == REC_TYPE_ACTIVE) { - if (!draw_active) { + ++activeMax; + if (!draw_active || !inStepRange) { continue; } lastActive = testIndex; ++activeCount; + bumpStep = true; + } + if (recType == REC_TYPE_SECT) { + if (records.length != 2) { + console.log("expect only two elements: " + records.length); + throw "stop execution"; + } + ++sectMax; + var sectBump = 1; + switch (fragType) { + case INTERSECT_LINE: + case INTERSECT_QUAD_LINE: + case INTERSECT_QUAD: + case INTERSECT_SELF_CUBIC: + case INTERSECT_CUBIC_LINE: + case INTERSECT_CUBIC: + sectBump = 1; + break; + case INTERSECT_LINE_2: + case INTERSECT_QUAD_LINE_2: + case INTERSECT_QUAD_2: + case INTERSECT_CUBIC_LINE_2: + case INTERSECT_CUBIC_2: + sectBump = 2; + break; + case INTERSECT_LINE_NO: + case INTERSECT_QUAD_LINE_NO: + case INTERSECT_QUAD_NO: + case INTERSECT_SELF_CUBIC_NO: + case INTERSECT_CUBIC_LINE_NO: + case INTERSECT_CUBIC_NO: + sectBump = 0; + break; + case INTERSECT_CUBIC_LINE_3: + case INTERSECT_CUBIC_3: + sectBump = 3; + break; + case INTERSECT_CUBIC_4: + sectBump = 4; + break; + default: + console.log("missing case " + records.length); + throw "stop execution"; + } + sectMax2 += sectBump; + if (draw_intersection <= 1 || !inStepRange) { + continue; + } + lastSect = testIndex; + sectCount += sectBump; + bumpStep = true; } if (recType == REC_TYPE_SORT) { - if (!draw_sort) { + ++sortMax; + if (!draw_sort || !inStepRange) { continue; } lastSort = testIndex; ++sortCount; + bumpStep = true; } - if (recType = REC_TYPE_MARK) { - if (!draw_mark) { + if (recType == REC_TYPE_MARK) { + ++markMax; + if (!draw_mark || !inStepRange) { continue; } lastMark = testIndex; ++markCount; + bumpStep = true; + } + if (bumpStep) { + lastIndex = testIndex; + logStart = test[testIndex + 1]; + logRange = records.length / 2; + ++curStep; } - lastIndex = testIndex; - ++curStep; + } + stepMax = (draw_add ? addMax : 0) + (draw_active ? activeMax : 0) + + (draw_sort ? sortMax : 0) + (draw_mark ? markMax : 0) + + (draw_intersection == 2 ? sectMax : draw_intersection == 3 ? sectMax2 : 0); + if (stepMax == 0) { + stepMax = addMax + activeMax + sortMax + markMax; } drawnPts = []; drawnLines = []; drawnQuads = []; drawnCubics = []; + var pathIndex = 0; var opLetter = 'S'; - for (var testIndex = 0; testIndex <= lastIndex; testIndex += 3) { + for (var testIndex = lastIndex; testIndex >= 0; testIndex -= 3) { var recType = test[testIndex]; - logStart = test[testIndex + 1]; var records = test[testIndex + 2]; - logRange = records.length / 2; for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { var fragType = records[recordIndex]; - if (!typeof fragType == 'number' || fragType < 1 || recType > SORT_CUBIC) { + if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { console.log("unknown in range frag type: " + fragType); throw "stop execution"; } @@ -1247,44 +4984,52 @@ function draw(test, lines, title) { continue; } ctx.lineWidth = 1; - ctx.strokeStyle = testIndex < secondPath ? "black" : "red"; + ctx.strokeStyle = pathIndex == 0 ? "black" : "red"; ctx.fillStyle = "blue"; + var drawThis = false; switch (fragType) { case PATH_QUAD: - if (draw_computed & 1) { + if ((draw_computed & 5) == 1 || ((draw_computed & 4) != 0 + && (draw_computed & 1) == pathIndex)) { drawQuad(frags[0], frags[1], frags[2], frags[3], frags[4], frags[5]); + drawThis = true; } break; case PATH_CUBIC: - if (draw_computed & 2) { + if ((draw_computed & 6) == 2 || ((draw_computed & 4) != 0 + && (draw_computed & 1) != pathIndex)) { drawCubic(frags[0], frags[1], frags[2], frags[3], frags[4], frags[5], frags[6], frags[7]); + drawThis = true; } + ++pathIndex; + break; + case COMPUTED_SET_1: + pathIndex = 0; + break; + case COMPUTED_SET_2: + pathIndex = 1; break; default: console.log("unknown REC_TYPE_COMPUTED frag type: " + fragType); throw "stop execution"; } - if ((draw_computed & (fragType - PATH_LINE)) == 0) { + if (!drawThis) { break; } - if (pt_labels) { - drawPoints(frags, fragType); - } - if (control_lines) { - drawControlLines(frags, fragType); - } - if (curve_t) { - drawPointAtT(frags, fragType); - } + drawCurveSpecials(frags, fragType); break; case REC_TYPE_PATH: if (!draw_path) { continue; } + var firstPath = testIndex < secondPath; + if ((draw_path & (firstPath ? 1 : 2)) == 0) { + continue; + } ctx.lineWidth = 1; - ctx.strokeStyle = testIndex < secondPath ? "black" : "red"; + ctx.strokeStyle = firstPath ? "black" : "red"; ctx.fillStyle = "blue"; switch (fragType) { case PATH_LINE: @@ -1302,15 +5047,7 @@ function draw(test, lines, title) { console.log("unknown REC_TYPE_PATH frag type: " + fragType); throw "stop execution"; } - if (pt_labels) { - drawPoints(frags, fragType); - } - if (control_lines) { - drawControlLines(frags, fragType); - } - if (curve_t) { - drawPointAtT(frags, fragType); - } + drawCurveSpecials(frags, fragType); break; case REC_TYPE_OP: switch (fragType) { @@ -1324,7 +5061,7 @@ function draw(test, lines, title) { } break; case REC_TYPE_ACTIVE: - if (!draw_active || testIndex < lastActive) { + if (!draw_active || (step_limit > 0 && testIndex < lastActive)) { continue; } var x1 = frags[SPAN_X1]; @@ -1373,24 +5110,22 @@ function draw(test, lines, title) { : "rgba(127,0,127, 0.3)"; switch (fragType) { case ADD_MOVETO: - moveX = frags[0]; - moveY = frags[1]; break; case ADD_LINETO: - drawLine(moveX, moveY, frags[0], frags[1], true); - moveX = frags[0]; - moveY = frags[1]; + if (step_limit == 0 || testIndex >= lastAdd) { + drawLine(frags[0], frags[1], frags[2], frags[3]); + } break; case ADD_QUADTO: - drawQuad(moveX, moveY, frags[0], frags[1], frags[2], frags[3], true); - moveX = frags[2]; - moveY = frags[3]; + if (step_limit == 0 || testIndex >= lastAdd) { + drawQuad(frags[0], frags[1], frags[2], frags[3], frags[4], frags[5]); + } break; case ADD_CUBICTO: - drawCubic(moveX, moveY, frags[0], frags[1], frags[2], frags[3], - frags[4], frags[5], true); - moveX = frags[4]; - moveY = frags[5]; + if (step_limit == 0 || testIndex >= lastAdd) { + drawCubic(frags[0], frags[1], frags[2], frags[3], + frags[4], frags[5], frags[6], frags[7]); + } break; case ADD_CLOSE: ++closeCount; @@ -1404,116 +5139,191 @@ function draw(test, lines, title) { if (!draw_intersection) { continue; } + if (draw_intersection != 1 && (step_limit > 0 && testIndex < lastSect)) { + continue; + } + // draw_intersection == 1 : show all + // draw_intersection == 2 : step == 0 ? show all : show intersection line #step + // draw_intersection == 3 : step == 0 ? show all : show intersection #step ctx.lineWidth = 1; ctx.strokeStyle = "rgba(0,0,255, 0.3)"; ctx.fillStyle = "blue"; var f = []; + var c1s; + var c1l; + var c2s; + var c2l; switch (fragType) { case INTERSECT_LINE: f.push(5, 6, 0, 7); + c1s = 1; c1l = 4; c2s = 8; c2l = 4; break; case INTERSECT_LINE_2: f.push(5, 6, 0, 10); f.push(8, 9, 7, 15); + c1s = 1; c1l = 4; c2s = 11; c2l = 4; break; case INTERSECT_LINE_NO: + c1s = 0; c1l = 4; c2s = 4; c2l = 4; break; case INTERSECT_QUAD_LINE: f.push(7, 8, 0, 9); + c1s = 1; c1l = 6; c2s = 10; c2l = 4; break; case INTERSECT_QUAD_LINE_2: f.push(7, 8, 0, 12); f.push(10, 11, 9, 17); + c1s = 1; c1l = 6; c2s = 13; c2l = 4; break; case INTERSECT_QUAD_LINE_NO: + c1s = 0; c1l = 6; c2s = 6; c2l = 4; break; case INTERSECT_QUAD: f.push(7, 8, 0, 9); + c1s = 1; c1l = 6; c2s = 10; c2l = 6; break; case INTERSECT_QUAD_2: f.push(7, 8, 0, 12); f.push(10, 11, 9, 19); + c1s = 1; c1l = 6; c2s = 13; c2l = 6; break; case INTERSECT_QUAD_NO: + c1s = 0; c1l = 6; c2s = 6; c2l = 6; break; case INTERSECT_SELF_CUBIC: f.push(9, 10, 0, 11); + c1s = 1; c1l = 8; c2s = 0; c2l = 0; break; case INTERSECT_SELF_CUBIC_NO: + c1s = 0; c1l = 8; c2s = 0; c2l = 0; break; case INTERSECT_CUBIC_LINE: f.push(9, 10, 0, 11); + c1s = 1; c1l = 8; c2s = 12; c2l = 4; break; case INTERSECT_CUBIC_LINE_2: f.push(9, 10, 0, 14); f.push(12, 13, 11, 19); + c1s = 1; c1l = 8; c2s = 15; c2l = 4; break; case INTERSECT_CUBIC_LINE_3: f.push(9, 10, 0, 17); f.push(12, 13, 11, 22); f.push(15, 16, 14, 23); + c1s = 1; c1l = 8; c2s = 18; c2l = 4; break; case INTERSECT_CUBIC_LINE_NO: + c1s = 0; c1l = 8; c2s = 8; c2l = 4; break; case INTERSECT_CUBIC: f.push(9, 10, 0, 11); + c1s = 1; c1l = 8; c2s = 12; c2l = 8; break; case INTERSECT_CUBIC_2: f.push(9, 10, 0, 14); f.push(12, 13, 11, 23); + c1s = 1; c1l = 8; c2s = 15; c2l = 8; break; case INTERSECT_CUBIC_3: f.push(9, 10, 0, 17); f.push(12, 13, 11, 26); f.push(15, 16, 14, 27); + c1s = 1; c1l = 8; c2s = 18; c2l = 8; break; case INTERSECT_CUBIC_4: f.push(9, 10, 0, 20); f.push(12, 13, 11, 29); f.push(15, 16, 14, 30); f.push(18, 19, 17, 31); + c1s = 1; c1l = 8; c2s = 21; c2l = 8; break; case INTERSECT_CUBIC_NO: + c1s = 0; c1l = 8; c2s = 8; c2l = 8; break; default: console.log("unknown REC_TYPE_SECT frag type: " + fragType); throw "stop execution"; } + if (draw_intersection != 1) { + switch (c1l) { + case 4: + drawLine(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]); + break; + case 6: + drawQuad(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], + frags[c1s + 4], frags[c1s + 5]); + break; + case 8: + drawCubic(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], + frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]); + break; + } + switch (c2l) { + case 0: + break; + case 4: + drawLine(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]); + break; + case 6: + drawQuad(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], + frags[c2s + 4], frags[c2s + 5]); + break; + case 8: + drawCubic(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], + frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]); + break; + } + } for (var idx = 0; idx < f.length; idx += 4) { - drawPoint(frags[f[idx]], frags[f[idx + 1]]); + if (draw_intersection != 3 || idx == lastSect - testIndex) { + drawPoint(frags[f[idx]], frags[f[idx + 1]], true); + } } if (!draw_intersectT) { break; } ctx.fillStyle = "red"; for (var idx = 0; idx < f.length; idx += 4) { - drawTAtPointUp(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 2]]); - drawTAtPointDown(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 3]]); + if (draw_intersection != 3 || idx == lastSect - testIndex) { + drawTAtPointUp(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 2]]); + drawTAtPointDown(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 3]]); + } } break; case REC_TYPE_SORT: - if (!draw_sort || testIndex < lastSort) { + if (!draw_sort || (step_limit > 0 && testIndex < lastSort)) { continue; } ctx.lineWidth = 3; ctx.strokeStyle = "rgba(127,127,0, 0.5)"; switch (fragType) { case SORT_LINE: + case SORT_LINE_UNSORTABLE: drawLinePartial(frags[1], frags[2], frags[3], frags[4], frags[5], frags[6]); break; case SORT_QUAD: + case SORT_QUAD_UNSORTABLE: drawQuadPartial(frags[1], frags[2], frags[3], frags[4], frags[5], frags[6], frags[7], frags[8]); break; case SORT_CUBIC: + case SORT_CUBIC_UNSORTABLE: drawCubicPartial(frags[1], frags[2], frags[3], frags[4], frags[5], frags[6], frags[7], frags[8], frags[9], frags[10]); break; + case SORT_LINE_COMPACT: + case SORT_QUAD_COMPACT: + case SORT_CUBIC_COMPACT: + // unsupported + break; + default: + console.log("unknown REC_TYPE_SORT frag type: " + fragType); + throw "stop execution"; } break; case REC_TYPE_MARK: - if (!draw_mark || testIndex < lastMark) { + if (!draw_mark || (step_limit > 0 && testIndex < lastMark)) { continue; } ctx.lineWidth = 3; @@ -1521,86 +5331,196 @@ function draw(test, lines, title) { "rgba(127,0,127, 0.5)" : "rgba(127,127,0, 0.5)"; switch (fragType) { case MARK_LINE: - drawLinePartial(frags[1], frags[2], frags[3], frags[4], - frags[5], frags[9]); - break; - case MARK_QUAD: - drawQuadPartial(frags[1], frags[2], frags[3], frags[4], - frags[5], frags[6], frags[7], frags[11]); - break; - case MARK_CUBIC: - drawCubicPartial(frags[1], frags[2], frags[3], frags[4], - frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); - break; case MARK_DONE_LINE: + case MARK_UNSORTABLE_LINE: drawLinePartial(frags[1], frags[2], frags[3], frags[4], frags[5], frags[9]); break; + case MARK_QUAD: case MARK_DONE_QUAD: + case MARK_UNSORTABLE_QUAD: drawQuadPartial(frags[1], frags[2], frags[3], frags[4], frags[5], frags[6], frags[7], frags[11]); break; + case MARK_CUBIC: case MARK_DONE_CUBIC: + case MARK_UNSORTABLE_CUBIC: drawCubicPartial(frags[1], frags[2], frags[3], frags[4], frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); break; + default: + console.log("unknown REC_TYPE_MARK frag type: " + fragType); + throw "stop execution"; } break; default: continue; } } + switch (recType) { + case REC_TYPE_SORT: + if (!draw_sort || (step_limit > 0 && testIndex < lastSort)) { + break; + } + var angles = []; // use tangent lines to describe arcs + var windFrom = []; + var windTo = []; + var opp = []; + var minXY = Number.MAX_VALUE; + var partial; + for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { + var fragType = records[recordIndex]; + var frags = records[recordIndex + 1]; + var idx = 10; + switch (fragType) { + case SORT_LINE: + case SORT_LINE_UNSORTABLE: + partial = linePartial(frags[1], frags[2], frags[3], frags[4], + frags[5], frags[6]); + break; + case SORT_QUAD: + case SORT_QUAD_UNSORTABLE: + partial = quadPartial(frags[1], frags[2], frags[3], frags[4], + frags[5], frags[6], frags[7], frags[8]); + idx += 2; + break; + case SORT_CUBIC: + case SORT_CUBIC_UNSORTABLE: + partial = cubicPartial(frags[1], frags[2], frags[3], frags[4], + frags[5], frags[6], frags[7], frags[8], frags[9], frags[10]); + idx += 4; + break; + case SORT_LINE_COMPACT: + case SORT_QUAD_COMPACT: + case SORT_CUBIC_COMPACT: + // unsupported + continue; + default: + console.log("unknown REC_TYPE_SORT frag type: " + fragType); + throw "stop execution"; + } + var dx = boundsWidth(partial); + var dy = boundsHeight(partial); + minXY = Math.min(minXY, dx * dx + dy * dy); + angles.push(tangent(partial)); + windFrom.push(frags[idx]); + windTo.push(frags[idx + 1]); + opp.push(frags[idx + 5]); + } + var radius = Math.sqrt(minXY) / 2 * scale; + radius = Math.min(50, radius); + var centerX = (partial[0] - srcLeft) * scale; + var centerY = (partial[1] - srcTop) * scale; + ctx.lineWidth = 1; + ctx.strokeStyle = "rgba(127,0,171, 0.5)"; + ctx.fillStyle = "rgba(0,0,0, 0.5)"; + ctx.font = "normal 10px Arial"; + ctx.textAlign = "center"; + for (var angleIndex = 0; angleIndex < angles.length; ++angleIndex) { + var angleParts = [ + angles[(angleIndex + angles.length - 1) % angles.length], + angles[angleIndex], + angles[(angleIndex + 1) % angles.length] + ]; + var angleStart = (angleParts[0] + angleParts[1]) / 2; + if (angleParts[0] > angleParts[1]) { + angleStart -= Math.PI; + } + var angleEnd = (angleParts[1] + angleParts[2]) / 2; + if (angleParts[1] > angleParts[2]) { + angleEnd -= Math.PI; + } + ctx.beginPath(); + ctx.arc(centerX, centerY, radius + (opp[angleIndex] ? 10 : 0), + Math.PI * 2 - angleStart - Math.PI / 18, Math.PI * 2 - angleEnd + Math.PI / 18, true); + ctx.stroke(); + var tx = centerX + Math.cos(angleStart) * (radius + (opp[angleIndex] ? 10 : 0)); + var ty = centerY - Math.sin(angleStart) * (radius + (opp[angleIndex] ? 10 : 0)); + ctx.fillText(windFrom[angleIndex], tx, ty + 5); + tx = centerX + Math.cos(angleEnd) * (radius + (opp[angleIndex] ? 10 : 0)); + ty = centerY - Math.sin(angleEnd) * (radius + (opp[angleIndex] ? 10 : 0)); + ctx.fillText(windTo[angleIndex], tx, ty + 5); + } + break; + default: + break; + } } if (draw_log && logStart >= 0) { ctx.font = "normal 10px Arial"; + ctx.textAlign = "left"; ctx.beginPath(); - ctx.rect(50,550, 200,30); + var top = ctx.canvas.height - 20 - (logRange + 2) * 10; + ctx.rect(50, top, ctx.canvas.width-100, (logRange + 2) * 10); ctx.fillStyle = "white"; ctx.fill(); ctx.fillStyle = "rgba(0,0,0, 0.5)"; if (logStart > 0) { - ctx.fillText(lines[logStart - 1], 50, 558); + ctx.fillText(lines[logStart - 1], 50, top + 8); } ctx.fillStyle = "black"; for (var idx = 0; idx < logRange; ++idx) { - ctx.fillText(lines[logStart + idx], 50, 568 + 10 * idx); + ctx.fillText(lines[logStart + idx], 50, top + 18 + 10 * idx); } ctx.fillStyle = "rgba(0,0,0, 0.5)"; if (logStart + logRange < lines.length) { - ctx.fillText(lines[logStart + logRange], 50, 568 + 10 * logRange); + ctx.fillText(lines[logStart + logRange], 50, top + 18 + 10 * logRange); } } if (draw_legend) { var pos = 0; - drawBox(pos++, "yellow", "black", opLetter, true, ''); - drawBox(pos++, "rgba(0,0,255, 0.3)", "black", "X", draw_intersection, intersectionKey); - drawBox(pos++, "rgba(0,0,255, 0.3)", "black", "+", draw_add, addKey); - drawBox(pos++, "rgba(0,0,255, 0.3)", "black", activeCount, draw_active, activeKey); - drawBox(pos++, "rgba(127,127,0, 0.3)", "black", sortCount, draw_sort, sortKey); - drawBox(pos++, "rgba(127,0,127, 0.3)", "black", markCount, draw_mark, markKey); - drawBox(pos++, "black", "white", "P", draw_path, pathKey); - var computedLabel = ['Q', 'Q', 'C', 'QC']; - drawBox(pos++, "rgba(0,63,0, 0.7)", "white", (new Array('Q', 'Q', 'C', 'QC'))[draw_computed], + var drawSomething = draw_add | draw_active | draw_sort | draw_mark; + // drawBox(pos++, "yellow", "black", opLetter, true, ''); + drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_intersection > 1 ? sectCount : sectMax2, draw_intersection, intersectionKey); + drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_add ? addCount : addMax, draw_add, addKey); + drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_active ? activeCount : activeMax, draw_active, activeKey); + drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_sort ? sortCount : sortMax, draw_sort, sortKey); + drawBox(pos++, "rgba(127,0,127, 0.3)", "black", draw_mark ? markCount : markMax, draw_mark, markKey); + drawBox(pos++, "black", "white", + (new Array('P', 'P1', 'P2', 'P'))[draw_path], draw_path != 0, pathKey); + drawBox(pos++, "rgba(0,63,0, 0.7)", "white", + (new Array('Q', 'Q', 'C', 'QC', 'Qc', 'Cq'))[draw_computed], draw_computed != 0, computedKey); - drawBox(pos++, "green", "black", curStep, true, ''); - drawBox(pos++, "green", "black", step_limit, true, ''); - drawBox(pos++, "red", "black", lastIndex, true, ''); - drawBox(pos++, "red", "black", test.length - 1, true, ''); + drawBox(pos++, "green", "black", step_limit, drawSomething, ''); + drawBox(pos++, "green", "black", stepMax, drawSomething, ''); + drawBox(pos++, "red", "black", lastIndex, drawSomething & draw_log, ''); + drawBox(pos++, "red", "black", test.length - 1, drawSomething & draw_log, ''); if (curve_t) { drawCurveTControl(); } + ctx.font = "normal 20px Arial"; + ctx.fillStyle = "rgba(0,0,0, 0.3)"; + ctx.textAlign = "right"; + ctx.fillText(scale.toFixed(decimal_places) + 'x' , ctx.canvas.width - 10, ctx.canvas.height - 5); + } + if (draw_hints) { + ctx.font = "normal 10px Arial"; + ctx.fillStyle = "rgba(0,0,0, 0.5)"; + ctx.textAlign = "right"; + var y = 4; + ctx.fillText("control lines : " + controlLinesKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("curve t : " + curveTKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("deriviatives : " + deriviativesKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("intersect t : " + intersectTKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("hodo : " + hodoKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("log : " + logKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("log curve : " + logCurvesKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("mid point : " + midpointKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("points : " + ptsKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("sequence : " + sequenceKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); + ctx.fillText("xy : " + xyKey, ctx.canvas.width - 10, pos * 50 + y++ * 10); } } function drawBox(y, backC, foreC, str, enable, label) { ctx.beginPath(); ctx.fillStyle = backC; - ctx.rect(ctx.canvas.width - 40, y * 50 + 50, 40, 30); + ctx.rect(ctx.canvas.width - 40, y * 50 + 10, 40, 30); ctx.fill(); ctx.font = "normal 16px Arial"; ctx.fillStyle = foreC; ctx.textAlign = "center"; - ctx.fillText(str, ctx.canvas.width - 20, y * 50 + 72); + ctx.fillText(str, ctx.canvas.width - 20, y * 50 + 32); if (!enable) { ctx.fillStyle = "rgba(255,255,255, 0.5)"; ctx.fill(); @@ -1608,9 +5528,8 @@ function drawBox(y, backC, foreC, str, enable, label) { if (label != '') { ctx.font = "normal 9px Arial"; ctx.fillStyle = "black"; - ctx.fillText(label, ctx.canvas.width - 47, y * 50 + 80); + ctx.fillText(label, ctx.canvas.width - 47, y * 50 + 40); } - ctx.textAlign = "left"; } function drawCurveTControl() { @@ -1629,6 +5548,7 @@ function drawCurveTControl() { ctx.fill(); var num = curveT.toFixed(decimal_places); ctx.font = "normal 10px Arial"; + ctx.textAlign = "left"; ctx.fillText(num, ctx.canvas.width - 78, ty); } @@ -1653,6 +5573,12 @@ function ptInTControl() { } function drawTop() { + if (tests[testIndex] == null) { + var str = testDivs[testIndex].firstChild.data; + parse_all(str); + var title = testDivs[testIndex].id.toString(); + testTitles[testIndex] = title; + } init(tests[testIndex]); redraw(); } @@ -1670,19 +5596,22 @@ var addKey = 'd'; var centerKey = 'c'; var computedKey = 'q'; var computedBackKey = 'Q'; +var controlLinesBackKey = 'V'; var controlLinesKey = 'v'; var curveTKey = 'u'; +var deriviativesKey = 'f'; +var hodoKey = 'h'; var intersectTKey = 't'; +var intersectionBackKey = 'I'; var intersectionKey = 'i'; -var infoKey = 'f'; var logKey = 'l'; +var logCurvesKey = 'z'; var markKey = 'm'; -var nextBy10Key = 'N'; -var nextKey = 'n'; +var midpointKey = 'k'; var pathKey = 'b'; -var previousBy10Key = 'P'; -var previousKey = 'p'; +var pathBackKey = 'B'; var ptsKey = 'x'; +var sequenceKey = 'j'; var sortKey = 'o'; var stepBackKey = 'S'; var stepKey = 's'; @@ -1708,42 +5637,60 @@ function doKeyPress(evt) { draw_active ^= true; redraw(); break; + case addKey: + draw_add ^= true; + redraw(); + break; case centerKey: setScale(); redraw(); break; - case controlLinesKey: - control_lines ^= true; + case controlLinesBackKey: + control_lines = (control_lines + 3) % 4; redraw(); break; - case curveTKey: - curve_t ^= true; - redraw(); + case controlLinesKey: + control_lines = (control_lines + 1) % 4; + redraw(); break; case computedBackKey: - draw_computed = (draw_computed - 1) & 3; // four-state + draw_computed = (draw_computed + 5) % 6; redraw(); break; case computedKey: - draw_computed = (draw_computed + 1) & 3; // four-state + draw_computed = (draw_computed + 1) % 6; redraw(); break; - case pathKey: - draw_path ^= true; - redraw(); + case curveTKey: + curve_t ^= true; + if (curve_t) { + draw_legend = true; + } + redraw(); break; - case addKey: - draw_add ^= true; - redraw(); + case deriviativesKey: + draw_deriviatives = (draw_deriviatives + 1) % 3; + redraw(); break; - case infoKey: - info_mode ^= true; + case hodoKey: + draw_hodo = (draw_hodo + 1) % 4; redraw(); break; + case intersectionBackKey: + draw_intersection = (draw_intersection + 3) % 4; + redraw(); + break; case intersectionKey: - draw_intersection ^= true; + draw_intersection = (draw_intersection + 1) % 4; redraw(); break; + case intersectTKey: + draw_intersectT ^= true; + redraw(); + break; + case logCurvesKey: + logCurves(tests[testIndex]); + break; case logKey: draw_log ^= true; redraw(); @@ -1752,41 +5699,42 @@ function doKeyPress(evt) { draw_mark ^= true; redraw(); break; - case nextBy10Key: - testIndex += 9; - case nextKey: - if (++testIndex >= tests.length) - testIndex = 0; - drawTop(); + case midpointKey: + draw_midpoint ^= true; + redraw(); break; - case previousBy10Key: - testIndex -= 9; - case previousKey: - if (--testIndex < 0) - testIndex = tests.length - 1; - drawTop(); + case pathKey: + draw_path = (draw_path + 1) % 4; + redraw(); break; - case stepKey: - step_limit++; + case pathBackKey: + draw_path = (draw_path + 3) % 4; + redraw(); + break; + case ptsKey: + pt_labels = (pt_labels + 1) % 3; redraw(); break; - case stepBackKey: - step_limit--; - if (step_limit < 0) { - step_limit = 0; - } + case sequenceKey: + draw_sequence ^= true; redraw(); break; case sortKey: draw_sort ^= true; redraw(); break; - case intersectTKey: - draw_intersectT ^= true; + case stepKey: + step_limit++; + if (step_limit > stepMax) { + step_limit = stepMax; + } redraw(); break; - case ptsKey: - pt_labels ^= true; + case stepBackKey: + step_limit--; + if (step_limit < 0) { + step_limit = 0; + } redraw(); break; case xyKey: @@ -1804,14 +5752,42 @@ function doKeyPress(evt) { calcLeftTop(); redraw(); break; - case '/': case '?': + draw_hints ^= true; + if (draw_hints && !draw_legend) { + draw_legend = true; + } + redraw(); + break; + case '/': draw_legend ^= true; redraw(); break; } } +function doKeyDown(evt) { + var char = evt.keyCode; + switch (char) { + case 37: // left arrow + if (evt.shiftKey) { + testIndex -= 9; + } + if (--testIndex < 0) + testIndex = tests.length - 1; + drawTop(); + break; + case 39: // right arrow + if (evt.shiftKey) { + testIndex += 9; + } + if (++testIndex >= tests.length) + testIndex = 0; + drawTop(); + break; + } +} + function calcXY() { var e = window.event; var tgt = e.target || e.srcElement; @@ -1841,23 +5817,23 @@ function handleMouseOver() { } var num = mouseX.toFixed(decimal_places) + ", " + mouseY.toFixed(decimal_places); ctx.beginPath(); - ctx.rect(300,100,200,10); + ctx.rect(300,100,num.length * 6,10); ctx.fillStyle="white"; ctx.fill(); + ctx.font = "normal 10px Arial"; ctx.fillStyle="black"; + ctx.textAlign = "left"; ctx.fillText(num, 300, 108); } function start() { - for (i = 0; i < testDivs.length; ++i) { - var title = testDivs[i].id.toString(); - var str = testDivs[i].firstChild.data; - parse_all(str, title); - // parse_debugShowActiveSpans(str, title); - // parse_intersections(str, title); + for (var i = 0; i < testDivs.length; ++i) { + tests[i] = null; } + testIndex = 0; drawTop(); window.addEventListener('keypress', doKeyPress, true); + window.addEventListener('keydown', doKeyDown, true); window.onresize = function() { drawTop(); } |