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