]> SALOME platform Git repositories - modules/shaper.git/blob - src/PrimitivesPlugin/doc/boxFeature.rst
Salome HOME
a8d641e8c14f1b309755ca8f05ad0bcdb1e97cd4
[modules/shaper.git] / src / PrimitivesPlugin / doc / boxFeature.rst
1 .. _box_feature:
2
3 Box
4 ===
5
6 .. |box.icon|    image:: images/box.png
7
8 Box feature creates a box solid.
9
10 To create a Box in the active part:
11
12 #. select in the Main Menu *Primitives - > Box* item  or
13 #. click |box.icon| **Box** button in the toolbar:
14
15 There are 2 algorithms for creation of a Box:
16
17 .. image:: images/box_dxyz_32x32.png
18    :align: left
19    :height: 24px
20
21 **By dimensions** 
22
23 .. image:: images/box_2pt_32x32.png
24    :align: left
25    :height: 24px
26
27 **By two points** 
28
29 --------------------------------------------------------------------------------
30
31 By dimensions
32 -------------
33
34 Box is created by dimensions along X, Y, Z axis starting from the origin.
35
36 .. image:: images/Box_dimensions.png
37    :align: center
38
39 Input fields:
40
41 - **DX**, **DY**, **DZ** define dimensions of the box along the corresponding coordinate axes. 
42
43 **TUI Command**:
44
45 .. py:function:: model.addBox(Part_doc, DX, DY, DZ)
46   
47     :param part: The current part object.
48     :param real: Size along X.
49     :param real: Size along Y.
50     :param real: Size along Z.
51     :return: Result object.
52
53 Result
54 """"""
55
56 A solid box based on the origin of coordinates and with edges parallel to the coordinate axes.
57
58 .. image:: images/Box1.png
59            :align: center
60
61 **See Also** a sample TUI Script of a :ref:`tui_create_boxdim` operation.
62
63 By two points
64 -------------
65
66 Box is created by two points of the box diagonal.
67
68 .. image:: images/Box_2points.png
69          :align: center
70
71 Input fields:
72
73 - **Point 1** and **Point 2**  define diagonal points of the box selected in 3D OCC viewer or object browser.
74   
75 **TUI Command**:
76
77 .. py:function:: model.addBox(Part_doc, point1, point2)
78
79     :param part: The current part object.
80     :param object: First vertex of diagonal.
81     :param object: Second vertex of diagonal.
82     :return: Result object.
83
84 **Arguments**:   Part + 2 selected points (opposite vertices of the box)
85
86 Result
87 """"""
88
89 A solid box based on two points and with edges parallel to the coordinate axes.
90
91 .. image:: images/Box2.png
92            :align: center
93                    
94 .. centered::
95    Created boxes
96
97 **See Also** a sample TUI Script of :ref:`tui_create_boxpnt` operation.