Answers the 2D point from a 2D or 3D point. >>> point2D() # Default 2D origin (0pt, 0pt) >>> point2D(pt(20, -40)) (20pt, -40pt) >>> point2D(pt(20)) (20pt, 20pt) >>> point2D(mm(2,3,4,5,6)) (2mm, 3mm)
(p=None)
| 84 | return p |
| 85 | |
| 86 | def point2D(p=None): |
| 87 | """Answers the 2D point from a 2D or 3D point. |
| 88 | |
| 89 | >>> point2D() # Default 2D origin |
| 90 | (0pt, 0pt) |
| 91 | >>> point2D(pt(20, -40)) |
| 92 | (20pt, -40pt) |
| 93 | >>> point2D(pt(20)) |
| 94 | (20pt, 20pt) |
| 95 | >>> point2D(mm(2,3,4,5,6)) |
| 96 | (2mm, 3mm) |
| 97 | """ |
| 98 | return point3D(p)[:2] |
| 99 | |
| 100 | def pointOffset(point, offset): |
| 101 | """Answers a new 3D point, shifted by offset. |
no test coverage detected