Part Plane: Difference between revisions

From FreeCAD Documentation
mNo edit summary
(Description, Example, Properties.)
Line 24: Line 24:


<!--T:7-->
<!--T:7-->
A [[Image:Part_Plane.svg|24px]] [[Part_Plane|Part Plane]] is a parametric rectangular plane that can be created with the [[Image:Part_Primitives.svg|24px]] [[Part_Primitives|Part Primitives]] command. In the coordinate system defined by its {{PropertyData|Placement}} property, the plane lies on the XY plane with its front left corner at the origin, and its front edge parallel to the X axis.
The [[Image:Part_Plane.svg|24px]] [[Part_Plane|Part Plane]] command creates a parametric plane.

FreeCAD creates a plane, each side with an equal length of 10 millimetre.

By default, the plane is positioned with the lower left corner at the origin (0,0,0) on the xy-plane.


</translate>
</translate>
[[File:Part_Plane_Example.png|400px]]
[[File:Part Plane Example.png|Screenshot of the Part Plane with default values]]
<translate>
<translate>


Line 45: Line 41:
== Example ==
== Example ==


[[File:Part Plane Scripting Example.png|thumb|Part Plane scripting example.]]
[[Image:Part_Plane_Scripting_Example.png|thumb|Part Plane from the scripting example]]


A Part Plane object with the values of the bottom scripting example are shown here.
A Part Plane object created with the [[#Scripting|scripting example]] below is shown here.


== Properties == <!--T:16-->
== Properties == <!--T:16-->

See also: [[Property_editor|Property editor]].

A Part Plane object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:


=== Data === <!--T:17-->
=== Data === <!--T:17-->

{{TitleProperty|Attachment}}

The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].


<!--T:20-->
<!--T:20-->
Line 57: Line 61:


<!--T:21-->
<!--T:21-->
* {{PropertyData|Length|Length}}: Length is the dimension along the X axis The default value is 10 mm
* {{PropertyData|Length|Length}}: The length of the plane. This is the dimension in its X direction. The default is {{Value|10mm}}.
* {{PropertyData|Width|Length}}: Width is the size of the Y-axis The default value is 10 mm
* {{PropertyData|Width|Length}}: The width of the plane. This is the dimension in its Y direction. The default is {{Value|10mm}}.


==Scripting==
== Scripting ==


A Part Plane is created with the {{Incode|addObject()}} method of the document.
A Part Plane is created with the {{Incode|addObject()}} method of the document.

Revision as of 19:50, 1 March 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

A Part Plane is a parametric rectangular plane that can be created with the Part Primitives command. In the coordinate system defined by its DataPlacement property, the plane lies on the XY plane with its front left corner at the origin, and its front edge parallel to the X axis.

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 from the scripting example

A Part Plane object created with the scripting example below is shown here.

Properties

See also: Property editor.

A Part Plane object is derived from a Part Feature object and inherits all its properties. It also has the following additional properties:

Data

Attachment

The object has the same attachment properties as a Part Part2DObject.

Plane

  • DataLength (Length): The length of the plane. This is the dimension in its X direction. The default is 10mm.
  • DataWidth (Length): The width of the plane. This is the dimension in its Y direction. The default is 10mm.

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))