SHAPER 9.16.0
ConstructionAPI_Point.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 SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
21#define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
22
23#include "ConstructionAPI.h"
24
25#include <ConstructionPlugin_Point.h>
26
27#include <ModelHighAPI_Interface.h>
28#include <ModelHighAPI_Macro.h>
29
33
38{
39public:
41 CONSTRUCTIONAPI_EXPORT
42 explicit ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature);
43
45 CONSTRUCTIONAPI_EXPORT
46 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
47 const ModelHighAPI_Double& theX,
48 const ModelHighAPI_Double& theY,
49 const ModelHighAPI_Double& theZ);
50
52 CONSTRUCTIONAPI_EXPORT
53 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
54 const ModelHighAPI_Selection& theEdge,
55 const ModelHighAPI_Double& theOffset,
56 const bool theUseRatio = false,
57 const bool theReverse = false);
58
60 CONSTRUCTIONAPI_EXPORT
61 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
62 const ModelHighAPI_Selection& theObject1,
63 const ModelHighAPI_Selection& theObject2);
64
66 CONSTRUCTIONAPI_EXPORT
67 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
68 const ModelHighAPI_Selection& theObject1,
69 const ModelHighAPI_Selection& theObject2,
70 const ModelHighAPI_Selection& theObject3);
71
74 CONSTRUCTIONAPI_EXPORT
75 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
76 const ModelHighAPI_Selection& theObject,
77 const bool theIsCircularEdge = false,
78 const bool theIsXYZSelection = false);
79
81 CONSTRUCTIONAPI_EXPORT
82 virtual ~ConstructionAPI_Point();
83
84 INTERFACE_25(ConstructionPlugin_Point::ID(),
85 point, ConstructionPlugin_Point::POINT3D(),
135
136
137 CONSTRUCTIONAPI_EXPORT
138 void setByXYZ(const ModelHighAPI_Double & theX,
139 const ModelHighAPI_Double & theY,
140 const ModelHighAPI_Double & theZ);
141
143 CONSTRUCTIONAPI_EXPORT
144 void setByOffsetOnEdge(const ModelHighAPI_Selection& theEdge,
145 const ModelHighAPI_Double& theOffset,
146 const bool theUseRatio = false,
147 const bool theReverse = false);
148
150 CONSTRUCTIONAPI_EXPORT
151 void setByProjectionOnEdge(const ModelHighAPI_Selection& theVertex,
152 const ModelHighAPI_Selection& theEdge);
153
155 CONSTRUCTIONAPI_EXPORT
156 void setByProjectionOnFace(const ModelHighAPI_Selection& theVertex,
157 const ModelHighAPI_Selection& theFace);
158
160 CONSTRUCTIONAPI_EXPORT
162 const ModelHighAPI_Selection& theEdge2);
163
165 CONSTRUCTIONAPI_EXPORT
167 const ModelHighAPI_Selection& theFace);
168
170 CONSTRUCTIONAPI_EXPORT
172 const ModelHighAPI_Selection& theFace2,
173 const ModelHighAPI_Selection& theFace3);
174
176 CONSTRUCTIONAPI_EXPORT
177 void setByCenterOfGravity(const ModelHighAPI_Selection& theObject);
178
180 CONSTRUCTIONAPI_EXPORT
181 void setByCenterOfCircle(const ModelHighAPI_Selection& theObject);
182
184 CONSTRUCTIONAPI_EXPORT
185 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
186};
187
189typedef std::shared_ptr<ConstructionAPI_Point> PointPtr;
190
193CONSTRUCTIONAPI_EXPORT
194PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
195 const ModelHighAPI_Double & theX,
196 const ModelHighAPI_Double & theY,
197 const ModelHighAPI_Double & theZ);
198
201CONSTRUCTIONAPI_EXPORT
202PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
203 const ModelHighAPI_Selection& theEdge,
204 const ModelHighAPI_Double& theOffset,
205 const bool theUseRatio = false,
206 const bool theReverse = false);
207
210CONSTRUCTIONAPI_EXPORT
211PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
212 const ModelHighAPI_Selection& theObject1,
213 const ModelHighAPI_Selection& theObject2);
214
218CONSTRUCTIONAPI_EXPORT
219PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
220 const ModelHighAPI_Selection& theObject1,
221 const ModelHighAPI_Selection& theObject2,
222 const ModelHighAPI_Double& theDistanceValue,
223 const bool theReverse = false);
224
227CONSTRUCTIONAPI_EXPORT
228PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
229 const ModelHighAPI_Selection& theObject1,
230 const ModelHighAPI_Selection& theObject2,
231 const ModelHighAPI_Selection& theObject3);
232
235CONSTRUCTIONAPI_EXPORT
236PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
237 const ModelHighAPI_Selection& theObject,
238 const bool theIsCircularEdge = false);
239
242CONSTRUCTIONAPI_EXPORT
243PointPtr addPointXYZ(const std::shared_ptr<ModelAPI_Document> & thePart,
244 const ModelHighAPI_Selection& theObject);
245
246#endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */
Interface for Point feature.
Definition: ConstructionAPI_Point.h:38
void setByProjectionOnEdge(const ModelHighAPI_Selection &theVertex, const ModelHighAPI_Selection &theEdge)
Set point and edge for projection.
Definition: ConstructionAPI_Point.cpp:197
void setByLinesIntersection(const ModelHighAPI_Selection &theEdge1, const ModelHighAPI_Selection &theEdge2)
Set lines for intersections.
Definition: ConstructionAPI_Point.cpp:225
virtual std::shared_ptr< GeomDataAPI_Point > point() const
Point attribute.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > intersectionLine2() const
Line for intersection.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > pointToProject() const
Point to project.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > intersectionLine() const
Line for intersection.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeDouble > ratio() const
Ratio.
Definition: ConstructionAPI_Point.h:134
void setByCenterOfGravity(const ModelHighAPI_Selection &theObject)
Set object for center of gravity.
Definition: ConstructionAPI_Point.cpp:266
virtual std::shared_ptr< ModelAPI_AttributeDouble > distance() const
Distance.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > intersectionPlane3() const
Plane for intersection.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > edgeForPointProjection() const
Edge for point projection.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > intersectionPlane() const
Plane for intersection.
Definition: ConstructionAPI_Point.h:134
void setByProjectionOnFace(const ModelHighAPI_Selection &theVertex, const ModelHighAPI_Selection &theFace)
Set point and face for projection.
Definition: ConstructionAPI_Point.cpp:211
virtual std::shared_ptr< ModelAPI_AttributeSelection > objectForCenterOfGravity() const
Object for center of gravity.
Definition: ConstructionAPI_Point.h:134
ConstructionAPI_Point(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: ConstructionAPI_Point.cpp:32
virtual std::shared_ptr< ModelAPI_AttributeString > projectionType() const
Type of the point projection.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeString > geometricalPropertyType() const
Type of the geometrical property.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeString > creationMethod() const
Creation method.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeBoolean > reverseOffset() const
Reverse offset.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeString > intersectionType() const
Type of the intersection.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > intersectionLine1() const
Line for intersection.
Definition: ConstructionAPI_Point.h:134
void setByXYZ(const ModelHighAPI_Double &theX, const ModelHighAPI_Double &theY, const ModelHighAPI_Double &theZ)
Set point values.
Definition: ConstructionAPI_Point.cpp:165
virtual std::shared_ptr< ModelAPI_AttributeString > offsetType() const
Type of the offset on edge.
Definition: ConstructionAPI_Point.h:134
virtual ~ConstructionAPI_Point()
Destructor.
Definition: ConstructionAPI_Point.cpp:159
virtual std::shared_ptr< ModelAPI_AttributeString > useOffset() const
Use offset.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > objectForCenterOfCircle() const
Object for center of circle.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeBoolean > reverse() const
Reverse.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > faceForPointProjection() const
Face for point projection.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > intersectionPlane1() const
Plane for intersection.
Definition: ConstructionAPI_Point.h:134
void setByOffsetOnEdge(const ModelHighAPI_Selection &theEdge, const ModelHighAPI_Double &theOffset, const bool theUseRatio=false, const bool theReverse=false)
Set edge and distance on it for point.
Definition: ConstructionAPI_Point.cpp:176
virtual std::shared_ptr< ModelAPI_AttributeSelection > edge() const
Edge.
Definition: ConstructionAPI_Point.h:134
void setByCenterOfCircle(const ModelHighAPI_Selection &theObject)
Set object for center of circular edge.
Definition: ConstructionAPI_Point.cpp:278
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: ConstructionAPI_Point.cpp:290
virtual std::shared_ptr< ModelAPI_AttributeDouble > offset() const
Offset.
Definition: ConstructionAPI_Point.h:134
virtual std::shared_ptr< ModelAPI_AttributeSelection > intersectionPlane2() const
Plane for intersection.
Definition: ConstructionAPI_Point.h:134
void setByLineAndPlaneIntersection(const ModelHighAPI_Selection &theEdge, const ModelHighAPI_Selection &theFace)
Set line and plane for intersections.
Definition: ConstructionAPI_Point.cpp:238
void setByPlanesIntersection(const ModelHighAPI_Selection &theFace1, const ModelHighAPI_Selection &theFace2, const ModelHighAPI_Selection &theFace3)
Set faces for intersections.
Definition: ConstructionAPI_Point.cpp:251
static const std::string & REVERSE()
Attribute name for reverse flag.
Definition: ConstructionPlugin_Point.h:155
static const std::string & INTERSECTION_LINE_1()
Attribute name for selected first intersection line.
Definition: ConstructionPlugin_Point.h:232
static const std::string & OBJECT_FOR_CENTER_OF_GRAVITY()
Attribute name for selected object for center of gravity.
Definition: ConstructionPlugin_Point.h:323
static const std::string & ID()
Point kind.
Definition: ConstructionPlugin_Point.h:58
static const std::string & INTERSECTION_PLANE_2()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:288
static const std::string & OBJECT_FOR_CENTER_OF_CIRCLE()
Attribute name for selected object for center of cricle.
Definition: ConstructionPlugin_Point.h:330
static const std::string & EDGE()
Attribute name for selected edge.
Definition: ConstructionPlugin_Point.h:113
static const std::string & POINT_TO_PROJECT()
Attribute name for point to projection.
Definition: ConstructionPlugin_Point.h:162
static const std::string & FACE_FOR_POINT_PROJECTION()
Attribute name for face for point projection.
Definition: ConstructionPlugin_Point.h:197
static const std::string & REVERSE_OFFSET()
Attribute name for reverse offset for the intersection plane.
Definition: ConstructionPlugin_Point.h:274
static const std::string & INTERSECTION_PLANE_3()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:295
static const std::string & INTERSECTION_TYPE()
Attribute name for intersection type.
Definition: ConstructionPlugin_Point.h:204
static const std::string & DISTANCE()
Attribute name for distance.
Definition: ConstructionPlugin_Point.h:141
static const std::string & RATIO()
Attribute name for percent flag.
Definition: ConstructionPlugin_Point.h:148
static const std::string & INTERSECTION_LINE()
Attribute name for selected intersection line.
Definition: ConstructionPlugin_Point.h:246
static const std::string & OFFSET()
Attribute name for offset for the intersection plane.
Definition: ConstructionPlugin_Point.h:267
static const std::string & PROJECTION_TYPE()
Attribute name for projection type.
Definition: ConstructionPlugin_Point.h:169
static const std::string & GEOMETRICAL_PROPERTY_TYPE()
Attribute name for property type.
Definition: ConstructionPlugin_Point.h:302
static const std::string & INTERSECTION_PLANE_1()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:281
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: ConstructionPlugin_Point.h:65
static const std::string & OFFSET_TYPE()
Attribute name for offset type on selected edge.
Definition: ConstructionPlugin_Point.h:120
static const std::string & USE_OFFSET()
Attribute name for use offset for the intersection plane.
Definition: ConstructionPlugin_Point.h:260
static const std::string & INTERSECTION_PLANE()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:253
static const std::string & EDGE_FOR_POINT_PROJECTION()
Attribute name for edge for point projection.
Definition: ConstructionPlugin_Point.h:190
static const std::string & INTERSECTION_LINE_2()
Attribute name for selected second intersection line.
Definition: ConstructionPlugin_Point.h:239
Attribute that contains 3D point coordinates.
Definition: GeomDataAPI_Point.h:36
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 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
PointPtr addPointXYZ(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Selection &theObject)
Create Point feature by coordinates using the selected vertex.
Definition: ConstructionAPI_Point.cpp:419
PointPtr addPoint(const std::shared_ptr< ModelAPI_Document > &thePart, const ModelHighAPI_Double &theX, const ModelHighAPI_Double &theY, const ModelHighAPI_Double &theZ)
Create Point feature.
Definition: ConstructionAPI_Point.cpp:353