20 #ifndef SketchPlugin_Validators_H
21 #define SketchPlugin_Validators_H
23 #include "SketchPlugin.h"
24 #include <ModelAPI_AttributeValidator.h>
25 #include <ModelAPI_FeatureValidator.h>
40 virtual bool isValid(
const AttributePtr& theAttribute,
41 const std::list<std::string>& theArguments,
58 virtual bool isValid(
const AttributePtr& theAttribute,
59 const std::list<std::string>& theArguments,
76 virtual bool isValid(
const AttributePtr& theAttribute,
77 const std::list<std::string>& theArguments,
95 virtual bool isValid(
const AttributePtr& theAttribute,
96 const std::list<std::string>& theArguments,
113 virtual bool isValid(
const AttributePtr& theAttribute,
114 const std::list<std::string>& theArguments,
131 virtual bool isValid(
const AttributePtr& theAttribute,
132 const std::list<std::string>& theArguments,
150 virtual bool isValid(
const AttributePtr& theAttribute,
151 const std::list<std::string>& theArguments,
170 virtual bool isValid(
const AttributePtr& theAttribute,
171 const std::list<std::string>& theArguments,
188 virtual bool isValid(
const std::shared_ptr<ModelAPI_Feature>& theFeature,
189 const std::list<std::string>& theArguments,
193 virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
209 virtual bool isValid(
const AttributePtr& theAttribute,
210 const std::list<std::string>& theArguments,
220 FeaturePtr& theEdge1,
221 FeaturePtr& theEdge2);
238 virtual bool isValid(
const AttributePtr& theAttribute,
239 const std::list<std::string>& theArguments,
257 virtual bool isValid(
const AttributePtr& theAttribute,
258 const std::list<std::string>& theArguments,
275 virtual bool isValid(
const AttributePtr& theAttribute,
276 const std::list<std::string>& theArguments,
297 virtual bool isValid(
const AttributePtr& theAttribute,
298 const std::list<std::string>& theArguments,
318 virtual bool isValid(
const AttributePtr& theAttribute,
319 const std::list<std::string>& theArguments,
334 virtual bool isValid(
const AttributePtr& theAttribute,
335 const std::list<std::string>& theArguments,
350 virtual bool isValid(
const AttributePtr& theAttribute,
351 const std::list<std::string>& theArguments,
369 virtual bool isValid(
const AttributePtr& theAttribute,
370 const std::list<std::string>& theArguments,
387 virtual bool isValid(
const AttributePtr& theAttribute,
388 const std::list<std::string>& theArguments,
405 virtual bool isValid(
const AttributePtr& theAttribute,
406 const std::list<std::string>&,
424 virtual bool isValid(
const AttributePtr& theAttribute,
425 const std::list<std::string>& theArguments,
430 bool arePointsNotOnLine(
const FeaturePtr& theMacroFeature,
435 bool arePointsNotSeparated(
const FeaturePtr& theMacroFeature,
436 const std::list<std::string>& theArguments,
453 virtual bool isValid(
const AttributePtr& theAttribute,
454 const std::list<std::string>& theArguments,
471 virtual bool isValid(
const AttributePtr& theAttribute,
472 const std::list<std::string>& theArguments,
491 virtual bool isValid(
const AttributePtr& theAttribute,
492 const std::list<std::string>& theArguments,
508 virtual bool isValid(
const AttributePtr& theAttribute,
509 const std::list<std::string>& theArguments,
524 virtual bool isValid(
const AttributePtr& theAttribute,
525 const std::list<std::string>& theArguments,
539 virtual bool isValid(
const AttributePtr& theAttribute,
540 const std::list<std::string>& theArguments,
554 virtual bool isValid(
const AttributePtr& theAttribute,
555 const std::list<std::string>& theArguments,
570 virtual bool isValid(
const std::shared_ptr<ModelAPI_Feature>& theFeature,
571 const std::list<std::string>& theArguments,
An event message for sending a string message which has to be translated.
Definition: Events_InfoMessage.h:35
Generic validator for any attribute of a feature.
Definition: ModelAPI_AttributeValidator.h:31
The geneneric validator for the whole feature.
Definition: ModelAPI_FeatureValidator.h:35
Validator for the end point of MacroArc feature.
Definition: SketchPlugin_Validators.h:465
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1725
Validator for the end point of MacroArc feature.
Definition: SketchPlugin_Validators.h:447
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1654
Validator for the point where the tangent arc is building.
Definition: SketchPlugin_Validators.h:251
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:909
Validator for the point where the transversal arc is building.
Definition: SketchPlugin_Validators.h:269
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:960
Validator for checking poles/weights of B-spline curve.
Definition: SketchPlugin_Validators.h:549
Validator for passed point of MacroCircle feature.
Definition: SketchPlugin_Validators.h:399
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1428
Validator for the coincidence constraint input.
Definition: SketchPlugin_Validators.h:144
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:451
Validator for the constraints which create features.
Definition: SketchPlugin_Validators.h:164
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:514
Validator for the selected vertices for the curve fitting feature.
Definition: SketchPlugin_Validators.h:564
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if number of selected points is greater than the minimal value
Definition: SketchPlugin_Validators.cpp:1983
Validator for attributes of a sketch feature.
Definition: SketchPlugin_Validators.h:381
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1395
Validator for attributes of a sketch feature.
Definition: SketchPlugin_Validators.h:363
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1336
Validator for the distance input.
Definition: SketchPlugin_Validators.h:34
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:97
Validator for the equal constraint input.
Definition: SketchPlugin_Validators.h:107
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:351
Validator for the point for fillet creation.
Definition: SketchPlugin_Validators.h:203
static bool isValidVertex(const AttributePtr &theAttribute, Events_InfoMessage &theError, FeaturePtr &theEdge1, FeaturePtr &theEdge2)
returns true if attribute is a good point for fillet
Definition: SketchPlugin_Validators.cpp:677
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:669
Validator for checking whether the feature has constraint.
Definition: SketchPlugin_Validators.h:485
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1785
Validator for the attribute to be intersected with the sketch plane.
Definition: SketchPlugin_Validators.h:328
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1004
Validator for the middle point constraint input.
Definition: SketchPlugin_Validators.h:232
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:861
Validator for the mirror constraint input.
Definition: SketchPlugin_Validators.h:125
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:411
Validator for checking whether the angle of MultiRotation is in range [0, 360].
Definition: SketchPlugin_Validators.h:534
Validator for the rigid constraint input.
Definition: SketchPlugin_Validators.h:89
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is not used in another rigid constraint
Definition: SketchPlugin_Validators.cpp:305
Validator for the perpendicular constraint input.
Definition: SketchPlugin_Validators.h:70
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:261
Validator for the attribute to be projected onto the sketch plane.
Definition: SketchPlugin_Validators.h:344
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1197
Validator checking that the replications features (Mirror, Multi-Rotation, Mutli-Translation) do not ...
Definition: SketchPlugin_Validators.h:502
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1828
Validator for checking whether the feature referred by attribute is a sketch feature.
Definition: SketchPlugin_Validators.h:518
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1884
Validator for the solver error.
Definition: SketchPlugin_Validators.h:182
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if there are no solver errors
Definition: SketchPlugin_Validators.cpp:587
virtual bool isNotObligatory(std::string theFeature, std::string theAttribute)
Returns true if the attribute in feature is not obligatory for the feature execution.
Definition: SketchPlugin_Validators.cpp:602
Validator for the entity of the following type:
Definition: SketchPlugin_Validators.h:291
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1058
Validator for the tangent constraint input.
Definition: SketchPlugin_Validators.h:52
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:158
Validator for the third point of MacroCircle feature.
Definition: SketchPlugin_Validators.h:418
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1473
Validator for the entity of the following type:
Definition: SketchPlugin_Validators.h:312
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
returns true if attribute is valid
Definition: SketchPlugin_Validators.cpp:1136