/ src / snapshots / linesweeper__topology__tests__nested_squares.snap
linesweeper__topology__tests__nested_squares.snap
  1  ---
  2  source: src/topology.rs
  3  expression: "(&top, contours, top.build_scan_line_orders())"
  4  ---
  5  (Topology(
  6    eps: 0.01,
  7    tag: [
  8      true,
  9      true,
 10      true,
 11      true,
 12      false,
 13      false,
 14      false,
 15      false,
 16    ],
 17    open_segs: [
 18      [],
 19      [],
 20      [],
 21      [],
 22      [],
 23      [],
 24      [],
 25      [],
 26    ],
 27    winding: OutputSegVec(
 28      inner: [
 29        HalfSegmentWindingNumbers(
 30          counter_clockwise: BinaryWindingNumber(
 31            shape_a: -1,
 32            shape_b: 0,
 33          ),
 34          clockwise: BinaryWindingNumber(
 35            shape_a: 0,
 36            shape_b: 0,
 37          ),
 38        ),
 39        HalfSegmentWindingNumbers(
 40          counter_clockwise: BinaryWindingNumber(
 41            shape_a: 0,
 42            shape_b: 0,
 43          ),
 44          clockwise: BinaryWindingNumber(
 45            shape_a: -1,
 46            shape_b: 0,
 47          ),
 48        ),
 49        HalfSegmentWindingNumbers(
 50          counter_clockwise: BinaryWindingNumber(
 51            shape_a: 0,
 52            shape_b: 0,
 53          ),
 54          clockwise: BinaryWindingNumber(
 55            shape_a: -1,
 56            shape_b: 0,
 57          ),
 58        ),
 59        HalfSegmentWindingNumbers(
 60          counter_clockwise: BinaryWindingNumber(
 61            shape_a: -1,
 62            shape_b: -1,
 63          ),
 64          clockwise: BinaryWindingNumber(
 65            shape_a: -1,
 66            shape_b: 0,
 67          ),
 68        ),
 69        HalfSegmentWindingNumbers(
 70          counter_clockwise: BinaryWindingNumber(
 71            shape_a: -1,
 72            shape_b: 0,
 73          ),
 74          clockwise: BinaryWindingNumber(
 75            shape_a: -1,
 76            shape_b: -1,
 77          ),
 78        ),
 79        HalfSegmentWindingNumbers(
 80          counter_clockwise: BinaryWindingNumber(
 81            shape_a: -1,
 82            shape_b: 0,
 83          ),
 84          clockwise: BinaryWindingNumber(
 85            shape_a: -1,
 86            shape_b: -1,
 87          ),
 88        ),
 89        HalfSegmentWindingNumbers(
 90          counter_clockwise: BinaryWindingNumber(
 91            shape_a: -1,
 92            shape_b: -1,
 93          ),
 94          clockwise: BinaryWindingNumber(
 95            shape_a: -1,
 96            shape_b: 0,
 97          ),
 98        ),
 99        HalfSegmentWindingNumbers(
100          counter_clockwise: BinaryWindingNumber(
101            shape_a: -1,
102            shape_b: 0,
103          ),
104          clockwise: BinaryWindingNumber(
105            shape_a: 0,
106            shape_b: 0,
107          ),
108        ),
109      ],
110    ),
111    points: PointVec(
112      inner: [
113        Point(
114          y: -2.0,
115          x: -2.0,
116        ),
117        Point(
118          y: -2.0,
119          x: 2.0,
120        ),
121        Point(
122          y: -1.0,
123          x: -1.0,
124        ),
125        Point(
126          y: -1.0,
127          x: 1.0,
128        ),
129        Point(
130          y: 1.0,
131          x: -1.0,
132        ),
133        Point(
134          y: 1.0,
135          x: 1.0,
136        ),
137        Point(
138          y: 2.0,
139          x: -2.0,
140        ),
141        Point(
142          y: 2.0,
143          x: 2.0,
144        ),
145      ],
146    ),
147    point_idx: HalfOutputSegVec(
148      start: [
149        PointIdx(0),
150        PointIdx(0),
151        PointIdx(1),
152        PointIdx(2),
153        PointIdx(2),
154        PointIdx(3),
155        PointIdx(4),
156        PointIdx(6),
157      ],
158      end: [
159        PointIdx(6),
160        PointIdx(1),
161        PointIdx(7),
162        PointIdx(4),
163        PointIdx(3),
164        PointIdx(5),
165        PointIdx(5),
166        PointIdx(7),
167      ],
168    ),
169    point_neighbors: HalfOutputSegVec(
170      start: [
171        PointNeighbors(
172          clockwise: HalfOutputSegIdx(
173            idx: OutputSegIdx(1),
174            first_half: true,
175          ),
176          counter_clockwise: HalfOutputSegIdx(
177            idx: OutputSegIdx(1),
178            first_half: true,
179          ),
180        ),
181        PointNeighbors(
182          clockwise: HalfOutputSegIdx(
183            idx: OutputSegIdx(0),
184            first_half: true,
185          ),
186          counter_clockwise: HalfOutputSegIdx(
187            idx: OutputSegIdx(0),
188            first_half: true,
189          ),
190        ),
191        PointNeighbors(
192          clockwise: HalfOutputSegIdx(
193            idx: OutputSegIdx(1),
194            first_half: false,
195          ),
196          counter_clockwise: HalfOutputSegIdx(
197            idx: OutputSegIdx(1),
198            first_half: false,
199          ),
200        ),
201        PointNeighbors(
202          clockwise: HalfOutputSegIdx(
203            idx: OutputSegIdx(4),
204            first_half: true,
205          ),
206          counter_clockwise: HalfOutputSegIdx(
207            idx: OutputSegIdx(4),
208            first_half: true,
209          ),
210        ),
211        PointNeighbors(
212          clockwise: HalfOutputSegIdx(
213            idx: OutputSegIdx(3),
214            first_half: true,
215          ),
216          counter_clockwise: HalfOutputSegIdx(
217            idx: OutputSegIdx(3),
218            first_half: true,
219          ),
220        ),
221        PointNeighbors(
222          clockwise: HalfOutputSegIdx(
223            idx: OutputSegIdx(4),
224            first_half: false,
225          ),
226          counter_clockwise: HalfOutputSegIdx(
227            idx: OutputSegIdx(4),
228            first_half: false,
229          ),
230        ),
231        PointNeighbors(
232          clockwise: HalfOutputSegIdx(
233            idx: OutputSegIdx(3),
234            first_half: false,
235          ),
236          counter_clockwise: HalfOutputSegIdx(
237            idx: OutputSegIdx(3),
238            first_half: false,
239          ),
240        ),
241        PointNeighbors(
242          clockwise: HalfOutputSegIdx(
243            idx: OutputSegIdx(0),
244            first_half: false,
245          ),
246          counter_clockwise: HalfOutputSegIdx(
247            idx: OutputSegIdx(0),
248            first_half: false,
249          ),
250        ),
251      ],
252      end: [
253        PointNeighbors(
254          clockwise: HalfOutputSegIdx(
255            idx: OutputSegIdx(7),
256            first_half: true,
257          ),
258          counter_clockwise: HalfOutputSegIdx(
259            idx: OutputSegIdx(7),
260            first_half: true,
261          ),
262        ),
263        PointNeighbors(
264          clockwise: HalfOutputSegIdx(
265            idx: OutputSegIdx(2),
266            first_half: true,
267          ),
268          counter_clockwise: HalfOutputSegIdx(
269            idx: OutputSegIdx(2),
270            first_half: true,
271          ),
272        ),
273        PointNeighbors(
274          clockwise: HalfOutputSegIdx(
275            idx: OutputSegIdx(7),
276            first_half: false,
277          ),
278          counter_clockwise: HalfOutputSegIdx(
279            idx: OutputSegIdx(7),
280            first_half: false,
281          ),
282        ),
283        PointNeighbors(
284          clockwise: HalfOutputSegIdx(
285            idx: OutputSegIdx(6),
286            first_half: true,
287          ),
288          counter_clockwise: HalfOutputSegIdx(
289            idx: OutputSegIdx(6),
290            first_half: true,
291          ),
292        ),
293        PointNeighbors(
294          clockwise: HalfOutputSegIdx(
295            idx: OutputSegIdx(5),
296            first_half: true,
297          ),
298          counter_clockwise: HalfOutputSegIdx(
299            idx: OutputSegIdx(5),
300            first_half: true,
301          ),
302        ),
303        PointNeighbors(
304          clockwise: HalfOutputSegIdx(
305            idx: OutputSegIdx(6),
306            first_half: false,
307          ),
308          counter_clockwise: HalfOutputSegIdx(
309            idx: OutputSegIdx(6),
310            first_half: false,
311          ),
312        ),
313        PointNeighbors(
314          clockwise: HalfOutputSegIdx(
315            idx: OutputSegIdx(5),
316            first_half: false,
317          ),
318          counter_clockwise: HalfOutputSegIdx(
319            idx: OutputSegIdx(5),
320            first_half: false,
321          ),
322        ),
323        PointNeighbors(
324          clockwise: HalfOutputSegIdx(
325            idx: OutputSegIdx(2),
326            first_half: false,
327          ),
328          counter_clockwise: HalfOutputSegIdx(
329            idx: OutputSegIdx(2),
330            first_half: false,
331          ),
332        ),
333      ],
334    ),
335    deleted: OutputSegVec(
336      inner: [
337        false,
338        false,
339        false,
340        false,
341        false,
342        false,
343        false,
344        false,
345      ],
346    ),
347    scan_west: OutputSegVec(
348      inner: [
349        None,
350        Some(OutputSegIdx(0)),
351        Some(OutputSegIdx(0)),
352        Some(OutputSegIdx(0)),
353        Some(OutputSegIdx(3)),
354        Some(OutputSegIdx(3)),
355        Some(OutputSegIdx(0)),
356        None,
357      ],
358    ),
359    scan_east: OutputSegVec(
360      inner: [
361        None,
362        None,
363        None,
364        None,
365        None,
366        Some(OutputSegIdx(2)),
367        None,
368        None,
369      ],
370    ),
371    scan_after: [
372      (1.0, Some(OutputSegIdx(0)), Some(OutputSegIdx(2))),
373    ],
374    orig_seg: OutputSegVec(
375      inner: [
376        SegIdx(3),
377        SegIdx(0),
378        SegIdx(1),
379        SegIdx(7),
380        SegIdx(4),
381        SegIdx(5),
382        SegIdx(6),
383        SegIdx(2),
384      ],
385    ),
386    positively_oriented: OutputSegVec(
387      inner: [
388        false,
389        true,
390        true,
391        false,
392        true,
393        true,
394        false,
395        false,
396      ],
397    ),
398  ), Contours(
399    contours: [
400      Contour(
401        path: BezPath([
402          MoveTo(Point(
403            x: -2.0,
404            y: -2.0,
405          )),
406          LineTo(Point(
407            x: -2.0,
408            y: 2.0,
409          )),
410          LineTo(Point(
411            x: 2.0,
412            y: 2.0,
413          )),
414          LineTo(Point(
415            x: 2.0,
416            y: -2.0,
417          )),
418          LineTo(Point(
419            x: -2.0,
420            y: -2.0,
421          )),
422          ClosePath,
423        ]),
424        parent: None,
425        outer: true,
426      ),
427      Contour(
428        path: BezPath([
429          MoveTo(Point(
430            x: -1.0,
431            y: 1.0,
432          )),
433          LineTo(Point(
434            x: -1.0,
435            y: -1.0,
436          )),
437          LineTo(Point(
438            x: 1.0,
439            y: -1.0,
440          )),
441          LineTo(Point(
442            x: 1.0,
443            y: 1.0,
444          )),
445          LineTo(Point(
446            x: -1.0,
447            y: 1.0,
448          )),
449          ClosePath,
450        ]),
451        parent: Some(ContourIdx(0)),
452        outer: false,
453      ),
454    ],
455  ), ScanLineOrder(
456    west_map: HalfScanLineOrder(
457      inner: OutputSegVec(
458        inner: [
459          [],
460          [],
461          [
462            (-2.0, Some(OutputSegIdx(0))),
463            (-1.0, Some(OutputSegIdx(5))),
464            (1.0, Some(OutputSegIdx(0))),
465          ],
466          [
467            (-1.0, Some(OutputSegIdx(0))),
468          ],
469          [],
470          [
471            (-1.0, Some(OutputSegIdx(3))),
472          ],
473          [],
474          [],
475        ],
476      ),
477    ),
478    east_map: HalfScanLineOrder(
479      inner: OutputSegVec(
480        inner: [
481          [
482            (-2.0, Some(OutputSegIdx(2))),
483            (-1.0, Some(OutputSegIdx(3))),
484            (1.0, Some(OutputSegIdx(2))),
485          ],
486          [],
487          [],
488          [
489            (-1.0, Some(OutputSegIdx(5))),
490          ],
491          [],
492          [
493            (-1.0, Some(OutputSegIdx(2))),
494          ],
495          [],
496          [],
497        ],
498      ),
499    ),
500  ))