void addTemporaryConstraint(const Slvs_hConstraint& theConstraintID);
/// \brief Remove all transient constraints
void removeTemporaryConstraints();
+ /// \brief Remove one temporary constraint. Preferable to remove the points under Point-on-Line constraint
+ /// \return Number of remaining temporary constraints
+ int deleteTemporaryConstraint();
/// \brief Checks the constraint is temporary
bool isTemporary(const Slvs_hConstraint& theConstraintID) const;
+ /// \brief Number of temporary constraints
+ int numberTemporary() const
+ { return (int)myTemporaryConstraints.size(); }
/// \brief Shows the sketch should be resolved
bool isNeedToResolve() const
- { return myNeedToResolve; }
+ { return myNeedToResolve && !myConstraints.empty(); }
+
+ /// \brief Shows the storage has the same constraint twice
+ bool hasDuplicatedConstraint() const
+ { return myDuplicatedConstraint; }
/// \brief Changes the flag of group to be resolved
void setNeedToResolve(bool theFlag)
Slvs_hConstraint myFixed; ///< identifier of one of temporary constraints to fix separate point
bool myNeedToResolve; ///< parameters are changed and group needs to be resolved
+ bool myDuplicatedConstraint; ///< shows the storage has same constraint twice
std::set<Slvs_hConstraint> myTemporaryConstraints; ///< list of transient constraints
std::set<Slvs_hParam> myRemovedParameters; ///< list of just removed parameters (cleared when returning to applicant)