]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PrimitivesPlugin/doc/boxFeature.rst
Salome HOME
Add a new mode for creating a box by a center and dimensions. (TestBox.py)
[modules/shaper.git] / src / PrimitivesPlugin / doc / boxFeature.rst
index 759fc9eb8361c1f615e11a1e902f0c88bc29ef6e..e91466c20a7808e51c04ff57042b576f08c8aada 100644 (file)
@@ -1,18 +1,16 @@
-.. _box_feature:
+.. |Box_button.icon|    image:: images/Box_button.png
 
 Box
 ===
 
-.. |box.icon|    image:: images/box.png
-
 Box feature creates a box solid.
 
 To create a Box in the active part:
 
 #. select in the Main Menu *Primitives - > Box* item  or
-#. click |box.icon| **Box** button in the toolbar:
+#. click |Box_button.icon| **Box** button in the toolbar:
 
-There are 2 algorithms for creation of a Box:
+There are 3 algorithms for creation of a Box:
 
 .. figure:: images/box_dxyz_32x32.png
    :align: left
@@ -26,6 +24,12 @@ There are 2 algorithms for creation of a Box:
 
 **By two points** 
 
+.. figure:: images/box_pt_dxyz_32x32.png
+   :align: left
+   :height: 24px
+
+**By coordinates of a point and dimensions** 
+
 --------------------------------------------------------------------------------
 
 By dimensions
@@ -81,8 +85,6 @@ Input fields:
     :param object: Second vertex of diagonal.
     :return: Result object.
 
-**Arguments**:   Part + 2 selected points (opposite vertices of the box)
-
 Result
 """"""
 
@@ -94,3 +96,41 @@ A solid box based on two points and with edges parallel to the coordinate axes.
    Created boxes
 
 **See Also** a sample TUI Script of :ref:`tui_create_boxpnt` operation.
+
+By coordinates of a point and dimensions
+----------------------------------------
+
+Box is created by dimensions along X, Y, Z axis starting from the point of coordinates (x,y,z).
+
+.. figure:: images/Box_ptAndDims.png
+   :align: center
+
+Input fields:
+
+- **OX**, **OY**, **OZ** define coordinates of the center of box.
+- **DX**, **DY**, **DZ** define dimensions (hafl length) of the box along the corresponding coordinate axes.
+  
+**TUI Command**:
+
+.. py:function:: model.addBox(Part_doc, OX, OY, OZ, DX, DY, DZ)
+
+    :param part: The current part object.
+    :param real: X coordinate of the center point
+    :param real: Y coordinate of the center point
+    :param real: Z coordinate of the center point
+    :param real: Half size along X.
+    :param real: Half size along Y.
+    :param real: Half size along Z.
+    :return: Result object.
+
+Result
+""""""
+
+A solid box whose point coordinates are the center and the dimensions are half lengths on one side and the other on the axes relative to the center.
+
+.. figure:: images/Box3.png
+   :align: center
+                  
+   Created boxes
+
+**See Also** a sample TUI Script of :ref:`tui_create_boxptdim` operation.