SHAPER  9.12.0
FeaturesAPI_MultiRotation.h
1 // Copyright (C) 2017-2023 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 // File: FeaturesAPI_MultiRotation.h
21 // Created: 04 Apr 2017
22 // Author: Clarisse Genrault (CEA)
23 
24 #ifndef FEATURESAPI_MULTIROTATION_H_
25 #define FEATURESAPI_MULTIROTATION_H_
26 
27 #include "FeaturesAPI.h"
28 
29 #include <FeaturesPlugin_MultiRotation.h>
30 
31 #include <ModelHighAPI_Integer.h>
32 #include <ModelHighAPI_Interface.h>
33 #include <ModelHighAPI_Macro.h>
34 
38 
43 {
44 public:
46  FEATURESAPI_EXPORT
47  explicit FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature);
48 
50  FEATURESAPI_EXPORT
51  FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
52  const std::list<ModelHighAPI_Selection>& theMainObjects,
53  const ModelHighAPI_Selection& theAxis,
54  const ModelHighAPI_Integer& theNumber);
55 
57  FEATURESAPI_EXPORT
58  FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
59  const std::list<ModelHighAPI_Selection>& theMainObjects,
60  const ModelHighAPI_Selection& theAxis,
61  const ModelHighAPI_Double& theStep,
62  const ModelHighAPI_Integer& theNumber);
63 
65  FEATURESAPI_EXPORT
67 
79  )
80 
81 
82  FEATURESAPI_EXPORT
83  void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
84 
86  FEATURESAPI_EXPORT
87  void setAxisAngular(const ModelHighAPI_Selection& theAxis);
88 
90  FEATURESAPI_EXPORT
91  void setStepAngular(const ModelHighAPI_Double& theStep);
92 
94  FEATURESAPI_EXPORT
95  void setNumberAngular(const ModelHighAPI_Integer& theNumber);
96 
98  FEATURESAPI_EXPORT
99  virtual void dump(ModelHighAPI_Dumper& theDumper) const;
100 };
101 
103 typedef std::shared_ptr<FeaturesAPI_MultiRotation> MultiRotationPtr;
104 
107 FEATURESAPI_EXPORT
108 MultiRotationPtr addMultiRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
109  const std::list<ModelHighAPI_Selection>& theMainObjects,
110  const ModelHighAPI_Selection& theAxis,
111  const ModelHighAPI_Double& theStep,
112  const ModelHighAPI_Integer& theNumber = ModelHighAPI_Integer(L""),
113  const bool keepSubResults = false);
114 
115 #endif // FEATURESAPI_MULTIROTATION_H_
Interface for Translation feature.
Definition: FeaturesAPI_MultiRotation.h:43
virtual std::shared_ptr< ModelAPI_AttributeString > useStepAngular() const
Use step angular.
Definition: FeaturesAPI_MultiRotation.h:79
virtual std::shared_ptr< ModelAPI_AttributeSelection > axisAngular() const
Angular direction.
Definition: FeaturesAPI_MultiRotation.h:79
void setStepAngular(const ModelHighAPI_Double &theStep)
Modify CreationMethod, step_angular attribute of the feature.
Definition: FeaturesAPI_MultiRotation.cpp:96
FeaturesAPI_MultiRotation(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: FeaturesAPI_MultiRotation.cpp:31
virtual std::shared_ptr< ModelAPI_AttributeDouble > stepAngular() const
Step angular.
Definition: FeaturesAPI_MultiRotation.h:79
void setNumberAngular(const ModelHighAPI_Integer &theNumber)
Modify CreationMethod, nb_angular attribute of the feature.
Definition: FeaturesAPI_MultiRotation.cpp:104
virtual ~FeaturesAPI_MultiRotation()
Destructor.
Definition: FeaturesAPI_MultiRotation.cpp:74
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: FeaturesAPI_MultiRotation.cpp:112
void setAxisAngular(const ModelHighAPI_Selection &theAxis)
Modify CreationMethod, axis_angular attribute of the feature.
Definition: FeaturesAPI_MultiRotation.cpp:88
void setMainObjects(const std::list< ModelHighAPI_Selection > &theMainObjects)
Set main objects.
Definition: FeaturesAPI_MultiRotation.cpp:79
virtual std::shared_ptr< ModelAPI_AttributeInteger > nbAngular() const
Number of copies for angular.
Definition: FeaturesAPI_MultiRotation.h:79
virtual std::shared_ptr< ModelAPI_AttributeSelectionList > mainObjects() const
Main objects.
Definition: FeaturesAPI_MultiRotation.h:79
static const std::string & OBJECTS_LIST_ID()
Attribute name of referenced objects.
Definition: FeaturesPlugin_MultiRotation.h:51
static const std::string & USE_ANGULAR_STEP_ID()
Attribute name for use angular step.
Definition: FeaturesPlugin_MultiRotation.h:65
static const std::string & AXIS_ANGULAR_ID()
Attribute name of the angular direction.
Definition: FeaturesPlugin_MultiRotation.h:58
static const std::string & ID()
Multi-rotation kind.
Definition: FeaturesPlugin_MultiRotation.h:44
static const std::string & NB_COPIES_ANGULAR_ID()
Attribute name of number of copies for angular.
Definition: FeaturesPlugin_MultiRotation.h:79
static const std::string & STEP_ANGULAR_ID()
Attribute name of step for the angular.
Definition: FeaturesPlugin_MultiRotation.h:72
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.h:34
API for the attribute that contains integer (int).
Definition: ModelAPI_AttributeInteger.h:34
Attribute that contains list of references to the sub-shapes with possibility to manage them.
Definition: ModelAPI_AttributeSelectionList.h:37
Attribute that contains reference to the sub-shape of some result, the selected shape.
Definition: ModelAPI_AttributeSelection.h:35
API for the attribute that contains std (null terminated) string.
Definition: ModelAPI_AttributeString.h:33
Document for internal data structure of any object storage.
Definition: ModelAPI_Document.h:52
Class for filling ModelAPI_AttributeDouble.
Definition: ModelHighAPI_Double.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Class for filling ModelAPI_AttributeInteger.
Definition: ModelHighAPI_Integer.h:36
Base class for feature interfaces.
Definition: ModelHighAPI_Interface.h:42
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
MultiRotationPtr addMultiRotation(const std::shared_ptr< ModelAPI_Document > &thePart, const std::list< ModelHighAPI_Selection > &theMainObjects, const ModelHighAPI_Selection &theAxis, const ModelHighAPI_Double &theStep, const ModelHighAPI_Integer &theNumber=ModelHighAPI_Integer(L""), const bool keepSubResults=false)
Create MultiRotation feature.
Definition: FeaturesAPI_MultiRotation.cpp:143