Draft Line: Difference between revisions
(Updated Usage. I have remove 'in the related Line task panel' as I feel this is obvious.) |
No edit summary |
||
Line 48: | Line 48: | ||
==Options== |
==Options== |
||
The single character keyboard shortcuts available in the task panel can be changed. See [[Draft_Preferences|Draft Preferences]]. The shortcuts mentioned here are the default shortcuts. |
|||
<!--T:5--> |
<!--T:5--> |
||
* To enter coordinates manually enter the X, Y and Z component, and press {{KEY|Enter}} after each. Or you can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button when you have the desired values. It is advisable to move the cursor out of the [[3D_view|3D view]] before entering coordinates. |
|||
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after the first point to constrain the second point on the given axis. |
|||
* You can also use polar coordinates for the second point. Enter values for {{MenuCommand|Length}} and {{MenuCommand|Angle}}, and then press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button. |
|||
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component. |
|||
* Check the {{MenuCommand|Angle}} checkbox and enter an angle to constrain the pointer to the specified angle. |
|||
** You can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button when you have the desired values to insert the point. |
|||
* Press {{KEY|R}} or click the checkbox to toggle ''relative'' mode. If relative mode is on, the coordinates of the second point are relative to the first one; if not, they are absolute, taken from the origin (0,0,0). |
* Press {{KEY|R}} or click the checkbox to toggle ''relative'' mode. If relative mode is on, the coordinates of the second point are relative to the first one; if not, they are absolute, taken from the origin (0,0,0). |
||
* Press {{KEY|T}} or click the checkbox to toggle ''continue'' mode. If continue mode is on, the Line command will restart after you give the second point, allowing you to draw another line segment without pressing the command button again. |
* Press {{KEY|T}} or click the checkbox to toggle ''continue'' mode. If continue mode is on, the Line command will restart after you give the second point, allowing you to draw another line segment without pressing the command button again. |
Revision as of 13:31, 31 March 2021
This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.
Draft Line |
Menu location |
---|
Drafting → Line |
Workbenches |
Draft, Arch |
Default shortcut |
L I |
Introduced in version |
0.7 |
See also |
Draft Wire |
Description
The Draft Line command creates a straight line.
Line defined by two points
Usage
See also: Draft Linestyle, Draft Snap and Draft Constrain.
- There are several ways to invoke the command:
- Press the Draft Line button.
- Select the Drafting → Line option from the menu.
- Use the keyboard shortcut: L then I.
- The Line task panel opens. See Options for more information.
- Click the first point in the 3D view, or type coordinates and press the Enter point button.
- Click the second point in the 3D view, or type coordinates and press the Enter point button.
Options
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts.
- To enter coordinates manually enter the X, Y and Z component, and press Enter after each. Or you can press the Enter point button when you have the desired values. It is advisable to move the cursor out of the 3D view before entering coordinates.
- You can also use polar coordinates for the second point. Enter values for Length and Angle, and then press the Enter point button.
- Check the Angle checkbox and enter an angle to constrain the pointer to the specified angle.
- Press R or click the checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point are relative to the first one; if not, they are absolute, taken from the origin (0,0,0).
- Press T or click the checkbox to toggle continue mode. If continue mode is on, the Line command will restart after you give the second point, allowing you to draw another line segment without pressing the command button again.
- Hold Ctrl while drawing to force snapping your point to the nearest snap location, independently of the distance.
- Hold Shift while drawing to constrain your second point horizontally or vertically in relation to the first one.
- Press Ctrl+Z or press the Undo button to undo the last point.
- Press Esc or the Close button to abort the command.
Notes
- A Draft Line can be edited with the Draft Edit command.
- Draft Lines and Draft Wires can be joined with the Draft Wire command, the Draft Join command or the Draft Upgrade command.
Properties
A Draft Line is in fact a Draft Wire with only two points and has the same properties.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To create a Draft Line use the make_line
method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeLine
method.
line = make_line(p1, p2)
line = make_line(LineSegment)
line = make_line(Shape)
- Creates a
Line
object between pointsp1
andp2
, each defined by itsFreeCAD.Vector
, with units in millimeters. - Creates a
Line
object from aPart.LineSegment
. - Creates a
Line
object from the first vertex to the last vertex of the givenShape
.
Example:
import FreeCAD as App
import Draft
doc = App.newDocument()
p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 500, 0)
p3 = App.Vector(-250, -500, 0)
p4 = App.Vector(500, 1000, 0)
line1 = Draft.make_line(p1, p2)
line2 = Draft.make_line(p3, p4)
doc.recompute()
Draft
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub