rectangleFeature.rst
circleFeature.rst
arcFeature.rst
+ ellipseFeature.rst
+ arcEllipseFeature.rst
.. _sketch_constraints:
--- /dev/null
+
+ .. _tui_create_ellipse:
+
+Create Skecth Ellipse
+====================
+
+.. literalinclude:: examples/ellipse.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/ellipse.py>`
--- /dev/null
+
+ .. _tui_create_elliptic_arc:
+
+Create Skecth Elliptic Arc
+==========================
+
+.. literalinclude:: examples/elliptic_arc.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/elliptic_arc.py>`
--- /dev/null
+.. |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
: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
+.. |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.
--- /dev/null
+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()
--- /dev/null
+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()