@nb mutates a
| 491 | |
| 492 | // @nb mutates a |
| 493 | void extend_wire(std::vector<taxonomy::point3>& a, const std::vector<taxonomy::point3>& b) { |
| 494 | if (a.empty()) { |
| 495 | a = b; |
| 496 | return; |
| 497 | } |
| 498 | if (b.empty()) { |
| 499 | return; |
| 500 | } |
| 501 | double d = (a.back().ccomponents() - b.front().ccomponents()).norm(); |
| 502 | size_t offset = d < 1.e-5 ? 1 : 0; |
| 503 | a.insert(a.end(), b.begin() + offset, b.end()); |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> |