Box¶
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 button in the toolbar:
There are 3 algorithms for creation of a Box:
By dimensions
By two points
By coordinates of a point and dimensions
By dimensions¶
Box is created by dimensions along X, Y, Z axis starting from the origin.
Input fields:
DX, DY, DZ define dimensions of the box along the corresponding coordinate axes.
TUI Command:
-
model.
addBox
(Part_doc, DX, DY, DZ)¶ - Parameters
part – The current part object.
real – Size along X.
real – Size along Y.
real – Size along Z.
- Returns
Result object.
Result¶
A solid box based on the origin of coordinates and with edges parallel to the coordinate axes.
See Also a sample TUI Script of a Create Box by dimensions operation.
By two points¶
Box is created by two points of the box diagonal.
Input fields:
Point 1 and Point 2 define diagonal points of the box selected in 3D OCC viewer or object browser.
TUI Command:
-
model.
addBox
(Part_doc, point1, point2)¶ - Parameters
part – The current part object.
object – First vertex of diagonal.
object – Second vertex of diagonal.
- Returns
Result object.
Result¶
A solid box based on two points and with edges parallel to the coordinate axes.
See Also a sample TUI Script of Create Box by points 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).
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:
-
model.
addBox
(Part_doc, OX, OY, OZ, DX, DY, DZ)¶ - Parameters
part – The current part object.
real – X coordinate of the center point
real – Y coordinate of the center point
real – Z coordinate of the center point
real – Half size along X.
real – Half size along Y.
real – Half size along Z.
- Returns
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.
See Also a sample TUI Script of Create Box coordinates of a point and dimensions operation.