Part Plane: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 56: Line 56:
* {{PropertyData|Length|Length}}: Length is the dimension along the X axis The default value is 10 mm
* {{PropertyData|Length|Length}}: Length is the dimension along the X axis The default value is 10 mm
* {{PropertyData|Width|Length}}: Width is the size of the Y-axis The default value is 10 mm
* {{PropertyData|Width|Length}}: Width is the size of the Y-axis The default value is 10 mm

=== View === <!--T:22-->

<!--T:23-->
You have the standard properties view.


==Scripting==
==Scripting==

Revision as of 19:39, 19 February 2022

This documentation is not finished. Please help and contribute documentation.

GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

Part Plane

Menu location
Part → Create primitives → Plane
Workbenches
Part
Default shortcut
None
Introduced in version
-
See also
Part Primitives

Description

Create a simple parametric plane 10 x 10 mm, with the parameters of position, length, and width. By default, the plane is positioned at the origin (0,0,0).

Screenshot of the Part Plane with default values

Usage

  1. There are several ways to invoke the command:
    • Press the Create Primitives... button.
    • Select the Part → Create Primitives → Create Primitives... option from the menu.
    • Select the Plane option from the menu.
  2. Set options and press Create.
  3. To close the dialog press Close.

Example

Part Plane scripting example.

A Part Plane object with the values of the bottom scripting example are shown here.

Properties

Data

Plane

  • DataLength (Length): Length is the dimension along the X axis The default value is 10 mm
  • DataWidth (Length): Width is the size of the Y-axis The default value is 10 mm

Scripting

A Part Plane is created with the addObject() method of the document.

plane = FreeCAD.ActiveDocument.addObject("Part::Plane", "myPlane")
  • Where myPlane is the name for the object. The name must be unique for the entire document.
  • The function returns the newly created object.

The Label is the user editable name for the object. It can be easily changed by

plane.Label = "new myPlaneName"

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

plane.Length = 4
plane.Width = 8

You can change its placement with:

plane.Placement = FreeCAD.Placement(FreeCAD.Vector(1, 2, 3), FreeCAD.Rotation(20, 75, 60))