Path.Area: removed LogLevel from setDefaultParams
Use App.setLogLevel('Path.Area', <level>) instead.
This commit is contained in:
@@ -476,7 +476,7 @@ struct WireJoiner {
|
||||
BRepBndLib::Add(e,bound);
|
||||
bound.SetGap(0.1);
|
||||
if (bound.IsVoid()) {
|
||||
if(Area::TraceEnabled())
|
||||
if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG))
|
||||
AREA_WARN("failed to get bound of edge");
|
||||
return false;
|
||||
}
|
||||
@@ -687,7 +687,7 @@ struct WireJoiner {
|
||||
intersects = true;
|
||||
break;
|
||||
}
|
||||
}else if(Area::TraceEnabled())
|
||||
}else if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG))
|
||||
AREA_WARN("BRepExtrema_DistShapeShape failed");
|
||||
}
|
||||
}
|
||||
@@ -711,7 +711,7 @@ struct WireJoiner {
|
||||
mkEdge2.Init(curve, pt, pend);
|
||||
}
|
||||
if(!mkEdge1.IsDone() || !mkEdge2.IsDone()) {
|
||||
if(Area::TraceEnabled())
|
||||
if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG))
|
||||
AREA_WARN((reversed?"reversed ":"")<<"edge split failed "<<
|
||||
AREA_XYZ(pstart)<<", " << AREA_XYZ(pt)<< ", "<<AREA_XYZ(pend)<<
|
||||
", "<<", err: " << mkEdge1.Error() << ", " << mkEdge2.Error());
|
||||
@@ -1134,12 +1134,14 @@ std::vector<shared_ptr<Area> > Area::makeSections(
|
||||
double height = z-tolerance;
|
||||
if(z-zMin<myParams.SectionTolerance){
|
||||
height = zMin+myParams.SectionTolerance;
|
||||
AREA_WARN("hit bottom " <<z<<','<<zMin<<','<<height);
|
||||
if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG))
|
||||
AREA_WARN("hit bottom " <<z<<','<<zMin<<','<<height);
|
||||
heights.push_back(height);
|
||||
if(myParams.Stepdown>0.0) break;
|
||||
}else if(zMax-z<myParams.SectionTolerance) {
|
||||
height = zMax-myParams.SectionTolerance;
|
||||
AREA_WARN("hit top " <<z<<','<<zMax<<','<<height);
|
||||
if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG))
|
||||
AREA_WARN("hit top " <<z<<','<<zMax<<','<<height);
|
||||
heights.push_back(height);
|
||||
if(myParams.Stepdown<0.0) break;
|
||||
}else
|
||||
@@ -2982,7 +2984,6 @@ bool Area::aborting() {
|
||||
}
|
||||
|
||||
AreaStaticParams::AreaStaticParams()
|
||||
:PARAM_INIT(PARAM_FNAME,AREA_PARAMS_EXTRA_CONF)
|
||||
{}
|
||||
|
||||
AreaStaticParams Area::s_params;
|
||||
@@ -2995,8 +2996,3 @@ const AreaStaticParams &Area::getDefaultParams() {
|
||||
return s_params;
|
||||
}
|
||||
|
||||
#define AREA_LOG_CHECK_DEFINE(_1,_2,_elem) \
|
||||
bool Area::BOOST_PP_CAT(_elem,Enabled)() {\
|
||||
return s_params.LogLevel >= BOOST_PP_CAT(LogLevel,_elem);\
|
||||
}
|
||||
BOOST_PP_SEQ_FOR_EACH(AREA_LOG_CHECK_DEFINE,_,AREA_PARAM_LOG_LEVEL)
|
||||
|
||||
@@ -75,8 +75,6 @@ struct PathExport AreaParams: CAreaParams {
|
||||
};
|
||||
|
||||
struct PathExport AreaStaticParams: AreaParams {
|
||||
PARAM_DECLARE(PARAM_FNAME,AREA_PARAMS_EXTRA_CONF);
|
||||
|
||||
AreaStaticParams();
|
||||
};
|
||||
|
||||
@@ -378,13 +376,6 @@ public:
|
||||
|
||||
static void setDefaultParams(const AreaStaticParams ¶ms);
|
||||
static const AreaStaticParams &getDefaultParams();
|
||||
|
||||
|
||||
#define AREA_LOG_CHECK_DECLARE(_1,_2,_elem) \
|
||||
static bool BOOST_PP_CAT(_elem,Enabled)();
|
||||
BOOST_PP_SEQ_FOR_EACH(AREA_LOG_CHECK_DECLARE,_,AREA_PARAM_LOG_LEVEL)
|
||||
|
||||
PARAM_ENUM_DECLARE(AREA_PARAMS_LOG_LEVEL)
|
||||
};
|
||||
|
||||
} //namespace Path
|
||||
|
||||
@@ -255,20 +255,7 @@
|
||||
AREA_PARAMS_CONF \
|
||||
AREA_PARAMS_OPCODE
|
||||
|
||||
#define AREA_PARAM_LOG_LEVEL (Error)(Warning)(Log)(Trace)
|
||||
#if FC_DEBUG
|
||||
# define AREA_PARAMS_LOG_LEVEL \
|
||||
((enum, log_level, LogLevel, 3, "Area log level", AREA_PARAM_LOG_LEVEL))
|
||||
#else
|
||||
# define AREA_PARAMS_LOG_LEVEL \
|
||||
((enum, log_level, LogLevel, 1, "Area log level", AREA_PARAM_LOG_LEVEL))
|
||||
#endif
|
||||
|
||||
#define AREA_PARAMS_EXTRA_CONF \
|
||||
AREA_PARAMS_LOG_LEVEL
|
||||
|
||||
#define AREA_PARAMS_STATIC_CONF \
|
||||
AREA_PARAMS_CONF \
|
||||
AREA_PARAMS_EXTRA_CONF
|
||||
AREA_PARAMS_CONF
|
||||
|
||||
#endif //PATH_AreaParam_H
|
||||
|
||||
@@ -149,10 +149,9 @@ static const PyMethodDef areaOverrides[] = {
|
||||
},
|
||||
{
|
||||
"setDefaultParams",(PyCFunction)areaSetParams, METH_VARARGS|METH_KEYWORDS|METH_STATIC,
|
||||
"setDefaultParams(" PARAM_PY_ARGS_DOC(NAME,AREA_PARAMS_EXTRA_CONF) ", key=value...):\n"
|
||||
"setDefaultParams(key=value...):\n"
|
||||
"Static method to set the default parameters of all following Path.Area, plus the following\n"
|
||||
"additional parameters.\n"
|
||||
PARAM_PY_DOC(NAME,AREA_PARAMS_EXTRA_CONF)
|
||||
},
|
||||
{
|
||||
"getDefaultParams",(PyCFunction)areaGetParams, METH_VARARGS|METH_STATIC,
|
||||
|
||||
Reference in New Issue
Block a user