Draft Line/sv: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(32 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
{{GuiCommand/sv|Name=Draft Line|Workbenches=[[Draft Module/sv|Skiss]]|MenuLocation=Draft → Line|Shortcut=L I|SeeAlso=[[Draft Wire/sv|Draft Wire]]}} |
|||
{{Docnav |
|||
==Description== |
|||
| |
|||
The Line tool creates a straight, two-points line in the current [[Draft SelectPlane|work plane]]. It takes the [[Draft Linestyle|linewidth and color]] previously set on the Tasks tab. The Line tool behaves exactly like the [[Draft Wire]] tool, except that it stops after two points. |
|||
|[[Draft_Wire|Wire]] |
|||
|[[Draft_Workbench|Draft]] |
|||
|IconL= |
|||
|IconR=Draft_Wire.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
|||
<div class="mw-translate-fuzzy"> |
|||
{{GuiCommand/sv|Name=Draft Line|Workbenches=[[Draft_Workbench/sv|Skiss]]|MenuLocation=Draft → Line|Shortcut=L I|SeeAlso=[[Draft Wire/sv|Draft Wire]]}} |
|||
</div> |
|||
==Description== |
|||
<div class="mw-translate-fuzzy"> |
|||
====Beskrivning==== |
|||
Detta verktyg ber användaren om 2 punkter och ritar en linje mellan dem. Punkterna kan väljas med musen i 3d vyn eller genom att mata in koordinater med tangentbordet. |
|||
</div> |
|||
A Draft Line is in fact a [[Draft_Wire|Draft Wire]] with only two points. |
|||
[[Image:Draft_Line_example.jpg|400px]] |
|||
<div class="mw-translate-fuzzy"> |
|||
[[Image:Draft_Line_example.jpg|400px]] |
[[Image:Draft_Line_example.jpg|400px]] |
||
</div> |
|||
==Usage== |
|||
See also: [[Draft_Tray|Draft Tray]], [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]]. |
|||
<div class="mw-translate-fuzzy"> |
|||
====Bruk==== |
====Bruk==== |
||
Line 11: | Line 39: | ||
* Nedtryckning av {{KEY|CTRL}} kommer att [[Draft_Snap/sv|snäppa]] din punkt till tillgängliga snäpp-punkter. |
* Nedtryckning av {{KEY|CTRL}} kommer att [[Draft_Snap/sv|snäppa]] din punkt till tillgängliga snäpp-punkter. |
||
* Nedtryckning av {{KEY|SKIFT}} kommer att [[Draft_Constrain/sv|begränsa]] din nya punkt i relation till föregående punkt. |
* Nedtryckning av {{KEY|SKIFT}} kommer att [[Draft_Constrain/sv|begränsa]] din nya punkt i relation till föregående punkt. |
||
* Skriv in siffror för att [ |
* Skriv in siffror för att [manuellt mata in en koordinat. |
||
* Nedtryckning av {{KEY|CTRL}}+{{KEY|Z}} eller klickning på "Undo" knappen kommer att ångra den sista punkten. |
* Nedtryckning av {{KEY|CTRL}}+{{KEY|Z}} eller klickning på "Undo" knappen kommer att ångra den sista punkten. |
||
* Om du trycker på {{KEY|ESC}} så avbryts funktionen. |
* Om du trycker på {{KEY|ESC}} så avbryts funktionen. |
||
</div> |
|||
* Den skapade cirkeln kommer att ha nuvarande [[Draft_Linestyle/sv|linjestil]]. |
|||
==Options== |
==Options== |
||
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after the first point to constrain the second point on the given axis. |
|||
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 (for version 0.22). |
|||
* To enter coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component. |
|||
* Press {{KEY|R}} or click the checkbox to check/uncheck the {{KEY|'''Relative'''}} button. 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 (0,0,0) origin point. |
|||
* To manually enter coordinates 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 pointer out of the [[3D_view|3D view]] before entering coordinates. |
|||
* Press {{KEY|T}} or click the checkbox to check/uncheck the {{KEY|'''Continue'''}} button. If continue mode is on, the Line tool will restart after you give the second point, allowing you to draw another line segment without pressing the Line button again. |
|||
* To use polar coordinates enter a value for the {{MenuCommand|Length}} and a value for the {{MenuCommand|Angle}}, and press {{KEY|Enter}} after each. |
|||
* Press {{KEY|CTRL}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance. |
|||
* |
* Check the {{MenuCommand|Angle}} checkbox to constrain the pointer to the specified angle. |
||
* Press {{KEY|L}} to change the focus from the {{MenuCommand|X}} input box to the {{MenuCommand|Length}} input box and back. Depending on the input box that receives the focus the {{MenuCommand|Angle}} checkbox is checked or unchecked. |
|||
* Press {{KEY|CTRL}}+{{KEY|Z}} or press the {{KEY|[[Image:Draft UndoLine.png|12px]] '''[[Draft_UndoLine|Undo]]'''}} button to undo the last point. |
|||
* Press {{KEY|R}} or click the {{MenuCommand|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 {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current Line command. |
|||
* Press {{KEY|G}} or click the {{MenuCommand|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 [[Draft_SelectPlane|working plane]] coordinate system. {{Version|0.20}} |
|||
* If several connected [[Draft Line|Draft Lines]] are selected they can be transformed into a wire by pressing the '''Draft Wire''' Button. {{Version|0.17}} |
|||
* Press {{KEY|N}} or click the {{MenuCommand|Continue}} checkbox to toggle continue mode. If continue mode is on, the command will restart after finishing, allowing you to continue creating lines. |
|||
* Press {{KEY|S}} to switch [[Draft_Snap|Draft snapping]] on or off. |
|||
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command. |
|||
==Notes== |
|||
* A Draft Line can be edited with the [[Draft_Edit|Draft Edit]] command. |
|||
* Draft Lines and [[Draft_Wire|Draft Wires]] can be joined with the [[Draft_Wire|Draft Wire]] command, the [[Draft_Join|Draft Join]] command or the [[Draft_Upgrade|Draft Upgrade]] command. |
|||
==Preferences== |
|||
See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]]. |
|||
* To change the initial focus of the task panel to the {{MenuCommand|Length}} input box: {{MenuCommand|Edit → Preferences... → Draft → General → Set focus on Length instead of X coordinate}}. Note that you must move the pointer in the [[3D_view|3D view]] for the change to take effect. |
|||
* If the {{MenuCommand|Edit → Preferences... → Draft → General → Create Part primitives if possible}} option is checked, the command will create a [[Part_Line|Part Line]] instead of a Draft Line. |
|||
==Properties== |
==Properties== |
||
* {{PropertyData|Start}}: The start point |
|||
<div class="mw-translate-fuzzy"> |
|||
* {{PropertyData|End}}: The end point |
|||
==Egenskaper== |
|||
* {{PropertyData|Subdivisions}}: Divides the line with the given number of subdivisions {{version|0.16}} |
|||
* {{PropertyData/sv|Start}}: Startpunkten |
|||
* {{PropertyData/sv|End}}: Slutpunkten |
|||
* {{PropertyData/sv|Subdivisions}}: Delar linjen med det angivna antalet underavdelningar {{version|0.16}} |
|||
</div> |
|||
==Scripting== |
==Scripting== |
||
The Line tool can by used in [[macros]] and from the python console by using the following function: |
|||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
To create a Draft Line use the {{incode|make_line}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|makeLine}} method. |
|||
{{Code|code= |
{{Code|code= |
||
line = make_line(p1, p2) |
|||
makeLine (Vector, Vector) |
|||
line = make_line(LineSegment) |
|||
line = make_line(Shape) |
|||
}} |
}} |
||
* Creates a line between the two given vectors. The current draft linewidth and color will be used. |
|||
* Creates a {{incode|Line}} object between points {{incode|p1}} and {{incode|p2}}, each defined by its {{incode|FreeCAD.Vector}}, with units in millimeters. |
|||
* Returns the newly created object. |
|||
* Creates a {{incode|Line}} object from a {{incode|Part.LineSegment}}. |
|||
* Creates a {{incode|Line}} object from the first vertex to the last vertex of the given {{incode|Shape}}. |
|||
Example: |
Example: |
||
{{Code|code= |
{{Code|code= |
||
import FreeCAD |
import FreeCAD as App |
||
import Draft |
|||
Draft.makeLine(FreeCAD.Vector(0,0,0),FreeCAD.Vector(2,0,0)) |
|||
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() |
|||
}} |
}} |
||
{{clear}} |
|||
{{Docnav |
|||
<languages/> |
|||
| |
|||
|[[Draft_Wire|Wire]] |
|||
|[[Draft_Workbench|Draft]] |
|||
|IconL= |
|||
|IconR=Draft_Wire.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
|||
{{Draft Tools navi{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 04:57, 9 January 2024
Draft Line |
Menyplacering |
---|
Draft → Line |
Arbetsbänkar |
Skiss |
Standard genväg |
L I |
Introducerad i version |
- |
Se även |
Draft Wire |
Description
Beskrivning
Detta verktyg ber användaren om 2 punkter och ritar en linje mellan dem. Punkterna kan väljas med musen i 3d vyn eller genom att mata in koordinater med tangentbordet.
A Draft Line is in fact a Draft Wire with only two points.
Usage
See also: Draft Tray, Draft Snap and Draft Constrain.
Bruk
- Markera punkter i ett tomt område i 3d vyn, eller på ett existerande objekt.
- Nedtryckning av CTRL kommer att snäppa din punkt till tillgängliga snäpp-punkter.
- Nedtryckning av SKIFT kommer att begränsa din nya punkt i relation till föregående punkt.
- Skriv in siffror för att [manuellt mata in en koordinat.
- Nedtryckning av CTRL+Z eller klickning på "Undo" knappen kommer att ångra den sista punkten.
- Om du trycker på ESC så avbryts funktionen.
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 (for version 0.22).
- 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 L 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 N 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.
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.
Preferences
See also: Preferences Editor and Draft Preferences.
- To change the initial focus of the task panel to the Length input box: Edit → Preferences... → Draft → General → 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 → Create Part primitives if possible option is checked, the command will create a Part Line instead of a Draft Line.
Properties
Egenskaper
- DATAStart: Startpunkten
- DATAEnd: Slutpunkten
- DATASubdivisions: Delar linjen med det angivna antalet underavdelningar introduced in version 0.16
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 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
- 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