MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / AddPolyNodeToPaths

Function AddPolyNodeToPaths

static_libs/clipper/clipper.cpp:4460–4472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4458};
4459
4460void AddPolyNodeToPaths(const PolyNode& polynode, NodeType nodetype, Paths& paths)
4461{
4462 bool match = true;
4463 if (nodetype == ntClosed)
4464 match = !polynode.IsOpen();
4465 else if (nodetype == ntOpen)
4466 return;
4467
4468 if (!polynode.Contour.empty() && match)
4469 paths.push_back(polynode.Contour);
4470 for (size_t i = 0; i < polynode.ChildCount(); ++i)
4471 AddPolyNodeToPaths(*polynode.Childs[i], nodetype, paths);
4472}
4473//------------------------------------------------------------------------------
4474
4475void PolyTreeToPaths(const PolyTree& polytree, Paths& paths)

Callers 2

PolyTreeToPathsFunction · 0.70
ClosedPathsFromPolyTreeFunction · 0.70

Calls 3

IsOpenMethod · 0.45
push_backMethod · 0.45
ChildCountMethod · 0.45

Tested by

no test coverage detected