From: vsv Date: Thu, 3 Oct 2019 13:22:05 +0000 (+0300) Subject: Update help for ellipse and elliptic arc. X-Git-Tag: V9_4_0a2~4^2~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11808121a15de5f876c927db99f4d0bf6e6c2d1d;p=modules%2Fshaper.git Update help for ellipse and elliptic arc. --- diff --git a/src/SketchPlugin/doc/SketchPlugin.rst b/src/SketchPlugin/doc/SketchPlugin.rst index f60148a46..dc99970df 100644 --- a/src/SketchPlugin/doc/SketchPlugin.rst +++ b/src/SketchPlugin/doc/SketchPlugin.rst @@ -88,6 +88,8 @@ The plug-in includes the following features for creation of 2D objects: rectangleFeature.rst circleFeature.rst arcFeature.rst + ellipseFeature.rst + arcEllipseFeature.rst .. _sketch_constraints: diff --git a/src/SketchPlugin/doc/TUI_ellipseFeature.rst b/src/SketchPlugin/doc/TUI_ellipseFeature.rst new file mode 100644 index 000000000..eb0d9c48a --- /dev/null +++ b/src/SketchPlugin/doc/TUI_ellipseFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_ellipse: + +Create Skecth Ellipse +==================== + +.. literalinclude:: examples/ellipse.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_ellipticArcFeature.rst b/src/SketchPlugin/doc/TUI_ellipticArcFeature.rst new file mode 100644 index 000000000..89d3d246f --- /dev/null +++ b/src/SketchPlugin/doc/TUI_ellipticArcFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_elliptic_arc: + +Create Skecth Elliptic Arc +========================== + +.. literalinclude:: examples/elliptic_arc.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/arcEllipseFeature.rst b/src/SketchPlugin/doc/arcEllipseFeature.rst new file mode 100644 index 000000000..39a556e51 --- /dev/null +++ b/src/SketchPlugin/doc/arcEllipseFeature.rst @@ -0,0 +1,45 @@ +.. |earc.icon| image:: images/elliptic_arc.png + +Elliptic Arc +============ + +Elliptic Arc feature creates an elliptic arc segment in the current Sketch. + +To add a new Elliptic Arc to the Sketch: + +#. select in the Main Menu *Sketch - > Elliptic Arc* item or +#. click |earc.icon| **Elliptic Arc** button in Sketch toolbar: + +The following property panel appears: + +.. image:: images/elliptic_arc_panel.png + :align: center + +Click in the view to set the center point, then move the mouse and click a second time to set a point of a one semi-axis, then click to set a starting point of the arc and then to set an end point of the arc. + +**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") + + :param real: Center X. + :param real: Center Y. + :param real: Start X. + :param real: Start Y. + :param real: End X. + :param real: End Y. + :param boolean: Is inversed. + :return: Result object. + +Result +"""""" + +Created elliptic arc appears in the view. + +.. image:: images/elliptic_arc_result.png + :align: center + +.. centered:: + Elliptic arc created + +**See Also** a sample TUI Script of :ref:`tui_create_elliptic_arc` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/arcFeature.rst b/src/SketchPlugin/doc/arcFeature.rst index 19fc11a07..5cdb22aa9 100644 --- a/src/SketchPlugin/doc/arcFeature.rst +++ b/src/SketchPlugin/doc/arcFeature.rst @@ -135,6 +135,6 @@ Created arc appears in the view. :align: center .. centered:: - Circle created + Arc created **See Also** a sample TUI Script of :ref:`tui_create_arc` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/ellipseFeature.rst b/src/SketchPlugin/doc/ellipseFeature.rst index bc751c01e..139d5d886 100644 --- a/src/SketchPlugin/doc/ellipseFeature.rst +++ b/src/SketchPlugin/doc/ellipseFeature.rst @@ -1,3 +1,73 @@ +.. |ellipse.icon| image:: images/ellipse.png - Ellipse - ======= +Ellipse +======= + +The feature Ellipse creates an ellipse in the current Sketch. + +To add a new Ellipse to the Sketch: + +#. select in the Main Menu *Sketch - > Ellipse* item or +#. click |ellipse.icon| **Ellipse** button in Sketch toolbar: + +There are 2 algorithms for creation of an Ellipse: + +.. image:: images/ellipse_cent_rad_32x32.png + :align: left +**By center and major semi-axes and passing points** creates an ellipse with the given center passing through given points. + +.. image:: images/ellipse_axes_32x32.png + :align: left +**By major axis and passing point** creates an ellipse passing through the given three points. + +By center and major semi-axes and passing points +"""""""""""""""""""""""""""""""""""""""""""""""" + +.. image:: images/ellipse_panel_pt_rad.png + :align: center + +Click in the view once to set the center point, then move the mouse and click to set a point of a first semi-axis, then again move the mouse to set a point of a second semi-axis. + +**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") + + :param real: Start X. + :param real: Start Y. + :param real: Passed X. + :param real: Passed Y. + :return: Result object. + +By major axis and passing point +""""""""""""""""""""""""""""""" + +.. image:: images/ellipse_panel_3pt.png + :align: center + +Click in the view once to set a first point of a first axis, then move the mouse and click to set a second point of the first axis, then again move the mouse to set a point of a second semi-axis. + +**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") + + :param real: Start X. + :param real: Start Y. + :param real: Passed X. + :param real: Passed Y. + :return: Result object. + +Result +"""""" + +Created ellipse appears in the view. + +.. image:: images/ellipse_result.png + :align: center + +.. centered:: + Ellipse created + + +**See Also** a sample TUI Script of :ref:`tui_create_ellipse` operation. diff --git a/src/SketchPlugin/doc/examples/ellipse.py b/src/SketchPlugin/doc/examples/ellipse.py new file mode 100644 index 000000000..363880d39 --- /dev/null +++ b/src/SketchPlugin/doc/examples/ellipse.py @@ -0,0 +1,11 @@ +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") +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/elliptic_arc.py b/src/SketchPlugin/doc/examples/elliptic_arc.py new file mode 100644 index 000000000..31891b404 --- /dev/null +++ b/src/SketchPlugin/doc/examples/elliptic_arc.py @@ -0,0 +1,9 @@ +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY")) +SketchEllipticArc_1 = Sketch_1.addEllipticArc(-130.9349397590362, 14.84578313253013, -130.1669839639096, 36.73252329363673, -113.8987951807229, 13.87228915662651, -144.7734498958671, 30.30133508641346, False) +[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") +model.do() +model.end() diff --git a/src/SketchPlugin/doc/images/ellipse.png b/src/SketchPlugin/doc/images/ellipse.png new file mode 100644 index 000000000..f1f62658e Binary files /dev/null and b/src/SketchPlugin/doc/images/ellipse.png differ diff --git a/src/SketchPlugin/doc/images/ellipse_axes_32x32.png b/src/SketchPlugin/doc/images/ellipse_axes_32x32.png new file mode 100644 index 000000000..a1a83d597 Binary files /dev/null and b/src/SketchPlugin/doc/images/ellipse_axes_32x32.png differ diff --git a/src/SketchPlugin/doc/images/ellipse_cent_rad_32x32.png b/src/SketchPlugin/doc/images/ellipse_cent_rad_32x32.png new file mode 100644 index 000000000..5781d8c2d Binary files /dev/null and b/src/SketchPlugin/doc/images/ellipse_cent_rad_32x32.png differ diff --git a/src/SketchPlugin/doc/images/ellipse_panel_3pt.png b/src/SketchPlugin/doc/images/ellipse_panel_3pt.png new file mode 100644 index 000000000..fe10e4fb7 Binary files /dev/null and b/src/SketchPlugin/doc/images/ellipse_panel_3pt.png differ diff --git a/src/SketchPlugin/doc/images/ellipse_panel_pt_rad.png b/src/SketchPlugin/doc/images/ellipse_panel_pt_rad.png new file mode 100644 index 000000000..91e196d39 Binary files /dev/null and b/src/SketchPlugin/doc/images/ellipse_panel_pt_rad.png differ diff --git a/src/SketchPlugin/doc/images/ellipse_result.png b/src/SketchPlugin/doc/images/ellipse_result.png new file mode 100644 index 000000000..c0004549d Binary files /dev/null and b/src/SketchPlugin/doc/images/ellipse_result.png differ diff --git a/src/SketchPlugin/doc/images/elliptic_arc.png b/src/SketchPlugin/doc/images/elliptic_arc.png new file mode 100644 index 000000000..4bd841f74 Binary files /dev/null and b/src/SketchPlugin/doc/images/elliptic_arc.png differ diff --git a/src/SketchPlugin/doc/images/elliptic_arc_panel.png b/src/SketchPlugin/doc/images/elliptic_arc_panel.png new file mode 100644 index 000000000..81bc130a8 Binary files /dev/null and b/src/SketchPlugin/doc/images/elliptic_arc_panel.png differ diff --git a/src/SketchPlugin/doc/images/elliptic_arc_result.png b/src/SketchPlugin/doc/images/elliptic_arc_result.png new file mode 100644 index 000000000..dad8e6114 Binary files /dev/null and b/src/SketchPlugin/doc/images/elliptic_arc_result.png differ