From: azv Date: Mon, 7 Oct 2019 12:03:43 +0000 (+0300) Subject: Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003) X-Git-Tag: V9_4_0a2~4^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1942d1ece970efdd4d9472de9f7e513671c23a77;p=modules%2Fshaper.git Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003) Complete documentation for ellipse and elliptic arc features. --- diff --git a/src/SketchPlugin/doc/arcEllipseFeature.rst b/src/SketchPlugin/doc/arcEllipseFeature.rst index 39a556e51..2387f9605 100644 --- a/src/SketchPlugin/doc/arcEllipseFeature.rst +++ b/src/SketchPlugin/doc/arcEllipseFeature.rst @@ -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. diff --git a/src/SketchPlugin/doc/ellipseFeature.rst b/src/SketchPlugin/doc/ellipseFeature.rst index 139d5d886..cdd84a51e 100644 --- a/src/SketchPlugin/doc/ellipseFeature.rst +++ b/src/SketchPlugin/doc/ellipseFeature.rst @@ -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 diff --git a/src/SketchPlugin/doc/examples/ellipse.py b/src/SketchPlugin/doc/examples/ellipse.py index 363880d39..870489d68 100644 --- a/src/SketchPlugin/doc/examples/ellipse.py +++ b/src/SketchPlugin/doc/examples/ellipse.py @@ -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()