|
76 | 76 | (if (= (length y) 6)
|
77 | 77 | `(b2 ,@y)
|
78 | 78 | `(s ,@y))))
|
79 |
| - `(ix ,(x a) ,(x b) ,@r) |
80 |
| - `(ix ,(x b) ,(x a) ,@(loop for v in r |
81 |
| - collect (if (= 4 (length v)) |
82 |
| - (let ((c (copy-seq v))) |
83 |
| - (rotatef (aref c 2) (aref c 3)) |
84 |
| - c) |
85 |
| - v))))) |
| 79 | + `(progn |
| 80 | + (ix ,(x a) ,(x b) ,@r) |
| 81 | + (ix ,(x b) ,(x a) ,@(loop for v in r |
| 82 | + collect (if (= 4 (length v)) |
| 83 | + (let ((c (copy-seq v))) |
| 84 | + (rotatef (aref c 2) (aref c 3)) |
| 85 | + c) |
| 86 | + v)))))) |
86 | 87 | (defmacro ix2r (a a0 a1 b b0 b1 &rest r)
|
87 | 88 | (flet ((x (y)
|
88 | 89 | (if (= (length y) 6)
|
89 | 90 | `(b2 ,@y)
|
90 | 91 | `(s ,@y))))
|
91 |
| - `(ixr ,(x a) ,a0 ,a1 ,(x b) ,b0 ,b1 ,@r) |
92 |
| - `(ixr ,(x b) ,b0 ,b1 ,(x a) ,a0 ,a1 |
93 |
| - ,@(loop for v in r |
94 |
| - collect (if (= 4 (length v)) |
95 |
| - (let ((c (copy-seq v))) |
96 |
| - (rotatef (aref c 2) (aref c 3)) |
97 |
| - c) |
98 |
| - v))))) |
| 92 | + `(progn |
| 93 | + (ixr ,(x a) ,a0 ,a1 ,(x b) ,b0 ,b1 ,@r) |
| 94 | + (ixr ,(x b) ,b0 ,b1 ,(x a) ,a0 ,a1 |
| 95 | + ,@(loop for v in r |
| 96 | + collect (if (= 4 (length v)) |
| 97 | + (let ((c (copy-seq v))) |
| 98 | + (rotatef (aref c 2) (aref c 3)) |
| 99 | + c) |
| 100 | + v)))))) |
99 | 101 |
|
100 | 102 | (defun check-bclip (a a0 a1 b b0 b1)
|
101 | 103 | (let ((i (finish (qi::intersect
|
|
666 | 668 | #(184.0d0 361.0d0 0d0 1.0d0))
|
667 | 669 | (ix2 (195 339 195 338 176 288)
|
668 | 670 | (196 -137 195 339)
|
669 |
| - #(195.0d0 339.0d0 0d0 1.0d0))) |
670 |
| -) |
| 671 | + #(195.0d0 339.0d0 0d0 1.0d0)) |
| 672 | + (ix2 (1578 1403 1664 1415 1689 1409) |
| 673 | + (1689 1409 1663 1415 1578 1403) |
| 674 | + #(1665.333789528964d0 1410.999892664994d0 |
| 675 | + 0.6642247297524433d0 0.33089139641883003d0) |
| 676 | + #(1578.0d0 1403.0d0 0.0d0 1.0d0) |
| 677 | + #(1689.0d0 1409.0d0 1.0d0 0.0d0)) |
| 678 | + |
| 679 | + ;; 1689,1409... split #(1665.111111111111d0 1411.0d0) @ 0.3333333333333333d0 |
| 680 | + ;; 1578,1403... split #(1665.5555555555557d0 1411.0d0)@ 0.6666666666666666d0 |
| 681 | + (ix2r (1578 1403 1664 1415 1689 1409) 0 0.6666666666666666d0 |
| 682 | + (1689 1409 1663 1415 1578 1403) 0 0.3333333333333333d0 |
| 683 | + #(1665.3337895289578d0 1410.999892664994d0 |
| 684 | + 0.664224729752739d0 0.33089139641926213d0)) |
| 685 | + (ix2r (1578 1403 1664 1415 1689 1409) 1 0.6666666666666666d0 |
| 686 | + (1689 1409 1663 1415 1578 1403) 0 0.3333333333333333d0 |
| 687 | + #(1689.0d0 1409.0d0 1.0d0 0.0d0)) |
| 688 | + (ix2r (1578 1403 1664 1415 1689 1409) 0 0.6666666666666666d0 |
| 689 | + (1689 1409 1663 1415 1578 1403) 1 0.3333333333333333d0 |
| 690 | + #(1578.0d0 1403.0d0 0.0d0 1.0d0)) |
| 691 | + (ix2r (1578 1403 1664 1415 1689 1409) 1 0.6666666666666666d0 |
| 692 | + (1689 1409 1663 1415 1578 1403) 1 0.3333333333333333d0 |
| 693 | + NIL) |
| 694 | + |
| 695 | + ) |
671 | 696 | #++
|
672 | 697 | (test 'intersect-regression)
|
673 | 698 |
|
|
0 commit comments