1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name : SketchAPI_Translation.h
6 // 16/06/16 - Sergey POKHODENKO - Creation of the file
8 #ifndef SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_
9 #define SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_
11 //--------------------------------------------------------------------------------------
12 #include "SketchAPI.h"
13 #include "SketchAPI_SketchEntity.h"
17 #include <SketchPlugin_MultiTranslation.h>
19 #include <ModelHighAPI_Interface.h>
20 #include <ModelHighAPI_Macro.h>
21 //--------------------------------------------------------------------------------------
22 class ModelAPI_Object;
23 class ModelHighAPI_Integer;
24 class ModelHighAPI_RefAttr;
25 //--------------------------------------------------------------------------------------
26 /**\class SketchAPI_Translation
28 * \brief Interface for Translation feature
30 class SketchAPI_Translation : public ModelHighAPI_Interface
33 /// Constructor without values
35 explicit SketchAPI_Translation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
36 /// Constructor with values
38 SketchAPI_Translation(const std::shared_ptr<ModelAPI_Feature> & theFeature,
39 const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
40 const ModelHighAPI_RefAttr & thePoint1,
41 const ModelHighAPI_RefAttr & thePoint2,
42 const ModelHighAPI_Integer & theNumberOfObjects,
43 bool theFullValue = false);
46 virtual ~SketchAPI_Translation();
48 INTERFACE_7(SketchPlugin_MultiTranslation::ID(),
49 translationList, SketchPlugin_MultiTranslation::TRANSLATION_LIST_ID(),
50 ModelAPI_AttributeRefList, /** Translation list */,
51 startPoint, SketchPlugin_MultiTranslation::START_POINT_ID(),
52 ModelAPI_AttributeRefAttr, /** Start point */,
53 endPoint, SketchPlugin_MultiTranslation::END_POINT_ID(),
54 ModelAPI_AttributeRefAttr, /** Start point */,
55 numberOfObjects, SketchPlugin_MultiTranslation::NUMBER_OF_OBJECTS_ID(),
56 ModelAPI_AttributeInteger, /** Number of objects */,
57 valueType, SketchPlugin_MultiTranslation::VALUE_TYPE(),
58 ModelAPI_AttributeString, /** Value type */,
59 referenceObjects, SketchPlugin_MultiTranslation::ENTITY_A(),
60 ModelAPI_AttributeRefList, /** Reference objects */,
61 translatedObjects, SketchPlugin_MultiTranslation::ENTITY_B(),
62 ModelAPI_AttributeRefList, /** Translationed objects */
65 /// List of translated objects
67 std::list<std::shared_ptr<SketchAPI_SketchEntity> > translated() const;
69 /// Dump wrapped feature
70 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
73 //! Pointer on Translation object
74 typedef std::shared_ptr<SketchAPI_Translation> TranslationPtr;
76 //--------------------------------------------------------------------------------------
77 //--------------------------------------------------------------------------------------
78 #endif /* SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_ */