Salome HOME
Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003)
authorazv <azv@opencascade.com>
Mon, 7 Oct 2019 12:03:43 +0000 (15:03 +0300)
committerazv <azv@opencascade.com>
Mon, 7 Oct 2019 12:03:58 +0000 (15:03 +0300)
Complete documentation for ellipse and elliptic arc features.

src/SketchPlugin/doc/arcEllipseFeature.rst
src/SketchPlugin/doc/ellipseFeature.rst
src/SketchPlugin/doc/examples/ellipse.py

index 39a556e519bb25c05eece747fc7a37b2722473de..2387f9605524ee0fd0011f15fdcf078c888d8249 100644 (file)
@@ -19,11 +19,12 @@ Click in the view to set the center point, then move the mouse and click a secon
 
 **TUI Command**:
 
-.. py:function:: SketchEllipticArc_1 = Sketch_1.addEllipticArc(X1, Y1, X2, Y2, X3, Y3, X4, Y4, False)
-.. py:function:: [SketchPoint_1, SketchPoint_2, SketchPoint_3, SketchPoint_4, SketchPoint_5, SketchPoint_6, SketchPoint_7, SketchLine_1, SketchLine_2] = SketchEllipticArc_1.construction(center = "aux", firstFocus = "aux", secondFocus = "aux", majorAxisStart = "aux", majorAxisEnd = "aux", minorAxisStart = "aux", minorAxisEnd = "aux", majorAxis = "aux", minorAxis = "aux")
+.. py:function:: Sketch_1.addEllipticArc(CenterX, CenterY, FocusX, FocusY, StartX, StartY, EndX, EndY, Inversed)
 
     :param real: Center X.
     :param real: Center Y.
+    :param real: Focus X.
+    :param real: Focus Y.
     :param real: Start X.
     :param real: Start Y.
     :param real: End X.
index 139d5d886ec421ead013ef904b4c45d4b6ae098b..cdd84a51e0e0c9bb4ccebb130313d4225c8543c4 100644 (file)
@@ -30,13 +30,15 @@ Click in the view once to set the center point, then move the mouse and click to
 
 **TUI Command**:
 
-.. py:function:: SketchEllipse_1 = Sketch_1.addEllipse(X1, Y1, X2, Y2, X3)
-.. py:function:: [SketchPoint_1, SketchPoint_2, SketchPoint_3, SketchPoint_4, SketchPoint_5, SketchPoint_6, SketchPoint_7, SketchLine_1, SketchLine_2] = SketchEllipse_1.construction(center = "aux", firstFocus = "aux", secondFocus = "aux", majorAxisStart = "aux", majorAxisEnd = "aux", minorAxisStart = "aux", minorAxisEnd = "aux", majorAxis = "aux", minorAxis = "aux")
+.. py:function:: Sketch_1.addEllipse(CenterX, CenterY, MajorAxisX, MajorAxisY, PassedX, PassedY, True)
 
-    :param real: Start X.
-    :param real: Start Y.
+    :param real: Center X.
+    :param real: Center Y.
+    :param real: Major Axis X.
+    :param real: Major Axis Y.
     :param real: Passed X.
     :param real: Passed Y.
+    :param boolean: True mentions that the first coordinates define the center of the ellipse.
     :return: Result object.
 
 By major axis and passing point
@@ -49,13 +51,15 @@ Click in the view once to set a first point of a first axis, then move the mouse
 
 **TUI Command**:
 
-.. py:function:: SketchEllipse_1 = Sketch_1.addEllipse(X1, Y1, X2, Y2, X3)
-.. py:function:: [SketchPoint_1, SketchPoint_2, SketchPoint_3, SketchPoint_4, SketchPoint_5, SketchPoint_6, SketchPoint_7, SketchLine_1, SketchLine_2] = SketchEllipse_1.construction(center = "aux", firstFocus = "aux", secondFocus = "aux", majorAxisStart = "aux", majorAxisEnd = "aux", minorAxisStart = "aux", minorAxisEnd = "aux", majorAxis = "aux", minorAxis = "aux")
+.. py:function:: Sketch_1.addEllipse(MajorAxisStartX, MajorAxisStartY, MajorAxisEndX, MajorAxisEndY, PassedX, PassedY, False)
 
-    :param real: Start X.
-    :param real: Start Y.
+    :param real: Major Axis Start X.
+    :param real: Major Axis Start Y.
+    :param real: Major Axis End X.
+    :param real: Major Axis End Y.
     :param real: Passed X.
     :param real: Passed Y.
+    :param boolean: False mentions that the first coordinates define the start point of major axis of the ellipse.
     :return: Result object.
 
 Result
index 363880d3996965460858a8f5022f015617f555a5..870489d68b3569a9a1e1a895a4ed671555fc98eb 100644 (file)
@@ -3,9 +3,7 @@ from salome.shaper import model
 model.begin()
 partSet = model.moduleDocument()
 Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY"))
-SketchEllipse_1 = Sketch_1.addEllipse(-77.87951807228916, 4.624096385542177, -25.43227733721567, 4.190648115004366, 26.79776510151678)
-[SketchPoint_1, SketchPoint_2, SketchPoint_3, SketchPoint_4, SketchPoint_5, SketchPoint_6, SketchPoint_7, SketchLine_1, SketchLine_2] = SketchEllipse_1.construction(center = "aux", firstFocus = "aux", secondFocus = "aux", majorAxisStart = "aux", majorAxisEnd = "aux", minorAxisStart = "aux", minorAxisEnd = "aux", majorAxis = "aux", minorAxis = "aux")
-SketchEllipse_2 = Sketch_1.addEllipse(86.88433734939758, -47.4578313253012, 121.4655255189626, -45.7605950961201, 19.46152401602575)
-[SketchPoint_8, SketchPoint_9, SketchPoint_10, SketchPoint_11, SketchPoint_12, SketchPoint_13, SketchPoint_14, SketchLine_3, SketchLine_4] = SketchEllipse_2.construction(center = "aux", firstFocus = "aux", secondFocus = "aux", majorAxisStart = "aux", majorAxisEnd = "aux", minorAxisStart = "aux", minorAxisEnd = "aux", majorAxis = "aux", minorAxis = "aux")
+SketchEllipse_1 = Sketch_1.addEllipse(-70, 5, -25, 10, -50, 40, True)
+SketchEllipse_2 = Sketch_1.addEllipse(30, 50, 90, 10, 70, 50, False)
 model.do()
 model.end()