1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketchSolver_ConstraintMultiTranslation.h
5 // Author: Artem ZHIDKOV
7 #ifndef SketchSolver_ConstraintMultiTranslation_H_
8 #define SketchSolver_ConstraintMultiTranslation_H_
10 #include "SketchSolver.h"
11 #include <SketchSolver_ConstraintMulti.h>
13 #include "GeomDataAPI_Point2D.h"
15 /** \class SketchSolver_ConstraintMultiTranslation
17 * \brief Convert translated features to the list of SolveSpace constraints
19 class SketchSolver_ConstraintMultiTranslation : public SketchSolver_ConstraintMulti
22 /// Constructor based on SketchPlugin constraint
23 SketchSolver_ConstraintMultiTranslation(ConstraintPtr theConstraint) :
24 SketchSolver_ConstraintMulti(theConstraint)
28 /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
29 virtual void process();
31 /// \brief Generate list of translated entities
32 /// \param[out] theStartPoint start point of translation
33 /// \param[out] theEndPoint final point of translation
34 /// \param[out] theFullValue applying translation using the disstance as a full or single value
35 /// \param[out] theEntities list of entities and their translated copies
36 void getAttributes(EntityWrapperPtr& theStartPoint, EntityWrapperPtr& theEndPoint,
37 bool& theFullValue, std::list< std::list<EntityWrapperPtr> >& theEntities);
39 /// \brief Update parameters (called from base class)
40 virtual void updateLocal();
43 /// \brief Returns name of NUMBER_OF_COPIES parameter for corresponding feature
44 virtual const std::string& nameNbObjects();
47 AttributePoint2DPtr myStartPointAttribute;
48 AttributePoint2DPtr myEndPointAttribute;