SHAPER 9.16.0
BuildAPI_Interpolation.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 BuildAPI_Interpolation_H_
21#define BuildAPI_Interpolation_H_
22
23#include "BuildAPI.h"
24
25#include <BuildPlugin_Interpolation.h>
26
27#include <ModelHighAPI_Double.h>
28#include <ModelHighAPI_Integer.h>
29#include <ModelHighAPI_Interface.h>
30#include <ModelHighAPI_Macro.h>
31#include <ModelHighAPI_Selection.h>
32
34
39{
40public:
42 BUILDAPI_EXPORT
43 explicit BuildAPI_Interpolation(const FeaturePtr& theFeature);
44
46 BUILDAPI_EXPORT
47 explicit BuildAPI_Interpolation(const FeaturePtr& theFeature,
48 const std::list<ModelHighAPI_Selection>& theBaseObjects,
49 const ModelHighAPI_Selection& theStartTangent,
50 const ModelHighAPI_Selection& theEndTangent,
51 const bool theIsClosed, const bool theIsToReorder);
52
54 BUILDAPI_EXPORT
55 explicit BuildAPI_Interpolation(const FeaturePtr& theFeature,
56 const std::list<ModelHighAPI_Selection>& theBaseObjects,
57 const bool theIsClosed, const bool theIsToReorder);
58
60 BUILDAPI_EXPORT
61 explicit BuildAPI_Interpolation(const FeaturePtr& theFeature,
62 const std::string & theXTexpression,
63 const std::string & theYTexpression,
64 const std::string & theZTexpression,
65 const ModelHighAPI_Double& theMinT,
66 const ModelHighAPI_Double& theMaxT,
67 const ModelHighAPI_Integer& theNbStep);
68
70 BUILDAPI_EXPORT
72
73 INTERFACE_13(BuildPlugin_Interpolation::ID(),
100
101
102 BUILDAPI_EXPORT
103 void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
104
106 BUILDAPI_EXPORT void setClosed(const bool theIsClosed);
107
109 BUILDAPI_EXPORT void setReorder(const bool theIsToReorder);
110
112 BUILDAPI_EXPORT void setUseTangents(const bool theIsToUseTangents);
113
115 BUILDAPI_EXPORT void setTangents(const ModelHighAPI_Selection& theStartTangent,
116 const ModelHighAPI_Selection& theEndTangent);
117
119 BUILDAPI_EXPORT
120 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
121
122private:
123 void execIfBaseNotEmpty();
124};
125
127typedef std::shared_ptr<BuildAPI_Interpolation> InterpolationPtr;
128
131BUILDAPI_EXPORT
132InterpolationPtr addInterpolation(const std::shared_ptr<ModelAPI_Document>& thePart,
133 const std::list<ModelHighAPI_Selection>& theBaseObjects,
134 const bool theIsClosed = false,
135 const bool theIsToReorder = false);
136
139BUILDAPI_EXPORT
140InterpolationPtr addInterpolation(const std::shared_ptr<ModelAPI_Document>& thePart,
141 const std::list<ModelHighAPI_Selection>& theBaseObjects,
142 const ModelHighAPI_Selection& theStartTangent,
143 const ModelHighAPI_Selection& theEndTangent,
144 const bool theIsClosed = false,
145 const bool theIsToReorder = false);
146
149BUILDAPI_EXPORT
150InterpolationPtr addInterpolation(const std::shared_ptr<ModelAPI_Document>& thePart,
151 const std::string & theXTexpression,
152 const std::string & theYTexpression,
153 const std::string & theZTexpression,
154 const ModelHighAPI_Double& theMinT,
155 const ModelHighAPI_Double& theMaxT,
156 const ModelHighAPI_Integer& theNbStep);
157
158#endif // BuildAPI_Interpolation_H_
Interface for Interpolation feature.
Definition: BuildAPI_Interpolation.h:39
virtual ~BuildAPI_Interpolation()
Destructor.
Definition: BuildAPI_Interpolation.cpp:91
virtual std::shared_ptr< ModelAPI_AttributeString > xt() const
xt expression
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeSelectionList > baseObjects() const
Base objects.
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeInteger > numstep() const
Number of steps.
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeString > yt() const
yt expression
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeBoolean > closed() const
Closed flag.
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeSelection > startTangent() const
Start point tangent.
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeDouble > maxt() const
Max.
Definition: BuildAPI_Interpolation.h:99
void setTangents(const ModelHighAPI_Selection &theStartTangent, const ModelHighAPI_Selection &theEndTangent)
Set start and end tangents.
Definition: BuildAPI_Interpolation.cpp:125
BuildAPI_Interpolation(const FeaturePtr &theFeature)
Constructor without values.
Definition: BuildAPI_Interpolation.cpp:26
virtual std::shared_ptr< ModelAPI_AttributeString > creationmethod() const
Creation method.
Definition: BuildAPI_Interpolation.h:99
void setUseTangents(const bool theIsToUseTangents)
Set use tangents flag.
Definition: BuildAPI_Interpolation.cpp:118
virtual std::shared_ptr< ModelAPI_AttributeBoolean > reorder() const
Reorder flag.
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeDouble > mint() const
Min.
Definition: BuildAPI_Interpolation.h:99
void setClosed(const bool theIsClosed)
Set closed flag.
Definition: BuildAPI_Interpolation.cpp:104
virtual std::shared_ptr< ModelAPI_AttributeSelection > endTangent() const
End point tangent.
Definition: BuildAPI_Interpolation.h:99
virtual std::shared_ptr< ModelAPI_AttributeString > useTangents() const
Use tangents flag.
Definition: BuildAPI_Interpolation.h:99
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: BuildAPI_Interpolation.cpp:135
void setReorder(const bool theIsToReorder)
Set reorder flag.
Definition: BuildAPI_Interpolation.cpp:111
virtual std::shared_ptr< ModelAPI_AttributeString > zt() const
zt expression
Definition: BuildAPI_Interpolation.h:99
void setBase(const std::list< ModelHighAPI_Selection > &theBaseObjects)
Modify base attribute of the feature.
Definition: BuildAPI_Interpolation.cpp:96
static const std::string & TANGENT_END_ID()
Attribute name of tangent for end point.
Definition: BuildPlugin_Interpolation.h:100
static const std::string & REORDER_ID()
Attribute name of reorder flag.
Definition: BuildPlugin_Interpolation.h:79
static const std::string & NUMSTEP_ID()
Attribute name of number of steps.
Definition: BuildPlugin_Interpolation.h:163
static const std::string & XT_ID()
Attribute name of x(t) equation.
Definition: BuildPlugin_Interpolation.h:107
static const std::string & USE_TANGENTS_ID()
Attribute name of use tangents flag.
Definition: BuildPlugin_Interpolation.h:86
static const std::string & MAXT_ID()
Attribute name of max t.
Definition: BuildPlugin_Interpolation.h:135
static const std::string & YT_ID()
Attribute name of y(t) equation.
Definition: BuildPlugin_Interpolation.h:114
static const std::string & ZT_ID()
Attribute name of z(t) equation.
Definition: BuildPlugin_Interpolation.h:121
static const std::string & CREATION_METHOD_ID()
Attribute name of creation method.
Definition: BuildPlugin_Interpolation.h:44
static const std::string & CLOSED_ID()
Attribute name of closed flag.
Definition: BuildPlugin_Interpolation.h:72
static const std::string & MINT_ID()
Attribute name of min t.
Definition: BuildPlugin_Interpolation.h:128
static const std::string & ID()
Feature kind.
Definition: BuildPlugin_Interpolation.h:37
static const std::string & BASE_OBJECTS_ID()
Attribute name of base objects.
Definition: BuildPlugin_Interpolation.h:65
static const std::string & TANGENT_START_ID()
Attribute name of tangent for start point.
Definition: BuildPlugin_Interpolation.h:93
Attribute that contains boolean value.
Definition: ModelAPI_AttributeBoolean.h:31
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:53
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:46
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
InterpolationPtr addInterpolation(const std::shared_ptr< ModelAPI_Document > &thePart, const std::list< ModelHighAPI_Selection > &theBaseObjects, const bool theIsClosed=false, const bool theIsToReorder=false)
Create Interpolation feature.
Definition: BuildAPI_Interpolation.cpp:182