EntityWrapperPtr theSolverEntity)
{
std::map<FeaturePtr, EntityWrapperPtr>::const_iterator aFound = myFeatureMap.find(theFeature);
- if (aFound == myFeatureMap.end() || !aFound->second->isEqual(theSolverEntity))
+ if (aFound == myFeatureMap.end() || !aFound->second || !aFound->second->isEqual(theSolverEntity))
setNeedToResolve(true); // the entity is new or modified
myFeatureMap[theFeature] = theSolverEntity;
EntityWrapperPtr theSolverEntity)
{
std::map<AttributePtr, EntityWrapperPtr>::const_iterator aFound = myAttributeMap.find(theAttribute);
- if (aFound == myAttributeMap.end() || !aFound->second->isEqual(theSolverEntity))
+ if (aFound == myAttributeMap.end() || !aFound->second || !aFound->second->isEqual(theSolverEntity))
setNeedToResolve(true); // the entity is new or modified
myAttributeMap[theAttribute] = theSolverEntity;
SketchSolver_SolveStatus SolveSpaceSolver_Solver::solve()
{
- if (myEquationsSystem.constraints <= 0)
- return STATUS_EMPTYSET;
+ //if (myEquationsSystem.constraints <= 0)
+ // return STATUS_EMPTYSET;
myEquationsSystem.calculateFaileds = myFindFaileds ? 1 : 0;
#include <GeomDataAPI_Point.h>
#include <GeomDataAPI_Point2D.h>
#include <ModelAPI_AttributeDouble.h>
+#include <SketchPlugin_Arc.h>
/** \brief Search the entity/parameter with specified ID in the list of elements
* \param[in] theEntityID unique ID of the element
if (anEntity->type() == ENTITY_SKETCH)
storeWorkplane(anEntity);
+
+ // For the correct work with arcs we will add them if their parameter is added
+ if (theEntity->baseAttribute()) {
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theEntity->baseAttribute()->owner());
+ if (aFeature->getKind() == SketchPlugin_Arc::ID() &&
+ myFeatureMap.find(aFeature) == myFeatureMap.end()) {
+ myFeatureMap[aFeature] = EntityWrapperPtr();
+ return SketchSolver_Storage::update(aFeature, myGroupID);
+ }
+ }
}
+
return isUpdated;
}