Draft Line/zh-cn

描述
线段工具用于创建两点定义的线段. 它根据Draft Tray中Draft Linestyle的设置来绘制线段. 此工具与Draft Wire工具的行为基本相同，唯独线段工具在绘制完一条两点的线段即停止工作.



如何使用

 * 1) 按下按钮, 或先按再按键.
 * 2) 在3D视图中单击第一个点，或输入坐标并按下按钮.
 * 3) 在3D视图中单击第二个点，或输入 坐标并按下键.

通过双击树状视图（tree view）中的元素或点击按钮即可编辑对应线段. 届时，您就可将构成线段的点移动到预定的新位置.

将多条单独的线段合为一体
如果选定了若干连接在一起的线段，再按下工具，即可将它们融合为一条连线（wire）;但是，却不能对这条连线进行后续编辑. 为了创建一条可编辑的连线，至少需要用三次以上来调整新图形(连线->闭合连线->面). 您也可以用工具来融合初始的多条单独线段.

利用一条单独的线段也可创建出一条连线，我们要做的是在此线段中加入另一个点. 为此，先按下按钮，再单击此线段中的任意一点.

Options

 * Press, or  after the first point to constrain the second point on the given axis.
 * To enter coordinates manually, simply enter the numbers, then press between each X, Y and Z component.
 * You can also define the polar coordinates of the point by giving a value to "Length" and "Angle". Click on the checkbox next to "Angle" to constrain the pointer to the specified angle. You can press the button when you have the desired values to insert the point.
 * Press 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 or click the checkbox to toggle continue mode. 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 tool button again.
 * Hold while drawing to force snapping your point to the nearest snap location, independently of the distance.
 * Hold while drawing to constrain your second point horizontally or vertically in relation to the first one.
 * Press + or press the button to undo the last point.
 * Press or the  button to abort the current command.

属性
线段对象享有Draft Wire的所有属性，但是其中仅有部分属性适用于线段.

数据

 * : 指定起始点.
 * : 指定结束点.
 * : 指定线段中的中间节点数量.
 * : 指定线段的长度. (只读属性. ) [译注：只读属性存疑. ]

View

 * : if it is it will display a symbol at the last point of the line, so it can be used as an annotation line.
 * : specifies the size of the symbol displayed at the end of the line.
 * : specifies the type of symbol displayed at the end of the line, which can be "Dot", "Circle", "Arrow", or "Tick".

Scripting
Draft API and FreeCAD Scripting Basics.

借助下列函数即可在宏与Python控制台中使用线段绘制工具：


 * Creates a object between points  and, each defined by its , with units in millimeters.
 * Creates a object from a.
 * Creates a object from the first vertex to the last vertex of the given.

示例：