1 // Copyright (C) 2014-2020 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef SRC_SKETCHAPI_SKETCHAPI_MIRROR_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_MIRROR_H_
23 //--------------------------------------------------------------------------------------
24 #include "SketchAPI.h"
25 #include "SketchAPI_SketchEntity.h"
29 #include <SketchPlugin_ConstraintMirror.h>
31 #include <ModelHighAPI_Interface.h>
32 #include <ModelHighAPI_Macro.h>
33 //--------------------------------------------------------------------------------------
34 class ModelAPI_Object;
35 class ModelHighAPI_RefAttr;
36 //--------------------------------------------------------------------------------------
37 /**\class SketchAPI_Mirror
39 * \brief Interface for Mirror feature
41 class SketchAPI_Mirror : public ModelHighAPI_Interface
44 /// Constructor without values
46 explicit SketchAPI_Mirror(const std::shared_ptr<ModelAPI_Feature> & theFeature);
47 /// Constructor with values
49 SketchAPI_Mirror(const std::shared_ptr<ModelAPI_Feature> & theFeature,
50 const ModelHighAPI_RefAttr & theMirrorLine,
51 const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects);
54 virtual ~SketchAPI_Mirror();
56 INTERFACE_4(SketchPlugin_ConstraintMirror::ID(),
57 mirrorLine, SketchPlugin_ConstraintMirror::ENTITY_A(),
58 ModelAPI_AttributeRefAttr, /** Mirror line */,
59 mirrorList, SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(),
60 ModelAPI_AttributeRefList, /** Mirror list */,
61 referenceObjects, SketchPlugin_ConstraintMirror::ENTITY_B(),
62 ModelAPI_AttributeRefList, /** Reference objects */,
63 mirroredObjects, SketchPlugin_ConstraintMirror::ENTITY_C(),
64 ModelAPI_AttributeRefList, /** Mirrored objects */
67 /// Set list of original objects
69 void setMirrorList(const std::list<std::shared_ptr<ModelAPI_Object> >& theObjects);
71 /// List of mirrored objects
73 std::list<std::shared_ptr<SketchAPI_SketchEntity> > mirrored() const;
75 /// Dump wrapped feature
76 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
79 //! Pointer on Mirror object
80 typedef std::shared_ptr<SketchAPI_Mirror> MirrorPtr;
82 //--------------------------------------------------------------------------------------
83 //--------------------------------------------------------------------------------------
84 #endif /* SRC_SKETCHAPI_SKETCHAPI_MIRROR_H_ */