底图线段
Outdated translations are marked like this.
Draft Line |
Menu location |
---|
Draft → Line |
Workbenches |
Draft, Arch |
Default shortcut |
L I |
Introduced in version |
0.7 |
See also |
Draft Wire, Draft Point |
Description
描述
线段工具用于创建两点定义的线段。它根据Draft Tray中Draft Linestyle的设置来绘制线段。此工具与Draft Wire工具的行为基本相同,唯独线段工具在绘制完一条两点的线段即停止工作。
A Draft Line is in fact a Draft Wire with only two points.
根据两点创建一条线段
Usage
See also: Draft Tray, Draft Snap and Draft Constrain.
如何使用
- 按下 Draft Line按钮, 或先按L再按I键。
- 在3D视图中单击第一个点,或输入坐标并按下 add point按钮。
- 在3D视图中单击第二个点,或输入坐标并按下 add point键。
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).
选项
- 设置好第一个点后,按X、Y或Z键来约束第二点的对应坐标。
- 为了手动输入坐标值,可以在每次输入X、Y与Z分量后按Enter键。
- 按R键或点击relative复选框切换至相对坐标模式。如果开启了相对坐标模式,则第二个点的坐标将相对于第一个点而定(即以第一个点为基准);否则两点采用绝对坐标定义,即基于原点(0,0,0)而定。
- 按T键或点击continue复选框切换至连续模式。如果开启了连续模式,则在指定某线段第二个端点后,线段绘制工具将自动重启并继续下条线段的绘制,而不必再次按线段工具按钮。
- 在将端点强制绘至最近捕捉位置时,按住Ctrl。
- 在绘制第二端点时,按住Shift键来约束(constrain)它的位置位于第一个点的水平方向或垂直方向。
- 按Ctrl+Z键或点击 Undo按钮来撤销最近绘制的线段。
- 按Esc键或点击Close按钮来终止当前命令。
Notes
通过双击树状视图(tree view)中的元素或点击 Draft Edit按钮即可编辑对应线段。届时,您就可将构成线段的点移动到预定的新位置。
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
属性
线段对象享有Draft Wire的所有属性,但是其中仅有部分属性适用于线段。
Scripting
脚本
line = make_line(p1, p2)
line = make_line(LineSegment)
line = make_line(Shape)
- 创建点
p1
与点p2
间的一条Line
对象,每个点由其FreeCAD.Vector
来定义,且以毫米为单位。 - 根据
Part.LineSegment
来创建一条Line
对象。 - 从指定
Shape
的第一个顶点至最后一个顶点创建一条Line
对象。
示例:
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, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub