Salome HOME
Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003)
[modules/shaper.git] / src / SketchAPI / SketchAPI_Sketch.h
1 // Copyright (C) 2014-2019  CEA/DEN, EDF R&D
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_SKETCHAPI_SKETCHAPI_SKETCH_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_SKETCH_H_
22
23 //--------------------------------------------------------------------------------------
24 #include "SketchAPI.h"
25
26 #include <list>
27
28 #include <SketchPlugin_Sketch.h>
29 #include <SketchPlugin_SketchEntity.h>
30
31 #include <ModelHighAPI_Interface.h>
32 #include <ModelHighAPI_Macro.h>
33 //--------------------------------------------------------------------------------------
34 class ModelAPI_CompositeFeature;
35 class ModelAPI_Object;
36 class ModelHighAPI_Double;
37 class ModelHighAPI_Integer;
38 class ModelHighAPI_RefAttr;
39 class ModelHighAPI_Reference;
40 class ModelHighAPI_Selection;
41 class SketchAPI_Arc;
42 class SketchAPI_MacroArc;
43 class SketchAPI_Circle;
44 class SketchAPI_MacroCircle;
45 class SketchAPI_Ellipse;
46 class SketchAPI_MacroEllipse;
47 class SketchAPI_EllipticArc;
48 class SketchAPI_MacroEllipticArc;
49 class SketchAPI_IntersectionPoint;
50 class SketchAPI_Line;
51 class SketchAPI_Mirror;
52 class SketchAPI_Point;
53 class SketchAPI_Projection;
54 class SketchAPI_Rectangle;
55 class SketchAPI_Rotation;
56 class SketchAPI_Translation;
57 //--------------------------------------------------------------------------------------
58 /**\class SketchAPI_Sketch
59  * \ingroup CPPHighAPI
60  * \brief Interface for Sketch feature
61  */
62 class SketchAPI_Sketch : public ModelHighAPI_Interface
63 {
64 public:
65   /// Constructor without values
66   SKETCHAPI_EXPORT
67   explicit SketchAPI_Sketch(const std::shared_ptr<ModelAPI_Feature> & theFeature);
68   /// Constructor with values
69   SKETCHAPI_EXPORT
70   SketchAPI_Sketch(const std::shared_ptr<ModelAPI_Feature> & theFeature,
71                    const std::shared_ptr<GeomAPI_Ax3> & thePlane);
72   /// Constructor with values
73   SKETCHAPI_EXPORT
74   SketchAPI_Sketch(const std::shared_ptr<ModelAPI_Feature> & theFeature,
75                    const ModelHighAPI_Selection & theExternal);
76   /// Constructor with values
77   SKETCHAPI_EXPORT
78   SketchAPI_Sketch(const std::shared_ptr<ModelAPI_Feature> & theFeature,
79                    std::shared_ptr<ModelAPI_Object> thePlaneObject);
80   /// Destructor
81   SKETCHAPI_EXPORT
82   virtual ~SketchAPI_Sketch();
83
84   INTERFACE_7(SketchPlugin_Sketch::ID(),
85               origin, SketchPlugin_Sketch::ORIGIN_ID(),
86               GeomDataAPI_Point, /** Origin point */,
87               dirX, SketchPlugin_Sketch::DIRX_ID(),
88               GeomDataAPI_Dir, /** Direction of X */,
89               normal, SketchPlugin_Sketch::NORM_ID(),
90               GeomDataAPI_Dir, /** Normal */,
91               features, SketchPlugin_Sketch::FEATURES_ID(),
92               ModelAPI_AttributeRefList, /** Features */,
93               external, SketchPlugin_SketchEntity::EXTERNAL_ID(),
94               ModelAPI_AttributeSelection, /** External */,
95               solverError, SketchPlugin_Sketch::SOLVER_ERROR(),
96               ModelAPI_AttributeString, /** Solver error */,
97               solverDOF, SketchPlugin_Sketch::SOLVER_DOF(),
98               ModelAPI_AttributeString, /** Solver DOF */
99   )
100
101   /// Set plane
102   SKETCHAPI_EXPORT
103   void setPlane(const std::shared_ptr<GeomAPI_Ax3> & thePlane);
104
105   /// Change sketch plane
106   SKETCHAPI_EXPORT
107   void setPlane(const ModelHighAPI_Selection & thePlane,
108                 bool theRemoveExternalDependency = false);
109
110   /// Set external
111   SKETCHAPI_EXPORT
112   void setExternal(const ModelHighAPI_Selection & theExternal);
113
114   /// Set external
115   SKETCHAPI_EXPORT
116   void setExternal(std::shared_ptr<ModelAPI_Object> thePlaneObject);
117
118   /// Change order of sketch results (faces)
119   SKETCHAPI_EXPORT
120   void changeFacesOrder(const std::list<std::list<ModelHighAPI_Selection> >& theFaces);
121
122   /// List points not connected by constraints with other sketch entitites
123   SKETCHAPI_EXPORT
124   std::list< std::shared_ptr<SketchAPI_Point> > getFreePoints();
125
126   /// Add point
127   SKETCHAPI_EXPORT
128   std::shared_ptr<SketchAPI_Point> addPoint(
129       double theX, double theY);
130   /// Add point
131   SKETCHAPI_EXPORT
132   std::shared_ptr<SketchAPI_Point> addPoint(
133       const std::shared_ptr<GeomAPI_Pnt2d> & thePoint);
134   /// Add point
135   SKETCHAPI_EXPORT
136   std::shared_ptr<SketchAPI_Point> addPoint(const ModelHighAPI_Selection & theExternal);
137   /// Add point
138   SKETCHAPI_EXPORT
139   std::shared_ptr<SketchAPI_Point> addPoint(const std::string & theExternalName);
140
141   /// Add intersection point
142   SKETCHAPI_EXPORT
143   std::shared_ptr<SketchAPI_IntersectionPoint>
144     addIntersectionPoint(const ModelHighAPI_Selection & theExternal,
145                          bool theKeepResult = false);
146   /// Add point
147   SKETCHAPI_EXPORT
148   std::shared_ptr<SketchAPI_IntersectionPoint>
149     addIntersectionPoint(const std::string & theExternalName,
150                          bool theKeepResult = false);
151
152   /// Add line
153   SKETCHAPI_EXPORT
154   std::shared_ptr<SketchAPI_Line> addLine(
155       double theX1, double theY1, double theX2, double theY2);
156   /// Add line
157   SKETCHAPI_EXPORT
158   std::shared_ptr<SketchAPI_Line> addLine(
159       const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
160       const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint);
161   /// Add line
162   SKETCHAPI_EXPORT
163   std::shared_ptr<SketchAPI_Line> addLine(const ModelHighAPI_Selection & theExternal);
164   /// Add line
165   SKETCHAPI_EXPORT
166   std::shared_ptr<SketchAPI_Line> addLine(const std::string & theExternalName);
167
168   /// Add rectangle
169   SKETCHAPI_EXPORT
170   std::shared_ptr<SketchAPI_Rectangle> addRectangle(
171       double theX1, double theY1, double theX2, double theY2);
172   /// Add rectangle
173   SKETCHAPI_EXPORT
174   std::shared_ptr<SketchAPI_Rectangle> addRectangle(
175       const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
176       const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint);
177
178   /// Add circle
179   SKETCHAPI_EXPORT
180   std::shared_ptr<SketchAPI_Circle> addCircle(
181       double theCenterX, double theCenterY,
182       double theRadius);
183   /// Add circle
184   SKETCHAPI_EXPORT
185   std::shared_ptr<SketchAPI_Circle> addCircle(
186       const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
187       double theRadius);
188   /// Add circle
189   SKETCHAPI_EXPORT
190   std::shared_ptr<SketchAPI_MacroCircle> addCircle(
191       double theCenterX, double theCenterY,
192       double thePassedX, double thePassedY);
193   /// Add circle
194   SKETCHAPI_EXPORT
195   std::shared_ptr<SketchAPI_MacroCircle> addCircle(
196       const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint,
197       const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
198   /// Add circle
199   SKETCHAPI_EXPORT
200   std::shared_ptr<SketchAPI_MacroCircle> addCircle(
201       double theX1, double theY1,
202       double theX2, double theY2,
203       double theX3, double theY3);
204   /// Add circle
205   SKETCHAPI_EXPORT
206   std::shared_ptr<SketchAPI_MacroCircle> addCircle(
207       const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
208       const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
209       const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3);
210   /// Add circle
211   SKETCHAPI_EXPORT
212   std::shared_ptr<SketchAPI_Circle> addCircle(const ModelHighAPI_Selection & theExternal);
213   /// Add circle
214   SKETCHAPI_EXPORT
215   std::shared_ptr<SketchAPI_Circle> addCircle(const std::string & theExternalName);
216
217   /// Add arc
218   SKETCHAPI_EXPORT
219   std::shared_ptr<SketchAPI_Arc> addArc(
220       double theCenterX, double theCenterY,
221       double theStartX, double theStartY,
222       double theEndX, double theEndY,
223       bool theInversed);
224
225   /// Add arc
226   SKETCHAPI_EXPORT
227   std::shared_ptr<SketchAPI_Arc> addArc(
228       const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
229       const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
230       const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
231       bool theInversed);
232
233   /// Add arc
234   SKETCHAPI_EXPORT
235   std::shared_ptr<SketchAPI_MacroArc> addArc(
236       double theStartX, double theStartY,
237       double theEndX, double theEndY,
238       double thePassedX, double thePassedY);
239
240   /// Add arc
241   SKETCHAPI_EXPORT
242   std::shared_ptr<SketchAPI_MacroArc> addArc(
243       const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
244       const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
245       const std::shared_ptr<GeomAPI_Pnt2d>& thePassed);
246
247   /// Add transversal/tangent arc
248   SKETCHAPI_EXPORT
249   std::shared_ptr<SketchAPI_MacroArc> addArc(
250       const ModelHighAPI_RefAttr& theConnectedPoint,
251       double theEndX, double theEndY,
252       bool theInversed,
253       bool theTransversal = false);
254
255   /// Add transversal/tangent arc
256   SKETCHAPI_EXPORT
257   std::shared_ptr<SketchAPI_MacroArc> addArc(
258       const ModelHighAPI_RefAttr& theConnectedPoint,
259       const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
260       bool theInversed,
261       bool theTransversal = false);
262
263   /// Add arc
264   SKETCHAPI_EXPORT
265   std::shared_ptr<SketchAPI_Arc> addArc(const ModelHighAPI_Selection & theExternal);
266
267   /// Add arc
268   SKETCHAPI_EXPORT
269   std::shared_ptr<SketchAPI_Arc> addArc(const std::string & theExternalName);
270
271   /// Add ellipse
272   SKETCHAPI_EXPORT
273   std::shared_ptr<SketchAPI_Ellipse> addEllipse(
274       double theCenterX, double theCenterY,
275       double theFocusX, double theFocusY,
276       double theMinorRadius);
277   /// Add ellipse
278   SKETCHAPI_EXPORT
279   std::shared_ptr<SketchAPI_Ellipse> addEllipse(
280       const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
281       const std::shared_ptr<GeomAPI_Pnt2d>& theFocus,
282       double theRadius);
283   /// Add ellipse
284   SKETCHAPI_EXPORT
285   std::shared_ptr<SketchAPI_MacroEllipse> addEllipse(
286       double thePoint1X, double thePoint1Y,
287       double thePoint2X, double thePoint2Y,
288       double thePassedX, double thePassedY,
289       bool isPoint1Center = true);
290   /// Add ellipse
291   SKETCHAPI_EXPORT
292   std::shared_ptr<SketchAPI_MacroEllipse> addEllipse(
293       const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>& thePoint1,
294       const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>& thePoint2,
295       const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>& thePassedPoint,
296       bool isPoint1Center = true);
297   /// Add ellipse
298   SKETCHAPI_EXPORT
299   std::shared_ptr<SketchAPI_Ellipse> addEllipse(const ModelHighAPI_Selection & theExternal);
300   /// Add ellipse
301   SKETCHAPI_EXPORT
302   std::shared_ptr<SketchAPI_Ellipse> addEllipse(const std::string & theExternalName);
303
304   /// Add elliptic arc
305   SKETCHAPI_EXPORT
306   std::shared_ptr<SketchAPI_EllipticArc> addEllipticArc(
307       double theCenterX, double theCenterY,
308       double theFocusX, double theFocusY,
309       double theStartX, double theStartY,
310       double theEndX, double theEndY,
311       bool theInversed = false);
312   /// Add elliptic arc
313   SKETCHAPI_EXPORT
314   std::shared_ptr<SketchAPI_EllipticArc> addEllipticArc(
315       const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
316       const std::shared_ptr<GeomAPI_Pnt2d>& theFocus,
317       const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
318       const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
319       bool theInversed = false);
320   /// Add elliptic arc
321   SKETCHAPI_EXPORT
322   std::shared_ptr<SketchAPI_MacroEllipticArc> addEllipticArc(
323       const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>& theCenter,
324       const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>& theMajorAxisPoint,
325       const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>& theStartPoint,
326       const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>& theEndPoint,
327       bool theInversed = false);
328   /// Add elliptic arc
329   SKETCHAPI_EXPORT
330   std::shared_ptr<SketchAPI_EllipticArc> addEllipticArc(const ModelHighAPI_Selection & theExternal);
331   /// Add elliptic arc
332   SKETCHAPI_EXPORT
333   std::shared_ptr<SketchAPI_EllipticArc> addEllipticArc(const std::string & theExternalName);
334
335   /// Add projection
336   SKETCHAPI_EXPORT
337   std::shared_ptr<SketchAPI_Projection> addProjection(
338       const ModelHighAPI_Selection & theExternalFeature,
339       bool theKeepResult = false);
340
341   /// Add projection
342   SKETCHAPI_EXPORT
343   std::shared_ptr<SketchAPI_Projection> addProjection(const std::string & theExternalName,
344                                                       bool theKeepResult = false);
345
346   /// Add mirror
347   SKETCHAPI_EXPORT
348   std::shared_ptr<SketchAPI_Mirror> addMirror(
349       const ModelHighAPI_RefAttr & theMirrorLine,
350       const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects);
351
352   /// Add translation
353   SKETCHAPI_EXPORT
354   std::shared_ptr<SketchAPI_Translation> addTranslation(
355       const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
356       const ModelHighAPI_RefAttr & thePoint1,
357       const ModelHighAPI_RefAttr & thePoint2,
358       const ModelHighAPI_Integer & theNumberOfObjects,
359       bool theFullValue = false);
360
361   /// Add rotation
362   SKETCHAPI_EXPORT
363   std::shared_ptr<SketchAPI_Rotation> addRotation(
364       const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
365       const ModelHighAPI_RefAttr & theCenter,
366       const ModelHighAPI_Double & theAngle,
367       const ModelHighAPI_Integer & theNumberOfObjects,
368       bool theFullValue = false,
369       bool theReversed  = false);
370
371   /// Add split
372   SKETCHAPI_EXPORT
373   std::shared_ptr<ModelHighAPI_Interface> addSplit(
374       const ModelHighAPI_Reference& theFeature,
375       const std::shared_ptr<GeomAPI_Pnt2d>& thePositionPoint);
376
377   /// Add trim
378   SKETCHAPI_EXPORT
379   std::shared_ptr<ModelHighAPI_Interface> addTrim(
380       const ModelHighAPI_Reference& theFeature,
381       const std::shared_ptr<GeomAPI_Pnt2d>& thePositionPoint);
382
383   /// Set angle
384   SKETCHAPI_EXPORT
385   std::shared_ptr<ModelHighAPI_Interface> setAngle(
386       const ModelHighAPI_RefAttr & theLine1,
387       const ModelHighAPI_RefAttr & theLine2,
388       const ModelHighAPI_Double & theValue);
389
390   /// Set complementary angle
391   SKETCHAPI_EXPORT
392   std::shared_ptr<ModelHighAPI_Interface> setAngleComplementary(
393       const ModelHighAPI_RefAttr & theLine1,
394       const ModelHighAPI_RefAttr & theLine2,
395       const ModelHighAPI_Double & theValue);
396
397   /// Set backward angle (= 360 - angle)
398   SKETCHAPI_EXPORT
399   std::shared_ptr<ModelHighAPI_Interface> setAngleBackward(
400       const ModelHighAPI_RefAttr & theLine1,
401       const ModelHighAPI_RefAttr & theLine2,
402       const ModelHighAPI_Double & theValue);
403
404   /// Set coincident
405   SKETCHAPI_EXPORT
406   std::shared_ptr<ModelHighAPI_Interface> setCoincident(
407       const ModelHighAPI_RefAttr & thePoint1,
408       const ModelHighAPI_RefAttr & thePoint2);
409
410   /// Set collinear
411   SKETCHAPI_EXPORT
412   std::shared_ptr<ModelHighAPI_Interface> setCollinear(
413       const ModelHighAPI_RefAttr & theLine1,
414       const ModelHighAPI_RefAttr & theLine2);
415
416   /// Set distance
417   SKETCHAPI_EXPORT
418   std::shared_ptr<ModelHighAPI_Interface> setDistance(
419       const ModelHighAPI_RefAttr & thePoint,
420       const ModelHighAPI_RefAttr & thePointOrLine,
421       const ModelHighAPI_Double & theValue,
422       bool isSigned = false);
423
424   /// Set signed distance
425   SKETCHAPI_EXPORT
426   std::shared_ptr<ModelHighAPI_Interface> setSignedDistance(
427       const ModelHighAPI_RefAttr & thePoint,
428       const ModelHighAPI_RefAttr & thePointOrLine,
429       const ModelHighAPI_Double & theValue);
430
431   /// Set unsigned distance
432   SKETCHAPI_EXPORT
433   std::shared_ptr<ModelHighAPI_Interface> setUnsignedDistance(
434       const ModelHighAPI_RefAttr & thePoint,
435       const ModelHighAPI_RefAttr & thePointOrLine,
436       const ModelHighAPI_Double & theValue);
437
438   /// Set horizontal distance
439   SKETCHAPI_EXPORT
440   std::shared_ptr<ModelHighAPI_Interface> setHorizontalDistance(
441       const ModelHighAPI_RefAttr & thePoint1,
442       const ModelHighAPI_RefAttr & thePoint2,
443       const ModelHighAPI_Double & theValue);
444
445   /// Set vertical distance
446   SKETCHAPI_EXPORT
447   std::shared_ptr<ModelHighAPI_Interface> setVerticalDistance(
448       const ModelHighAPI_RefAttr & thePoint1,
449       const ModelHighAPI_RefAttr & thePoint2,
450       const ModelHighAPI_Double & theValue);
451
452   /// Set equal
453   SKETCHAPI_EXPORT
454   std::shared_ptr<ModelHighAPI_Interface> setEqual(
455       const ModelHighAPI_RefAttr & theObject1,
456       const ModelHighAPI_RefAttr & theObject2);
457
458   /// Set fillet
459   SKETCHAPI_EXPORT
460   std::shared_ptr<ModelHighAPI_Interface> setFillet(
461       const ModelHighAPI_RefAttr & thePoint);
462
463   /// Set fillet with additional radius constraint
464   SKETCHAPI_EXPORT
465   std::shared_ptr<ModelHighAPI_Interface> setFilletWithRadius(
466       const ModelHighAPI_RefAttr & thePoint,
467       const ModelHighAPI_Double & theRadius);
468
469   /// Set fixed
470   SKETCHAPI_EXPORT
471   std::shared_ptr<ModelHighAPI_Interface> setFixed(
472       const ModelHighAPI_RefAttr & theObject);
473
474   /// Set horizontal
475   SKETCHAPI_EXPORT
476   std::shared_ptr<ModelHighAPI_Interface> setHorizontal(
477       const ModelHighAPI_RefAttr & theLine);
478
479   /// Set length
480   SKETCHAPI_EXPORT
481   std::shared_ptr<ModelHighAPI_Interface> setLength(
482       const ModelHighAPI_RefAttr & theLine,
483       const ModelHighAPI_Double & theValue);
484
485   /// Set middle
486   SKETCHAPI_EXPORT
487   std::shared_ptr<ModelHighAPI_Interface> setMiddlePoint(
488       const ModelHighAPI_RefAttr & thePoint,
489       const ModelHighAPI_RefAttr & theLine);
490
491   /// Set parallel
492   SKETCHAPI_EXPORT
493   std::shared_ptr<ModelHighAPI_Interface> setParallel(
494       const ModelHighAPI_RefAttr & theLine1,
495       const ModelHighAPI_RefAttr & theLine2);
496
497   /// Set perpendicular
498   SKETCHAPI_EXPORT
499   std::shared_ptr<ModelHighAPI_Interface> setPerpendicular(
500       const ModelHighAPI_RefAttr & theLine1,
501       const ModelHighAPI_RefAttr & theLine2);
502
503   /// Set radius
504   SKETCHAPI_EXPORT
505   std::shared_ptr<ModelHighAPI_Interface> setRadius(
506       const ModelHighAPI_RefAttr & theCircleOrArc,
507       const ModelHighAPI_Double & theValue);
508
509   /// Set tangent
510   SKETCHAPI_EXPORT
511   std::shared_ptr<ModelHighAPI_Interface> setTangent(
512       const ModelHighAPI_RefAttr & theLine,
513       const ModelHighAPI_RefAttr & theCircle);
514
515   /// Set vertical
516   SKETCHAPI_EXPORT
517   std::shared_ptr<ModelHighAPI_Interface> setVertical(
518       const ModelHighAPI_RefAttr & theLine);
519
520   /// Set constraint value
521   SKETCHAPI_EXPORT
522   void setValue(
523       const std::shared_ptr<ModelHighAPI_Interface> & theConstraint,
524       const ModelHighAPI_Double & theValue);
525
526   /// Move point or sketch feature
527   SKETCHAPI_EXPORT
528   void move(const ModelHighAPI_RefAttr& theMovedEntity,
529             const std::shared_ptr<GeomAPI_Pnt2d>& theTargetPoint);
530
531   /// Move point or sketch feature
532   SKETCHAPI_EXPORT
533   void move(const ModelHighAPI_RefAttr& theMovedEntity,
534             double theTargetX, double theTargetY);
535
536   SKETCHAPI_EXPORT
537   std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& thePoint);
538
539   // TODO(spo): rename to selectFaces() or faces() (or add faces() -> list to SWIG)
540   /// Select face
541   SKETCHAPI_EXPORT
542   std::list<ModelHighAPI_Selection> selectFace() const;
543
544   /// Dump wrapped feature
545   SKETCHAPI_EXPORT
546   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
547
548 protected:
549   std::shared_ptr<ModelAPI_CompositeFeature> compositeFeature() const;
550
551 };
552
553 //! Pointer on Sketch object
554 typedef std::shared_ptr<SketchAPI_Sketch> SketchPtr;
555
556 /**\ingroup CPPHighAPI
557  * \brief Create Sketch feature
558  */
559 SKETCHAPI_EXPORT
560 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
561                     const std::shared_ptr<GeomAPI_Ax3> & thePlane);
562
563 /**\ingroup CPPHighAPI
564  * \brief Create Sketch feature
565  */
566 SKETCHAPI_EXPORT
567 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
568                     const ModelHighAPI_Selection & theExternal);
569
570 /**\ingroup CPPHighAPI
571  * \brief Create Sketch feature
572  */
573 SKETCHAPI_EXPORT
574 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
575                     const std::string & theExternalName);
576
577 /**\ingroup CPPHighAPI
578  * \brief Create Sketch feature
579  */
580 SKETCHAPI_EXPORT
581 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
582                     std::shared_ptr<ModelAPI_Object> thePlaneObject);
583
584 //--------------------------------------------------------------------------------------
585 //--------------------------------------------------------------------------------------
586 #endif /* SRC_SKETCHAPI_SKETCHAPI_SKETCH_H_ */