Linha
Jump to navigation
Jump to search
Draft
User documentation
Outdated translations are marked like this.
|
Menu location |
---|
Drafting → Line |
Workbenches |
Draft, Arch |
Default shortcut |
L I |
Introduced in version |
0.7 |
See also |
Draft Wire |
Descrição
The Draft Line command creates a straight line.
A Draft Line is in fact a Draft Wire with only two points.
Line defined by two points
Utilização
See also: Draft Tray, 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.
- Press the
- The Line task panel opens. See Options for more information.
- Pick the first point in the 3D view, or type coordinates and press the
Enter point button.
- Pick the second point in the 3D view, or type coordinates and press the
Enter point button.
Opções
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 manually enter coordinates 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 pointer out of the 3D view before entering coordinates.
- To use polar coordinates enter a value for the Length and a value for the Angle, and press Enter after each.
- Check the Angle checkbox to constrain the pointer to the specified angle.
- Press H to change the focus from the X input box to the Length input box and back. Depending on the input box that receives the focus the Angle checkbox is checked or unchecked.
- Press R or click the Relative checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point are relative to the first point, else they are relative to the coordinate system origin.
- Press G or click the Global checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the working plane coordinate system. introduced in version 0.20
- Press T or click the Continue checkbox to toggle continue mode. If continue mode is on, the command will restart after finishing, allowing you to continue creating lines.
- Press S to switch Draft snapping on or off.
- Press Esc or the Close button to abort the command.
Notas
- 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.
Preferências
See also: Preferences Editor and Draft Preferences.
- To change the number of decimals used for the input of coordinates, lengths and angles: Edit → Preferences... → General → Units → Units settings → Number of decimals.
- To change the initial focus of the task panel to the Length input box: Edit → Preferences... → Draft → General settings → Draft tools options → Set focus on Length instead of X coordinate. Note that you must move the pointer in the 3D view for the change to take effect.
- If the Edit → Preferences... → Draft → General settings → Draft tools options → Use Part Primitives when available option is checked, the command will create a Part Line instead of a Draft Line.
Propriedades
See Draft Wire.
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()
- 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 WorkingPlane, 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, Toggle continue mode, 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
- Working plane proxy: Write camera position, Write objects state

- 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, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub