#ifndef CONFIG_KEYWORDS_H_
#define CONFIG_KEYWORDS_H_
-#if defined __GNUC__ || defined __clang__
-#define MAYBE_UNUSED __attribute__((unused))
-#else
-#define MAYBE_UNUSED
-#endif
+#include <Config_def.h>
/*
* Hardcoded xml entities of plugin-*.xml
// change locale and convert "," to "." if exists
std::string aCurLocale = setlocale(LC_NUMERIC, 0);
setlocale(LC_NUMERIC, "C");
- int dotpos = (int)aStr.find(',');
+ size_t dotpos = aStr.find(',');
if (dotpos != std::string::npos)
aStr.replace(dotpos, 1, ".");
#include <string>
/// Event ID that Validator is loaded (comes with Config_ValidatorMessage)
-static const char * EVENT_VALIDATOR_LOADED = "ValidatorLoaded";
+MAYBE_UNUSED static const char * EVENT_VALIDATOR_LOADED = "ValidatorLoaded";
/*!
* \class Config_ValidatorMessage
#endif
#endif
+#if defined __GNUC__ || defined __clang__
+#define MAYBE_UNUSED __attribute__((unused))
+#else
+#define MAYBE_UNUSED
+#endif
+
#endif //CONFIG_H
GeomPointPtr anApex;
GeomDirPtr anAxis;
double aSemiAngle = 0.0;
- double aHeight = 0.0;
GeomPlanePtr aCaps[2];
else
anAxis = aCurCone->axis();
aSemiAngle = aCurCone->semiAngle();
- aHeight = aCurCone->height();
isCone = true;
}
}
}
if (aNearest > 0 && aNearest != i + 1) {
// Keep given order of points to use it in case of equidistant candidates
- // .-<---<-.
- // / \
+ // .--<---<--.
+ // | |
// o o o c o->o->o->o->n o o
// | | |
// i i+1 nearest
}
}
-void PartSet_OverconstraintListener::processEvent(
- const std::shared_ptr<Events_Message>& theMessage)
+void PartSet_OverconstraintListener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
{
// #2271 open document: if sketch has confilcting elements, solver sends message with the
// elements by opening the document. Sketch is not active, but an internal container should
anEventID == Events_Loop::eventByName(EVENT_SOLVER_REPAIRED)) {
std::shared_ptr<ModelAPI_SolverFailedMessage> anErrorMsg =
std::dynamic_pointer_cast<ModelAPI_SolverFailedMessage>(theMessage);
- bool anUpdated = false;
if (anErrorMsg.get()) {
const std::set<ObjectPtr>& aConflictingObjects = anErrorMsg->objects();
if (anEventID == Events_Loop::eventByName(EVENT_SOLVER_FAILED))
- anUpdated = appendConflictingObjects(aConflictingObjects);
+ appendConflictingObjects(aConflictingObjects);
else
- anUpdated = repairConflictingObjects(aConflictingObjects);
+ repairConflictingObjects(aConflictingObjects);
}
}
else if (anEventID == Events_Loop::eventByName(EVENT_SKETCH_UNDER_CONSTRAINED) ||
PartSet_Fitter(PartSet_SketcherMgr* theSketchMgr):
mySketchMgr(theSketchMgr) {}
+ virtual ~PartSet_Fitter() {}
+
/// A method which has top be reimplemented to provide alterantive implementation FitAll command
/// \param theView - a view which has to be fit
virtual void fitAll(Handle(V3d_View) theView);
if (!theComposite.get())
return;
- static Events_Loop* aLoop = Events_Loop::loop();
int aNumberOfSubs = theComposite->numberOfSubs();
for (int i = 0; i < aNumberOfSubs; i++) {
FeaturePtr aSubFeature = theComposite->subFeature(i);
TopoDS_Shape aNextModification = aBaseIter.Shape();
if (aNextModification.IsNull())
continue;
- if (isInContext(theContext, aNextModification))
+ if (isInContext(theContext, aNextModification)) {
// don't add vertices generated from edges
if (aNextModification.ShapeType() <= theResult.ShapeType())
aResultShapes.Add(aNextModification);
- else if (findNewVersion(theContext, aNextModification))
+ }
+ else if (findNewVersion(theContext, aNextModification)) {
if (aNextModification.ShapeType() <= theResult.ShapeType())
aResultShapes.Add(aNextModification);
+ }
}
}
if (aResultShapes.IsEmpty())
bool aIsFree = true;
for(int aKind = 0; aIsFree && aKind < 2; aKind++) { // 0 for feature, 1 for result
ObjectPtr aReferenced = aCurrent;
- if (aKind == 1)
+ if (aKind == 1) {
if (!aCurrent->results().empty())
aReferenced = aCurrent->firstResult();
else
break;
+ }
const std::set<AttributePtr>& aRefs = aReferenced->data()->refsToMe();
std::set<AttributePtr>::iterator aRIt = aRefs.begin();
for (; aRIt != aRefs.end(); ++aRIt) {