SHAPER 9.16.0
FeaturesAPI_Thickness.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 FeaturesAPI_Thickness_H_
21#define FeaturesAPI_Thickness_H_
22
23#include "FeaturesAPI.h"
24
25#include <FeaturesPlugin_Thickness.h>
26
27#include <ModelHighAPI_Double.h>
28#include <ModelHighAPI_Interface.h>
29#include <ModelHighAPI_Macro.h>
30
32
37{
38public:
40 FEATURESAPI_EXPORT
41 explicit FeaturesAPI_Thickness(const std::shared_ptr<ModelAPI_Feature>& theFeature);
42
44 FEATURESAPI_EXPORT
45 explicit FeaturesAPI_Thickness(const std::shared_ptr<ModelAPI_Feature>& theFeature,
46 const ModelHighAPI_Selection& theBaseObject,
47 const ModelHighAPI_Double& theThickness,
48 const bool isInside);
49
51 FEATURESAPI_EXPORT
52 explicit FeaturesAPI_Thickness(const std::shared_ptr<ModelAPI_Feature>& theFeature,
53 const ModelHighAPI_Selection& theBaseObject,
54 const ModelHighAPI_Double& theThickness,
55 const std::list<ModelHighAPI_Selection>& theFaces,
56 const bool isInside);
57
59 FEATURESAPI_EXPORT
60 virtual ~FeaturesAPI_Thickness();
61
62 INTERFACE_5(FeaturesPlugin_Thickness::ID(),
63
66
69
72
75
78
79
80 FEATURESAPI_EXPORT
81 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
82};
83
85typedef std::shared_ptr<FeaturesAPI_Thickness> ThicknessPtr;
86
89FEATURESAPI_EXPORT
90ThicknessPtr addThickness(const std::shared_ptr<ModelAPI_Document>& thePart,
91 const ModelHighAPI_Selection& theBaseObject,
92 const ModelHighAPI_Double& theThickness,
93 const bool isInside = true);
94
97FEATURESAPI_EXPORT
98ThicknessPtr addHollowedSolid(const std::shared_ptr<ModelAPI_Document>& thePart,
99 const ModelHighAPI_Selection& theBaseObject,
100 const ModelHighAPI_Double& theThickness,
101 const std::list<ModelHighAPI_Selection>& theFaces,
102 const bool isInside = true);
103
104#endif // FeaturesAPI_Thickness_H_
Interface for Thickness feature.
Definition: FeaturesAPI_Thickness.h:37
virtual ~FeaturesAPI_Thickness()
Destructor.
Definition: FeaturesAPI_Thickness.cpp:69
FeaturesAPI_Thickness(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: FeaturesAPI_Thickness.cpp:29
virtual std::shared_ptr< ModelAPI_AttributeSelectionList > faces() const
List of faces to remove in hollowed solid mode.
Definition: FeaturesAPI_Thickness.h:77
virtual std::shared_ptr< ModelAPI_AttributeDouble > thicknessValue() const
Value of the thickness.
Definition: FeaturesAPI_Thickness.h:77
virtual std::shared_ptr< ModelAPI_AttributeString > creationMethod() const
Creation method.
Definition: FeaturesAPI_Thickness.h:77
virtual std::shared_ptr< ModelAPI_AttributeSelection > baseObject() const
Base object.
Definition: FeaturesAPI_Thickness.h:77
virtual std::shared_ptr< ModelAPI_AttributeBoolean > isInside() const
Do thicken towards inside.
Definition: FeaturesAPI_Thickness.h:77
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: FeaturesAPI_Thickness.cpp:73
static const std::string & THICKNESS_VALUE_ID()
Attribute name of thickness value.
Definition: FeaturesPlugin_Thickness.h:79
static const std::string & CREATION_METHOD_ID()
Attribute name for creation method.
Definition: FeaturesPlugin_Thickness.h:44
static const std::string & BASE_SHAPE_ID()
Attribute name of base shape.
Definition: FeaturesPlugin_Thickness.h:65
static const std::string & FACES_ID()
Attribute name of sub-faces to remove (for hollowed solid mode).
Definition: FeaturesPlugin_Thickness.h:72
static const std::string & ID()
Feature kind.
Definition: FeaturesPlugin_Thickness.h:37
static const std::string & INSIDE_ID()
Attribute name of pipe/intersection joint bool flag.
Definition: FeaturesPlugin_Thickness.h:86
Attribute that contains boolean value.
Definition: ModelAPI_AttributeBoolean.h:31
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.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:53
Class for filling ModelAPI_AttributeDouble.
Definition: ModelHighAPI_Double.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Base class for feature interfaces.
Definition: ModelHighAPI_Interface.h:46
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
ThicknessPtr addThickness(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Selection &theBaseObject, const ModelHighAPI_Double &theThickness, const bool isInside=true)
Create Thickness feature.
Definition: FeaturesAPI_Thickness.cpp:108
ThicknessPtr addHollowedSolid(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Selection &theBaseObject, const ModelHighAPI_Double &theThickness, const std::list< ModelHighAPI_Selection > &theFaces, const bool isInside=true)
Create Thickness feature.
Definition: FeaturesAPI_Thickness.cpp:119