1 // Copyright (C) 2014-2019 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_OFFSET_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_OFFSET_H_
23 //--------------------------------------------------------------------------------------
24 #include "SketchAPI.h"
25 #include "SketchAPI_SketchEntity.h"
29 #include <SketchPlugin_Offset.h>
31 #include <ModelHighAPI_Interface.h>
32 #include <ModelHighAPI_Macro.h>
33 //--------------------------------------------------------------------------------------
34 class ModelAPI_Object;
35 class ModelHighAPI_RefAttr;
36 class ModelHighAPI_Double;
37 //--------------------------------------------------------------------------------------
38 /**\class SketchAPI_Offset
40 * \brief Interface for Offset feature
42 class SketchAPI_Offset : public ModelHighAPI_Interface
45 /// Constructor without values
47 explicit SketchAPI_Offset(const std::shared_ptr<ModelAPI_Feature> & theFeature);
48 /// Constructor with values
50 SketchAPI_Offset(const std::shared_ptr<ModelAPI_Feature> & theFeature,
51 const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
52 const ModelHighAPI_Double & theOffsetValue,
56 virtual ~SketchAPI_Offset();
58 INTERFACE_3(SketchPlugin_Offset::ID(),
60 edgesList, SketchPlugin_Offset::EDGES_ID(),
61 ModelAPI_AttributeRefList, /** Offset edges list */,
63 value, SketchPlugin_Offset::VALUE_ID(),
64 ModelAPI_AttributeDouble, /** Value */,
66 reversed, SketchPlugin_Offset::REVERSED_ID(),
67 ModelAPI_AttributeBoolean, /** Negative value */
70 /// List of created objects
72 std::list<std::shared_ptr<SketchAPI_SketchEntity> > offset() const;
74 /// Dump wrapped feature
75 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
78 //! Pointer on Offset object
79 typedef std::shared_ptr<SketchAPI_Offset> OffsetPtr;
81 //--------------------------------------------------------------------------------------
82 //--------------------------------------------------------------------------------------
83 #endif /* SRC_SKETCHAPI_SKETCHAPI_OFFSET_H_ */