@@ -274,7 +274,7 @@ index b93ef99c..dbd91dfc 100644
274274 // #include <QtWidgets>
275275
276276-
277- // static auto PointConverter = QMetaType::registerConverter(&Point ::toString); NOTE
277+ // static auto PointConverter = QMetaType::registerConverter(&cPoint ::toString); NOTE
278278
279279 inline constexpr auto G_CODE_PROPERTIES = md5::hash32("GCodeProperties");
280280@@ -916,6 +914,10 @@ const QDockWidget* MainWindow::dockWidget() const { return dockWidget_; }
@@ -928,7 +928,7 @@ index c4a7542b..fe59b1fe 100644
928928+ mergePaths(rawPaths, mergDist);
929929
930930 for(Path& path: rawPaths) {
931- Point & pf = path.front();
931+ cPoint & pf = path.front();
932932@@ -215,7 +214,7 @@ void Creator::createGc(Params* gcp) {
933933 try {
934934 checkMillingFl = true;
@@ -970,15 +970,15 @@ index c4a7542b..fe59b1fe 100644
970970- continue;
971971- if(i >= paths.size())
972972- break;
973- - Point pib = paths[i].back();
974- - Point pjf = paths[j].front();
973+ - cPoint pib = paths[i].back();
974+ - cPoint pjf = paths[j].front();
975975- if(pib == pjf) {
976976- paths[i] += paths[j] | skipFront;
977977- paths -= j--;
978978- continue;
979979- }
980- - Point pif = paths[i].front();
981- - Point pjb = paths[j].back();
980+ - cPoint pif = paths[i].front();
981+ - cPoint pjb = paths[j].back();
982982- if(pif == pjb) {
983983- paths[j].insert(paths[j].end(), paths[i].begin() + 1, paths[i].end());
984984- paths -= i--;
@@ -1005,15 +1005,15 @@ index c4a7542b..fe59b1fe 100644
10051005- continue;
10061006- if(i >= paths.size())
10071007- break;
1008- - Point pib = paths[i].back();
1009- - Point pjf = paths[j].front();
1008+ - cPoint pib = paths[i].back();
1009+ - cPoint pjf = paths[j].front();
10101010- if(distTo(pib, pjf) < maxDist) {
10111011- paths[i] += paths[j] | skipFront;
10121012- paths -= j--;
10131013- continue;
10141014- }
1015- - Point pif = paths[i].front();
1016- - Point pjb = paths[j].back();
1015+ - cPoint pif = paths[i].front();
1016+ - cPoint pjb = paths[j].back();
10171017- if(distTo(pif, pjb) < maxDist) {
10181018- paths[j].insert(paths[j].end(), paths[i].begin() + 1, paths[i].end());
10191019- paths -= i--;
@@ -1051,7 +1051,7 @@ index c4a7542b..fe59b1fe 100644
10511051- Paths& Creator::sortB(Paths& src) {
10521052- qDebug(__FUNCTION__);
10531053-
1054- - Point startPt{~(App::home().pos() + App::zero().pos())};
1054+ - cPoint startPt{~(App::home().pos() + App::zero().pos())};
10551055- for(size_t firstIdx{}; firstIdx < src.size(); ++firstIdx) {
10561056- size_t swapIdx = firstIdx;
10571057- double destLen = std::numeric_limits<double>::max();
@@ -1072,7 +1072,7 @@ index c4a7542b..fe59b1fe 100644
10721072- Paths& Creator::sortBeginEnd(Paths& src) {
10731073- qDebug(__FUNCTION__);
10741074-
1075- - Point startPt{~(App::home().pos() + App::zero().pos())};
1075+ - cPoint startPt{~(App::home().pos() + App::zero().pos())};
10761076- for(size_t firstIdx{}; firstIdx < src.size(); ++firstIdx) {
10771077-
10781078- size_t swapIdx = firstIdx;
@@ -1107,7 +1107,7 @@ index c4a7542b..fe59b1fe 100644
11071107- Pathss& Creator::sortB(Pathss& src) {
11081108- qDebug(__FUNCTION__);
11091109-
1110- - Point startPt{~(App::home().pos() + App::zero().pos())};
1110+ - cPoint startPt{~(App::home().pos() + App::zero().pos())};
11111111- for(size_t i{}; i < src.size(); ++i)
11121112- if(src[i].empty())
11131113- src.erase(src.begin() + i--);
@@ -1131,7 +1131,7 @@ index c4a7542b..fe59b1fe 100644
11311131- Pathss& Creator::sortBeginEnd(Pathss& src) {
11321132- qDebug(__FUNCTION__);
11331133-
1134- - Point startPt{~(App::home().pos() + App::zero().pos())};
1134+ - cPoint startPt{~(App::home().pos() + App::zero().pos())};
11351135- for(size_t firstIdx{}; firstIdx < src.size(); ++firstIdx) {
11361136- size_t swapIdx = firstIdx;
11371137- double destLen = std::numeric_limits<double>::max();
@@ -1191,7 +1191,7 @@ index b0b2f8de..e655f912 100644
11911191 namespace rviews = std::ranges::views;
11921192@@ -68,12 +59,6 @@ public:
11931193
1194- Path boundOfPaths(const Paths& paths, /*Point ::Type*/ int32_t k) const;
1194+ Path boundOfPaths(const Paths& paths, /*cPoint ::Type*/ int32_t k) const;
11951195
11961196- /*static*/ Paths& sortB(Paths& src);
11971197- /*static*/ Paths& sortBeginEnd(Paths& src);
@@ -1804,7 +1804,7 @@ index 609f3e68..eb5d167a 100644
18041804
18051805 Paths& normalize(Paths& paths) {
18061806 PolyTree polyTree;
1807- @@ -677,3 +679,375 @@ Path arc(Point p1, Point p2, Point center, int interpolation) {
1807+ @@ -677,3 +679,375 @@ Path arc(cPoint p1, cPoint p2, cPoint center, int interpolation) {
18081808 double stop = atan2(p2.y - center.y, p2.x - center.x);
18091809 return arc(center, radius, start, stop, interpolation);
18101810 }
@@ -1932,8 +1932,8 @@ index 609f3e68..eb5d167a 100644
19321932+ list.emplace_front(idx.first);
19331933+ for(size_t i = paths.size() - 1, index = idx.first; i; --i) {
19341934+ double minDist = std::numeric_limits<double>::max();
1935- + Point point;
1936- + for(Point pt: paths[i - 1]) {
1935+ + cPoint point;
1936+ + for(cPoint pt: paths[i - 1]) {
19371937+ double dist = distTo(pt, paths[i][index]);
19381938+ if(minDist >= dist) {
19391939+ minDist = dist;
@@ -1968,9 +1968,9 @@ index 609f3e68..eb5d167a 100644
19681968+ std::pair<size_t, size_t> idx;
19691969+ double d = std::numeric_limits<double>::max();
19701970+ // for(size_t id {}; id < returnPss.back().back().size(); ++id) {
1971- + // const Point & ptd = returnPss.back().back()[id];
1971+ + // const cPoint & ptd = returnPss.back().back()[id];
19721972+ // for(size_t is {}; is < path.size(); ++is) {
1973- + // const Point & pts = path[is];
1973+ + // const cPoint & pts = path[is];
19741974+ // const double l = distTo(ptdpts);
19751975+ // if(d >= l) {
19761976+ // d = l;
@@ -2058,7 +2058,7 @@ index 609f3e68..eb5d167a 100644
20582058+
20592059+ #endif
20602060+
2061- + Path boundOfPaths(const Paths& paths, /*Point ::Type*/ int32_t k) {
2061+ + Path boundOfPaths(const Paths& paths, /*cPoint ::Type*/ int32_t k) {
20622062+ Rect rect(GetBounds(paths));
20632063+ rect.bottom += k;
20642064+ rect.left -= k;
@@ -2068,9 +2068,9 @@ index 609f3e68..eb5d167a 100644
20682068+ return rect.AsPath();
20692069+ }
20702070+
2071- + Paths& sortB(Paths& src, Point startPt) {
2071+ + Paths& sortB(Paths& src, cPoint startPt) {
20722072+ qDebug(__FUNCTION__);
2073- + // Point startPt{~(App::home().pos() + App::zero().pos())};
2073+ + // cPoint startPt{~(App::home().pos() + App::zero().pos())};
20742074+ for(size_t firstIdx{}; firstIdx < src.size(); ++firstIdx) {
20752075+ size_t swapIdx = firstIdx;
20762076+ double destLen = std::numeric_limits<double>::max();
@@ -2088,10 +2088,10 @@ index 609f3e68..eb5d167a 100644
20882088+ return src;
20892089+ }
20902090+
2091- + Pathss& sortBeginEnd(Pathss& src, Point startPt) {
2091+ + Pathss& sortBeginEnd(Pathss& src, cPoint startPt) {
20922092+ qDebug(__FUNCTION__);
20932093+
2094- + // Point startPt{~(App::home().pos() + App::zero().pos())};
2094+ + // cPoint startPt{~(App::home().pos() + App::zero().pos())};
20952095+ for(size_t firstIdx{}; firstIdx < src.size(); ++firstIdx) {
20962096+ size_t swapIdx = firstIdx;
20972097+ double destLen = std::numeric_limits<double>::max();
@@ -2122,10 +2122,10 @@ index 609f3e68..eb5d167a 100644
21222122+ return src;
21232123+ }
21242124+
2125- + Paths& sortBeginEnd(Paths& src, Point startPt) {
2125+ + Paths& sortBeginEnd(Paths& src, cPoint startPt) {
21262126+ qDebug(__FUNCTION__);
21272127+
2128- + // Point startPt{~(App::home().pos() + App::zero().pos())};
2128+ + // cPoint startPt{~(App::home().pos() + App::zero().pos())};
21292129+ for(size_t firstIdx{}; firstIdx < src.size(); ++firstIdx) {
21302130+
21312131+ size_t swapIdx = firstIdx;
@@ -2157,10 +2157,10 @@ index 609f3e68..eb5d167a 100644
21572157+ return src;
21582158+ }
21592159+
2160- + Pathss& sortB(Pathss& src, Point startPt) {
2160+ + Pathss& sortB(Pathss& src, cPoint startPt) {
21612161+ qDebug(__FUNCTION__);
21622162+
2163- + // Point startPt{~(App::home().pos() + App::zero().pos())};
2163+ + // cPoint startPt{~(App::home().pos() + App::zero().pos())};
21642164+ for(size_t i{}; i < src.size(); ++i)
21652165+ if(src[i].empty())
21662166+ src.erase(src.begin() + i--);
@@ -2260,7 +2260,7 @@ index 58ef9499..37ec8415 100644
22602260 enum {
22612261 IconSize = 24
22622262 };
2263- @@ -154,6 +85,10 @@ Paths& TranslatePaths(Paths& path, const Point & pos);
2263+ @@ -154,6 +85,10 @@ Paths& TranslatePaths(Paths& path, const cPoint & pos);
22642264
22652265 void mergeSegments(Paths& paths, double glue = 0.0);
22662266
@@ -2273,19 +2273,19 @@ index 58ef9499..37ec8415 100644
22732273 QIcon drawIcon(const Paths& paths, QColor color = Qt::black);
22742274@@ -427,3 +362,14 @@ inline auto rwPolyTree(PolyTree& polyTree) {
22752275
2276- Path arc(const Point & center, double radius, double start, double stop, int interpolation);
2277- Path arc(Point p1, Point p2, Point center, int interpolation);
2276+ Path arc(const cPoint & center, double radius, double start, double stop, int interpolation);
2277+ Path arc(cPoint p1, cPoint p2, cPoint center, int interpolation);
22782278+
22792279+ void markPolyTreeDByNesting(PolyTree& polynode);
22802280+ void sortPolyTreeByNesting(PolyTree& polynode);
22812281+ Pathss stacking(Paths& paths);
22822282+
2283- + Path boundOfPaths(const Paths& paths, /*Point ::Type*/ int32_t k);
2283+ + Path boundOfPaths(const Paths& paths, /*cPoint ::Type*/ int32_t k);
22842284+
2285- + Paths& sortB(Paths& src, Point startPt);
2286- + Paths& sortBeginEnd(Paths& src, Point startPt);
2287- + Pathss& sortB(Pathss& src, Point startPt);
2288- + Pathss& sortBeginEnd(Pathss& src, Point startPt);
2285+ + Paths& sortB(Paths& src, cPoint startPt);
2286+ + Paths& sortBeginEnd(Paths& src, cPoint startPt);
2287+ + Pathss& sortB(Pathss& src, cPoint startPt);
2288+ + Pathss& sortBeginEnd(Pathss& src, cPoint startPt);
22892289diff --git a/static_libs/common/CMakeLists.txt b/static_libs/common/CMakeLists.txt
22902290index 2dede4d9..638b3e05 100644
22912291--- a/static_libs/common/CMakeLists.txt
0 commit comments