SHAPER 9.16.0
FeaturesAPI_GlueFaces.h
1// Copyright (C) 2014-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 FeatureAPI_GlueFaces_H_
21#define FeatureAPI_GlueFaces_H_
22
23#include "FeaturesAPI.h"
24
25#include <FeaturesPlugin_GlueFaces.h>
26
27#include <ModelHighAPI_Interface.h>
28#include <ModelHighAPI_Macro.h>
29
33
38{
39public:
41 FEATURESAPI_EXPORT
42 explicit FeaturesAPI_GlueFaces(const std::shared_ptr<ModelAPI_Feature>& theFeature);
43
45 FEATURESAPI_EXPORT
46 explicit FeaturesAPI_GlueFaces(const std::shared_ptr<ModelAPI_Feature>& theFeature,
47 const std::list<ModelHighAPI_Selection>& theMainObjects,
48 const ModelHighAPI_Double& theTolerance,
49 bool theIsKeepNonSolids = true);
50
52 FEATURESAPI_EXPORT
53 virtual ~FeaturesAPI_GlueFaces();
54
55 INTERFACE_3(FeaturesPlugin_GlueFaces::ID(),
62
63
64 FEATURESAPI_EXPORT
65 void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
66
68 FEATURESAPI_EXPORT
69 void setTolerance(const ModelHighAPI_Double& theTolerance);
70
72 FEATURESAPI_EXPORT
73 void setKeepNonSolids(bool theFlag);
74
76 FEATURESAPI_EXPORT
77 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
78};
79
81typedef std::shared_ptr<FeaturesAPI_GlueFaces> GlueFacesPtr;
82
85FEATURESAPI_EXPORT
86GlueFacesPtr addGlueFaces(const std::shared_ptr<ModelAPI_Document>& thePart,
87 const std::list<ModelHighAPI_Selection>& theMainObjects,
88 const ModelHighAPI_Double& theTolerance,
89 const bool theKeepNonSolids);
90
91#endif // FeatureAPI_GlueFaces_H_
Interface for Glue Faces feature.
Definition: FeaturesAPI_GlueFaces.h:38
FeaturesAPI_GlueFaces(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: FeaturesAPI_GlueFaces.cpp:27
virtual ~FeaturesAPI_GlueFaces()
Destructor.
Definition: FeaturesAPI_GlueFaces.cpp:48
virtual std::shared_ptr< ModelAPI_AttributeDouble > tolerance() const
Tolerance.
Definition: FeaturesAPI_GlueFaces.h:61
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: FeaturesAPI_GlueFaces.cpp:74
virtual std::shared_ptr< ModelAPI_AttributeBoolean > keepNonSolids() const
Keep all non-solid shapes.
Definition: FeaturesAPI_GlueFaces.h:61
void setMainObjects(const std::list< ModelHighAPI_Selection > &theMainObjects)
Set main objects.
Definition: FeaturesAPI_GlueFaces.cpp:53
void setKeepNonSolids(bool theFlag)
Set flag whether to keep all non-solid shapes.
Definition: FeaturesAPI_GlueFaces.cpp:67
void setTolerance(const ModelHighAPI_Double &theTolerance)
Set the tolerance.
Definition: FeaturesAPI_GlueFaces.cpp:60
virtual std::shared_ptr< ModelAPI_AttributeSelectionList > mainObjects() const
Main objects.
Definition: FeaturesAPI_GlueFaces.h:61
static const std::string & KEEP_NON_SOLIDS_ID()
Attribute name for keeping non-solid shapes.
Definition: FeaturesPlugin_GlueFaces.h:67
static const std::string & TOLERANCE_ID()
Attribute name for tolerance.
Definition: FeaturesPlugin_GlueFaces.h:60
static const std::string & OBJECTS_LIST_ID()
Attribute name of referenced objects.
Definition: FeaturesPlugin_GlueFaces.h:53
static const std::string & ID()
Feature kind.
Definition: FeaturesPlugin_GlueFaces.h:39
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
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
GlueFacesPtr addGlueFaces(const std::shared_ptr< ModelAPI_Document > &thePart, const std::list< ModelHighAPI_Selection > &theMainObjects, const ModelHighAPI_Double &theTolerance, const bool theKeepNonSolids)
Create Glue Faces feature.
Definition: FeaturesAPI_GlueFaces.cpp:93