20 #ifndef PlaneGCSSolver_UpdateCoincidence_H_
21 #define PlaneGCSSolver_UpdateCoincidence_H_
23 #include <PlaneGCSSolver_Update.h>
24 #include <PlaneGCSSolver_EntityWrapper.h>
44 static const std::string&
GROUP()
46 static const std::string TYPE(
"Coincidence");
57 virtual void update(
const FeaturePtr& theFeature);
61 bool addCoincidence(
const EntityWrapperPtr& theEntity1,
const EntityWrapperPtr& theEntity2);
65 bool isPointOnEntity(
const EntityWrapperPtr& thePoint,
const EntityWrapperPtr& theEntity);
69 class CoincidentEntities
72 CoincidentEntities(
const EntityWrapperPtr& theEntity1,
73 const EntityWrapperPtr& theEntity2);
76 bool isExist(
const EntityWrapperPtr& theEntity)
const;
78 bool isExist(
const GCS::Point& thePoint)
const;
81 bool add(
const EntityWrapperPtr& theEntity);
84 void remove(
const EntityWrapperPtr& theEntity);
87 void merge(
const CoincidentEntities& theOther);
90 EntityWrapperPtr externalPoint()
const;
93 std::set<EntityWrapperPtr> myPoints;
94 std::set<EntityWrapperPtr> myExternalPoints;
95 std::set<EntityWrapperPtr> myFeatures;
100 std::list<CoincidentEntities>::iterator findGroupOfCoincidence(
const EntityWrapperPtr& theEntity);
104 bool addToGroupOfCoincidence(CoincidentEntities& theGroup,
const EntityWrapperPtr& theEntity);
107 std::list<CoincidentEntities> myCoincident;
Send events to listeners about changing a constraint.
Definition: PlaneGCSSolver_UpdateCoincidence.h:35
bool addCoincidence(const EntityWrapperPtr &theEntity1, const EntityWrapperPtr &theEntity2)
Set coincidence between two given entities.
Definition: PlaneGCSSolver_UpdateCoincidence.cpp:74
virtual void attach(SketchSolver_Constraint *theObserver, const std::string &theType)
Attach listener.
Definition: PlaneGCSSolver_UpdateCoincidence.cpp:34
bool isPointOnEntity(const EntityWrapperPtr &thePoint, const EntityWrapperPtr &theEntity)
Verifies the point is coincident to the feature.
Definition: PlaneGCSSolver_UpdateCoincidence.cpp:115
virtual void update(const FeaturePtr &theFeature)
Send notification about update of the feature to all interested.
Definition: PlaneGCSSolver_UpdateCoincidence.cpp:49
static const std::string & GROUP()
Group of entities, processed by this kind of updater.
Definition: PlaneGCSSolver_UpdateCoincidence.h:44
Send events to listeners about changing a feature.
Definition: PlaneGCSSolver_Update.h:38
Converts SketchPlugin constraint to the constraint applicable for solver.
Definition: SketchSolver_Constraint.h:39