Part Box: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
(Made many changes to try to better conform to the GUI_Command page model.)
Line 1: Line 1:
==Description==
<translate>
The Box command from the [[Part_Workbench|Part Workbench]] inserts a parametric, [http://en.wikipedia.org/wiki/Cuboid#Rectangular_cuboid rectangular cuboid], geometric primitive into the active document. By default, the Box command will insert a 10x10x10 mm cube, positioned at the origin, with the label "cube". These parameters may be modified after the object has been added.
<!--T:1-->
{{GuiCommand|Name=Part Box|MenuLocation=Part → Box||Workbenches=[[Part Module|Part]], Complete|SeeAlso=[[Part_CreatePrimitives|Part CreatePrimitives]]}}


[[Image:Part_Box.jpg|400px|Part_Box]]
== Description == <!--T:13-->
A parametric [http://en.wikipedia.org/wiki/Cuboid#Rectangular_cuboid Rectangular cuboid] primitive is available in the Part workbench from the Part tool bar, Part menu (primitives sub-menu) and the Create Primitives dialogue. Beginning in FreeCAD version 0.14, a Part Box is referred to in the GUI elements as a Cube and the default label is "Cube".


== How to use == <!--T:14-->
==How to Use==
* Click the cube icon {{KEY|[[Image:Part Box.svg|30px]]}} from the Part Workbench.
* Alternatively, you can select {{MenuCommand|Part → Primitives → Cube}} from the menu bar.


==Options==
<!--T:15-->
* N/A
In the workbench [[Part_Workbench|Part]] click on the cube icon [[Image:Part Box.png|32px]]. A cube with standard dimension and position will be created.


==Properties==
== Options == <!--T:16-->
{{Properties_Title|Base}}
The parametric rectangular cuboid is defined by the parameters
*{{PropertyData|Placement}}: Specifies the orientation and position of the shape in the 3D space.
*length,
*{{PropertyData|Label}}: Label given to the object. Change to suit your needs.
*width,
*height,
*as well as the standard set of Placement Parameters.


{{Properties_Title|Box}}
<!--T:9-->
*{{PropertyData|Length}}: The length parameter is the rectangular cuboid's dimension in the x-direction.
The default is a cube with parameter values for height, length and width being 10mm. The default placement values will locate the cuboid's local origin at the global origin (the location where all axis are 0) and the orientation such that
*{{PropertyData|Width}}: The width parameter is the rectangular cuboid's dimension in the y-direction.
*{{PropertyData|Height}}: The height parameter is the rectangular cuboid's dimension in the z-direction.


[[Image:Part_Box-Properties.jpg|Part_Box-Properties]]
<!--T:8-->
[[File:box.png|650px|a box created with the Box tool]]


==Scripting==
====Parameter==== <!--T:17-->
The Box command can by used in [[macros]] and from the python console using the following function:
* {{Parameter|Length:}} The length is the distance in the x-axis
<syntaxhighlight>
* {{Parameter|Width:}} The width is the distance in the y-axis
FreeCAD.ActiveDocument.addObject("Part::Box", "myBox")
* {{Parameter|Height:}} The height is the distance in the z-axis
</syntaxhighlight>
* Where "myBox" is the label for the Box object.
* Returns newly created object of type Box.


You can access and modify attributes of the Box object. For example, you may wish to modify the length, width and height parameters.
==FreeCAD - Version== <!--T:10-->
<syntaxhighlight>
FreeCAD.ActiveDocument.myBox.length = 25
FreeCAD.ActiveDocument.myBox.width = 15
FreeCAD.ActiveDocument.myBox.height = 30
</syntaxhighlight>


==FreeCAD - Version==
<!--T:11-->
*{{Version|0.14}}


<!--T:12-->
Beginning in FreeCAD version 0.14, a Part Box is referred to in the GUI elements as a Cube and the default label is "Cube".


*{{Version|0.14}}

Beginning in FreeCAD version 0.14, a Part Box is referred to in the GUI elements as a Cube and the default label is "Cube".
</translate>
{{clear}}
<languages/>

Revision as of 21:38, 3 September 2015

Description

The Box command from the Part Workbench inserts a parametric, rectangular cuboid, geometric primitive into the active document. By default, the Box command will insert a 10x10x10 mm cube, positioned at the origin, with the label "cube". These parameters may be modified after the object has been added.

Part_Box

How to Use

  • Click the cube icon from the Part Workbench.
  • Alternatively, you can select Part → Primitives → Cube from the menu bar.

Options

  • N/A

Properties

Base

  • DataPlacement: Specifies the orientation and position of the shape in the 3D space.
  • DataLabel: Label given to the object. Change to suit your needs.

Box

  • DataLength: The length parameter is the rectangular cuboid's dimension in the x-direction.
  • DataWidth: The width parameter is the rectangular cuboid's dimension in the y-direction.
  • DataHeight: The height parameter is the rectangular cuboid's dimension in the z-direction.

Part_Box-Properties

Scripting

The Box command can by used in macros and from the python console using the following function:

FreeCAD.ActiveDocument.addObject("Part::Box", "myBox")
  • Where "myBox" is the label for the Box object.
  • Returns newly created object of type Box.

You can access and modify attributes of the Box object. For example, you may wish to modify the length, width and height parameters.

FreeCAD.ActiveDocument.myBox.length = 25
FreeCAD.ActiveDocument.myBox.width = 15
FreeCAD.ActiveDocument.myBox.height = 30

FreeCAD - Version

Beginning in FreeCAD version 0.14, a Part Box is referred to in the GUI elements as a Cube and the default label is "Cube".