SHAPER 9.16.0
FeaturesPlugin_Chamfer.h
1// Copyright (C) 2017-2026 CEA, EDF
2//
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.
7//
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.
12//
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
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef FeaturesPlugin_Chamfer_H_
21#define FeaturesPlugin_Chamfer_H_
22
23#include "FeaturesPlugin_VersionedChFi.h"
24
30{
31public:
33 inline static const std::string& ID()
34 {
35 static const std::string MY_ID("Chamfer");
36 return MY_ID;
37 }
38
40 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
41 {
42 static std::string MY_KIND = FeaturesPlugin_Chamfer::ID();
43 return MY_KIND;
44 }
45
46 inline static const std::string& CREATION_METHOD()
47 {
48 static std::string MY_CREATION_METHOD("creation_method");
49 return MY_CREATION_METHOD;
50 }
51
52 inline static const std::string CREATION_METHOD_DISTANCE_DISTANCE()
53 {
54 static std::string MY_SINGLE_RADIUS("distance_distance");
55 return MY_SINGLE_RADIUS;
56 }
57
58 inline static const std::string CREATION_METHOD_DISTANCE_ANGLE()
59 {
60 static std::string MY_VARYING_RADIUS("distance_angle");
61 return MY_VARYING_RADIUS;
62 }
63
65 inline static const std::string& OBJECT_LIST_ID()
66 {
67 static const std::string MY_OBJECT_LIST_ID("main_objects");
68 return MY_OBJECT_LIST_ID;
69 }
70
72 inline static const std::string& D1_ID()
73 {
74 static const std::string MY_D1_ID("d1");
75 return MY_D1_ID;
76 }
77
79 inline static const std::string& D2_ID()
80 {
81 static const std::string MY_D2_ID("d2");
82 return MY_D2_ID;
83 }
84
86 inline static const std::string& D_ID()
87 {
88 static const std::string MY_D_ID("d");
89 return MY_D_ID;
90 }
91
93 inline static const std::string& ANGLE_ID()
94 {
95 static const std::string MY_ANGLE_ID("angle");
96 return MY_ANGLE_ID;
97 }
98
100 FEATURESPLUGIN_EXPORT virtual void initAttributes();
101
104
105private:
107 virtual std::shared_ptr<ModelAPI_Attribute> objectsAttribute();
108
110 virtual const std::string& modifiedShapePrefix() const;
111
113 virtual std::shared_ptr<GeomAlgoAPI_MakeShape>
114 performOperation(const GeomShapePtr& theSolid, const ListOfShape& theEdges);
115};
116
117#endif
Feature for applying the Chamfer operations on Solids.
Definition: FeaturesPlugin_Chamfer.h:30
static const std::string & D1_ID()
Attribute name of D1.
Definition: FeaturesPlugin_Chamfer.h:72
static const std::string & ANGLE_ID()
Attribute name of Angle.
Definition: FeaturesPlugin_Chamfer.h:93
static const std::string & D2_ID()
Attribute name of D2.
Definition: FeaturesPlugin_Chamfer.h:79
static const std::string & D_ID()
Attribute name of D.
Definition: FeaturesPlugin_Chamfer.h:86
virtual void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: FeaturesPlugin_Chamfer.cpp:77
FeaturesPlugin_Chamfer()
Use plugin manager for features creation.
Definition: FeaturesPlugin_Chamfer.cpp:73
virtual const std::string & getKind()
Definition: FeaturesPlugin_Chamfer.h:40
static const std::string & ID()
Feature kind.
Definition: FeaturesPlugin_Chamfer.h:33
static const std::string & OBJECT_LIST_ID()
Attribute name of main objects.
Definition: FeaturesPlugin_Chamfer.h:65
Base feature for the Fillet and the Chamfer operations which supports versioning.
Definition: FeaturesPlugin_VersionedChFi.h:37