From ec10b5e62ef0e61b113f4c8b7b0f26ca28dde63b Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Fri, 24 Jan 2020 07:58:57 +0800 Subject: [PATCH] Path: add some diagnostic trace in Area --- src/Mod/Path/App/Area.cpp | 24 +++++++++++++++++++++++- src/Mod/Path/App/Area.h | 2 ++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 6ab2c1dd66..fe552ecbd9 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -135,6 +135,20 @@ AreaParams::AreaParams() :PARAM_INIT(PARAM_FNAME,AREA_PARAMS_AREA) {} +void AreaParams::dump(const char *msg) const { + +#define AREA_PARAM_PRINT(_param) \ + ss << PARAM_FNAME_STR(_param) << " = " << PARAM_FNAME(_param) << '\n'; + + if(FC_LOG_INSTANCE.level()>FC_LOGLEVEL_TRACE) { + std::ostringstream ss; + ss << msg << '\n'; + PARAM_FOREACH(AREA_PARAM_PRINT, AREA_PARAMS_AREA) + + FC_MSG(ss.str()); + } +} + CAreaConfig::CAreaConfig(const CAreaParams &p, bool noFitArcs) { #define AREA_CONF_SAVE_AND_APPLY(_param) \ @@ -877,7 +891,9 @@ struct WireJoiner { if(info.p1.SquareDistance(info.p2)