MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / extend_wire

Function extend_wire

src/ifcgeom/kernels/cgal/CgalKernel.cpp:493–504  ·  view source on GitHub ↗

@nb mutates a

Source from the content-addressed store, hash-verified

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>

Callers 1

convertMethod · 0.85

Calls 5

normMethod · 0.80
emptyMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected