User can create his own custom features.
-Corresponding folder should be created for each feature at ..\sources\src\PythonAddons\macros\.
+Corresponding folder should be created for each feature at *../sources/src/PythonAddons/macros*.
Feature description includes 4 files:
-- widget.xml,
+- widget.xml with description of property panel,
- __init__.py,
-- feature.py,
-- icon.png located at sub-folder \icons.
+- feature.py with python commands,
+- icon.png with image of button in toolbar (file is located at sub-folder /icons).
Two examples of custom features already created are:
Box
===
-Custom feature box is located at ..\sources\src\PythonAddons\macros\box.
+Custom files for feature **Box** are:
-.. literalinclude:: examples/box/feature.py
- :linenos:
- :language: python
+- empty __init__.py,
+- :ref:`create_custom_box_py`,
+- :ref:`create_custom_box_xml`,
+- icon.png located at sub-folder */icons*.
-:download:`Download this script <examples/box/feature.py>`
-
-.. literalinclude:: examples/box/widget.xml
- :linenos:
- :language: html
-
-:download:`Download this script <examples/box/widget.xml>`
+.. image:: images/box_ico.png
+ :align: center
-The feature Box creates a box solid by extrusion of rectangle.
+.. centered::
+ File icon.png
-Result in Shaper module is described below.
+The custom feature **Box** creates a box solid by extrusion of rectangle.
To create a Box in the active part:
#. select in the Main Menu *Macros - > Box* item or
-#. click **Box** button in the Macros toolbar:
-
-.. image:: images/box.png
- :align: center
-
-.. centered::
- **Box** button
+#. click **Box** button in the Macros toolbar corresponding to file icon.png:
The following property panel appears.
Input fields:
-- **DX**, **DY**, **DZ** sizes of the box along corresponded coordinate axes. The box will be created starting from the origin.
+- **Width**, **Length**, **Height** are sizes of the box along corresponding coordinate axes. The box will be created starting from the origin.
Result
""""""
-The Result of operation will be a SOLID. The edges of the box will be parallel to the coordinate axes.
-
-Name is assigned automatically:
-
-* **Box_1**, **Box_2**, ... to Feature;
-* **Box_1_1**, **Box_2_1**, ... to Result.
+The Result of operation will be Extrusion and Sketch.
-Example is shown below.
+The edges of the box will be parallel to the coordinate axes.
.. image:: images/Boxes.png
:align: center
.. centered::
- Box created
+ Box created
\ No newline at end of file
Rectangle
=========
+
+Custom files for feature **Rectangle** are:
+
+- empty __init__.py,
+- :ref:`create_custom_rectangle_py`,
+- :ref:`create_custom_rectangle_xml`,
+- icon.png located at sub-folder */icons*.
+
+.. image:: images/rectangle.png
+ :align: center
+
+.. centered::
+ File icon.png
+
+Description of custom feature :ref:`create_sketch_rectangle` is given in Sketch plug-in.
\ No newline at end of file