Part Plane: Difference between revisions

From FreeCAD Documentation
(Usage)
(Marked this version for translation)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{UnfinishedDocu{{#translation:}}}} <!-- Note: Needs Usage section with ordered list. -->
<translate>
<translate>


Line 17: Line 16:
|Name=Part Plane
|Name=Part Plane
|MenuLocation=Part → [[Part_Primitives|Create primitives]] → Plane
|MenuLocation=Part → [[Part_Primitives|Create primitives]] → Plane
|Workbenches=[[Part_Workbench|Part]]
|Workbenches=[[Part_Workbench|Part]], [[OpenSCAD_Workbench|OpenSCAD]]
|SeeAlso=[[Part_Primitives|Part Primitives]]
|SeeAlso=[[Part_Primitives|Part Primitives]]
}}
}}
Line 24: Line 23:


<!--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.
A [[Image:Part_Plane.svg|24px]] '''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.


</translate>
</translate>
[[File:Part_Plane_Example.png|400px]]
[[Image:Part_Plane_Example.png|400px]]
<translate>
<translate>


== Usage == <!--T:8-->
== Usage == <!--T:8-->


<!--T:24-->
=== Create ===
See [[Part_Primitives#Usage|Part Primitives]].


== Example == <!--T:25-->
# There are several ways to invoke the [[Part_Primitives|Part Primitives]] command:
#* Press the {{Button|[[Image:Part_Primitives.svg|16px]] [[Part_Primitives|Part Primitives]]}} button.
#* Select the {{MenuCommand|Part → Create Primitives → [[Image:Part_Primitives.svg|16px]] Create Primitives...}} option from the menu.
# The {{MenuCommand|Geometic Primitives}} task panel opens.
# Select the {{MenuCommand|[[Image:Part_Plane.svg|16px]] Plane}} option from the dropdown list.
# Specify the properties.
# Press the {{Button|Create}} button.
# The plane is created.
# Optionally create additional planes, or other primitives.
# Press the {{Button|Close}} button to finish the command.

=== Edit ===

# To change the dimensions and {{PropertyData|Placement}} of an existing plane do one of the following:
#* Double-click the object in the [[Tree_view|Tree view]]:
#*# The {{MenuCommand|Geometic Primitives}} task panel opens.
#*# Change one or more properties.
#*# The object is dynamically updated in the [[3D_view|3D view]].
#*# Press the {{Button|OK}} button.
#* Change the properties in the [[Property_editor|Property editor]].
#* Change the {{PropertyData|Placement}} with the [[Image:Std_TransformManip.svg|16px]] [[Std_TransformManip|Std TransformManip]] command.

== Example ==


<!--T:26-->
[[Image:Part_Plane_Scripting_Example.png|thumb|Part Plane from the scripting example]]
[[Image:Part_Plane_Scripting_Example.png|thumb|Part Plane from the scripting example]]


<!--T:27-->
A Part Plane object created with the [[#Scripting|scripting example]] below is shown here.
A Part Plane object created with the [[#Scripting|scripting example]] below is shown here.


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


<!--T:28-->
See also: [[Property_editor|Property editor]].
See also: [[Property_editor|Property editor]].


<!--T:29-->
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:
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-->


<!--T:30-->
{{TitleProperty|Attachment}}
{{TitleProperty|Attachment}}


<!--T:31-->
The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].
The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].


Line 81: Line 65:
* {{PropertyData|Width|Length}}: The width of the plane. This is the dimension in its Y direction. The default is {{Value|10mm}}.
* {{PropertyData|Width|Length}}: The width of the plane. This is the dimension in its Y direction. The default is {{Value|10mm}}.


== Scripting ==
== Scripting == <!--T:32-->


<!--T:33-->
A Part Plane is created with the {{Incode|addObject()}} method of the document.
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

<!--T:34-->
A Part Plane can be created with the {{Incode|addObject()}} method of the document:


</translate>
</translate>
Line 91: Line 79:
<translate>
<translate>


<!--T:27-->
<!--T:35-->
* Where {{Incode|myPlane}} is the name for the object. The name must be unique for the entire document.
* Where {{Incode|"myPlane"}} is the name for the object.
* The function returns the newly created object.
* The function returns the newly created object.


<!--T:36-->
The {{Incode|Label}} is the user editable name for the object. It can be easily changed by
Example:


</translate>
</translate>
{{Code|code=
{{Code|code=
import FreeCAD as App
plane.Label = "new myPlaneName"
}}
<translate>


doc = App.activeDocument()
<!--T:28-->
You can access and modify attributes of the {{Incode|plane}} object. For example, you may wish to modify the length and width parameters.


plane = doc.addObject("Part::Plane", "myPlane")
</translate>
{{Code|code=
plane.Length = 4
plane.Length = 4
plane.Width = 8
plane.Width = 8
plane.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(20, 75, 60))

doc.recompute()
}}
}}
<translate>
<translate>


<!--T:31-->
You can change its placement with:

</translate>
{{Code|code=
plane.Placement = FreeCAD.Placement(FreeCAD.Vector(1, 2, 3), FreeCAD.Rotation(20, 75, 60))
}}
<translate>


<!--T:14-->
<!--T:14-->
Line 133: Line 113:


</translate>
</translate>
{{Part Tools navi{{#translation:}}}}
{{Part_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 10:03, 3 March 2022

Part Plane

Menu location
Part → Create primitives → Plane
Workbenches
Part, OpenSCAD
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

See Part Primitives.

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

See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.

A Part Plane can be created with the addObject() method of the document:

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

Example:

import FreeCAD as App

doc = App.activeDocument()

plane = doc.addObject("Part::Plane", "myPlane")
plane.Length = 4
plane.Width = 8
plane.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(20, 75, 60))

doc.recompute()