/// Double attributes and 2D points are supported only.
/// \param theAttribute [in] attribute to create
/// \return Created wrapper of the attribute applicable for specific solver
- virtual EntityWrapperPtr createAttribute(AttributePtr theAttribute) override;
+ virtual EntityWrapperPtr createAttribute(AttributePtr theAttribute);
/// \brief Blank. To be defined in derived class.
- virtual EntityWrapperPtr createFeature(FeaturePtr) override
+ virtual EntityWrapperPtr createFeature(FeaturePtr)
{ return EntityWrapperPtr(); }
/// \brief Blank. To be defined in derived class.
- virtual const std::list<GCSConstraintPtr>& constraints() const override;
+ virtual const std::list<GCSConstraintPtr>& constraints() const;
};
#endif
static BuilderPtr getInstance();
/// \brief Creates a storage specific for used solver
- virtual StoragePtr createStorage(const SolverPtr& theSolver) const override;
+ virtual StoragePtr createStorage(const SolverPtr& theSolver) const;
/// \brief Creates specific solver
- virtual SolverPtr createSolver() const override;
+ virtual SolverPtr createSolver() const;
/// \brief Creates new constraint using given parameters
/// \param theConstraint [in] original constraint
const EntityWrapperPtr& theEntity1,
const EntityWrapperPtr& theEntity2 = EntityWrapperPtr(),
const EntityWrapperPtr& theEntity3 = EntityWrapperPtr(),
- const EntityWrapperPtr& theEntity4 = EntityWrapperPtr()) const override;
+ const EntityWrapperPtr& theEntity4 = EntityWrapperPtr()) const;
/// \brief Creates new multi-translation or multi-rotation constraint
/// \param theConstraint [in] original constraint
const bool theFullValue,
const EntityWrapperPtr& thePoint1,
const EntityWrapperPtr& thePoint2,
- const std::list<EntityWrapperPtr>& theTrsfEnt) const override;
+ const std::list<EntityWrapperPtr>& theTrsfEnt) const;
/// \brief Convert entity to point
/// \return empty pointer if the entity is not a point
- virtual std::shared_ptr<GeomAPI_Pnt2d> point(EntityWrapperPtr theEntity) const override;
+ virtual std::shared_ptr<GeomAPI_Pnt2d> point(EntityWrapperPtr theEntity) const;
/// \brief Convert entity to line
/// \return empty pointer if the entity is not a line
- virtual std::shared_ptr<GeomAPI_Lin2d> line(EntityWrapperPtr theEntity) const override;
+ virtual std::shared_ptr<GeomAPI_Lin2d> line(EntityWrapperPtr theEntity) const;
/// \brief Convert entity to line
/// \return empty pointer if the entity is not a line
- virtual std::shared_ptr<GeomAPI_Lin2d> line(FeaturePtr theFeature) const override;
+ virtual std::shared_ptr<GeomAPI_Lin2d> line(FeaturePtr theFeature) const;
/// \brief Check if two connected arcs have centers
/// in same direction relatively to connection point
virtual bool isArcArcTangencyInternal(EntityWrapperPtr theArc1,
- EntityWrapperPtr theArc2) const override;
+ EntityWrapperPtr theArc2) const;
};
#endif
/// Double attributes and 2D points are supported only.
/// \param theAttribute [in] attribute to create
/// \return Created wrapper of the attribute applicable for specific solver
- virtual EntityWrapperPtr createAttribute(AttributePtr theAttribute) override;
+ virtual EntityWrapperPtr createAttribute(AttributePtr theAttribute);
/// \brief Converts SketchPlugin's feature to the solver's entity.
/// Result if based on the list of already converted attributes.
/// \param theFeature [in] feature to create
- virtual EntityWrapperPtr createFeature(FeaturePtr theFeature) override;
+ virtual EntityWrapperPtr createFeature(FeaturePtr theFeature);
/// \brief Return list of constraints necessary to fix feature's extra DoF
- virtual const std::list<GCSConstraintPtr>& constraints() const override
+ virtual const std::list<GCSConstraintPtr>& constraints() const
{ return myFeatureConstraints; }
private:
/// \brief Solve the set of equations
/// \return identifier whether solution succeeded
- virtual SketchSolver_SolveStatus solve() override;
+ virtual SketchSolver_SolveStatus solve();
/// \brief Prepare for solving. Store initial values of parameters for undo
- virtual void prepare() override
+ virtual void prepare()
{ /* do nothing */ }
/// \brief Revert solution to initial values
- virtual void undo() override;
+ virtual void undo();
/// \brief Check the constraint is conflicted with others
- virtual bool isConflicting(const ConstraintID& theConstraint) const override;
+ virtual bool isConflicting(const ConstraintID& theConstraint) const;
/// \brief Degrees of freedom
- virtual int dof() const override;
+ virtual int dof() const;
private:
void collectConflicting();
/// \param theConstraint [in] original SketchPlugin constraint
/// \param theSolverConstraint [in] solver's constraint
virtual void addConstraint(ConstraintPtr theConstraint,
- ConstraintWrapperPtr theSolverConstraint) override;
+ ConstraintWrapperPtr theSolverConstraint);
/// \brief Add list of temporary constraints which will be destroyed
/// after the next solving of the set of constraints.
/// \param theSolverConstraint [in] solver's constraint
- virtual void addTemporaryConstraint(const ConstraintWrapperPtr& theSolverConstraint) override;
+ virtual void addTemporaryConstraint(const ConstraintWrapperPtr& theSolverConstraint);
/// \brief Convert feature to the form applicable for specific solver and map it
/// \param theFeature [in] feature to convert
/// \param theForce [in] forced feature creation
/// \return \c true if the feature has been created or updated
- virtual bool update(FeaturePtr theFeature, bool theForce = false) override;
+ virtual bool update(FeaturePtr theFeature, bool theForce = false);
/// \brief Convert attribute to the form applicable for specific solver and map it
/// \param theAttribute [in] attribute to convert
/// \param theForce [in] forced feature creation
/// \return \c true if the attribute has been created or updated
- virtual bool update(AttributePtr theAttribute, bool theForce = false) override;
+ virtual bool update(AttributePtr theAttribute, bool theForce = false);
/// \brief Removes constraint from the storage
/// \return \c true if the constraint and all its parameters are removed successfully
- virtual bool removeConstraint(ConstraintPtr theConstraint) override;
+ virtual bool removeConstraint(ConstraintPtr theConstraint);
/// \brief Update SketchPlugin features after resolving constraints
- virtual void refresh() const override;
+ virtual void refresh() const;
/// \brief Initialize solver by constraints, entities and parameters
virtual void initializeSolver();
void removeParameters(const GCS::SET_pD& theParams);
/// \brief Remove all features became invalid
- virtual void removeInvalidEntities() override;
+ virtual void removeInvalidEntities();
private:
/// \brief Verifies the constraint should not be added into the solver
/// \param theObserver [in] object which want to receive notifications
/// \param theType [in] receive notifications about changing objects
/// of theType and their derivatives
- virtual void attach(SketchSolver_Constraint* theObserver, const std::string& theType) override;
+ virtual void attach(SketchSolver_Constraint* theObserver, const std::string& theType);
/// \brief Send notification about update of the feature to all interested
- virtual void update(const FeaturePtr& theFeature) override;
+ virtual void update(const FeaturePtr& theFeature);
/// \brief Verifies the entities are not coincident yet
/// \return \c true if the entities does not coincident
/// \param theObserver [in] object which want to receive notifications
/// \param theType [in] receive notifications about changing objects
/// of theType and their derivatives
- virtual void attach(SketchSolver_Constraint* theObserver, const std::string& theType) override;
+ virtual void attach(SketchSolver_Constraint* theObserver, const std::string& theType);
/// \brief Send notification about update of the feature to all interested
- virtual void update(const FeaturePtr& theFeature) override;
+ virtual void update(const FeaturePtr& theFeature);
};
#endif
{}
/// \brief This method is used in derived objects to check consistence of constraint.
- virtual void adjustConstraint() override;
+ virtual void adjustConstraint();
protected:
/// \brief Generate list of attributes of constraint in order useful for constraints
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
private:
int myType;
/// \brief Notify this object about the feature is changed somewhere
virtual void notify(const FeaturePtr& theFeature,
- PlaneGCSSolver_Update* theUpdater) override;
+ PlaneGCSSolver_Update* theUpdater);
protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
- virtual void process() override;
+ virtual void process();
/// \brief Generate list of attributes of constraint in order useful for constraints
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
protected:
bool myInSolver; ///< shows the constraint is added to the solver
{}
/// \brief Update constraint
- virtual void update() override;
+ virtual void update();
protected:
/// \brief Generate list of attributes of constraint in order useful for constraints
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
/// \brief This method is used in derived objects to check consistence of constraint.
/// E.g. the distance between line and point may be signed.
- virtual void adjustConstraint() override;
+ virtual void adjustConstraint();
private:
double myPrevValue; ///< previous value of distance (for correct calculation of a distance sign)
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
};
#endif
SketchSolver_ConstraintFixed(FeaturePtr theFeature);
/// \brief Block or unblock events from this constraint
- virtual void blockEvents(bool isBlocked) override;
+ virtual void blockEvents(bool isBlocked);
protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
- virtual void process() override;
+ virtual void process();
/// \brief Generate list of attributes of constraint in order useful for constraints
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
/// \brief Fixed feature basing on its type
/// \param theFeature [in] feature, converted to solver specific format
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
};
#endif
/// \brief Notify this object about the feature is changed somewhere
virtual void notify(const FeaturePtr& theFeature,
- PlaneGCSSolver_Update* theUpdater) override;
+ PlaneGCSSolver_Update* theUpdater);
protected:
/// \brief Generate list of attributes of constraint in order useful for constraints
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
private:
ConstraintWrapperPtr myMiddle;
{}
/// \brief Update constraint
- virtual void update() override;
+ virtual void update();
/// \brief Notify this object about the feature is changed somewhere
- virtual void notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update*) override;
+ virtual void notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update*);
/// \brief Block or unblock events from this constraint
- virtual void blockEvents(bool isBlocked) override;
+ virtual void blockEvents(bool isBlocked);
protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
- virtual void process() override;
+ virtual void process();
/// \brief Generate list of entities of mirror constraint
- virtual void getAttributes(EntityWrapperPtr&, std::vector<EntityWrapperPtr>&) override;
+ virtual void getAttributes(EntityWrapperPtr&, std::vector<EntityWrapperPtr>&);
/// \brief This method is used in derived objects to check consistence of constraint.
/// E.g. the distance between line and point may be signed.
- virtual void adjustConstraint() override;
+ virtual void adjustConstraint();
private:
size_t myNumberOfObjects; ///< number of previously mirrored objects
{}
/// \brief Update constraint
- virtual void update() override;
+ virtual void update();
/// \brief Notify this object about the feature is changed somewhere
- virtual void notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update*) override;
+ virtual void notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update*);
/// \brief Tries to remove constraint
/// \return \c false, if current constraint contains another SketchPlugin
/// constraints (like for multiple coincidence)
- virtual bool remove() override;
+ virtual bool remove();
/// \brief Block or unblock events from this constraint
- virtual void blockEvents(bool isBlocked) override;
+ virtual void blockEvents(bool isBlocked);
protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
- virtual void process() override
+ virtual void process()
{ /* do nothing here */ }
/// \brief Collect entities which are translated or rotated (not their copies)
void getEntities(std::list<EntityWrapperPtr>& theEntities);
/// \brief Generate list of attributes of constraint in order useful for SolveSpace constraints
- virtual void getAttributes(EntityWrapperPtr&, std::vector<EntityWrapperPtr>&) override
+ virtual void getAttributes(EntityWrapperPtr&, std::vector<EntityWrapperPtr>&)
{ /* do nothing here */ }
/// \brief This method is used in derived objects to check consistence of constraint.
- virtual void adjustConstraint() override;
+ virtual void adjustConstraint();
/// \brief Update parameters of derived classes
virtual void updateLocal() = 0;
protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
- virtual void process() override;
+ virtual void process();
/// \brief Generate list of rotated entities
/// \param[out] theCenter central point of rotation
std::list<EntityWrapperPtr>& theEntities);
/// \brief This method is used in derived objects to check consistence of constraint.
- virtual void adjustConstraint() override;
+ virtual void adjustConstraint();
/// \brief Update parameters (called from base class)
- virtual void updateLocal() override;
+ virtual void updateLocal();
private:
/// \brief Convert absolute coordinates to relative coordinates
virtual void getRelative(double theAbsX, double theAbsY,
- double& theRelX, double& theRelY) override;
+ double& theRelX, double& theRelY);
/// \brief Convert relative coordinates to absolute coordinates
virtual void getAbsolute(double theRelX, double theRelY,
- double& theAbsX, double& theAbsY) override;
+ double& theAbsX, double& theAbsY);
/// \brief Apply transformation for relative coordinates
- virtual void transformRelative(double& theX, double& theY) override;
+ virtual void transformRelative(double& theX, double& theY);
/// \brief Returns name of NUMBER_OF_COPIES parameter for corresponding feature
- virtual const std::string& nameNbObjects() override;
+ virtual const std::string& nameNbObjects();
private:
AttributePoint2DPtr myCenterPointAttribute; ///< a center of rotation
protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
- virtual void process() override;
+ virtual void process();
/// \brief Generate list of translated entities
/// \param[out] theStartPoint start point of translation
bool& theFullValue, std::list<EntityWrapperPtr>& theEntities);
/// \brief This method is used in derived objects to check consistence of constraint.
- virtual void adjustConstraint() override;
+ virtual void adjustConstraint();
/// \brief Update parameters (called from base class)
- virtual void updateLocal() override;
+ virtual void updateLocal();
private:
/// \brief Convert absolute coordinates to relative coordinates
virtual void getRelative(double theAbsX, double theAbsY,
- double& theRelX, double& theRelY) override;
+ double& theRelX, double& theRelY);
/// \brief Convert relative coordinates to absolute coordinates
virtual void getAbsolute(double theRelX, double theRelY,
- double& theAbsX, double& theAbsY) override;
+ double& theAbsX, double& theAbsY);
/// \brief Apply transformation for relative coordinates
- virtual void transformRelative(double& theX, double& theY) override;
+ virtual void transformRelative(double& theX, double& theY);
/// \brief Returns name of NUMBER_OF_COPIES parameter for corresponding feature
- virtual const std::string& nameNbObjects() override;
+ virtual const std::string& nameNbObjects();
private:
AttributePoint2DPtr myStartPointAttribute;
/// \param[out] theValue numerical characteristic of constraint (e.g. distance)
/// \param[out] theAttributes list of attributes to be filled
virtual void getAttributes(EntityWrapperPtr& theValue,
- std::vector<EntityWrapperPtr>& theAttributes) override;
+ std::vector<EntityWrapperPtr>& theAttributes);
/// \brief This method is used in derived objects to check consistency of constraint.
/// E.g. the distance between line and point may be signed.
- virtual void adjustConstraint() override;
+ virtual void adjustConstraint();
private:
bool isArcArcInternal;