|
Расположение в меню |
---|
Черчение → Линия |
Верстаки |
Draft, Arch |
Быстрые клавиши |
L I |
Представлено в версии |
- |
См. также |
Draft Wire |
Инструмент «Линия» создает прямую линию, определяемую двумя точками. Он использует набор Draft Linestyle на панели инструментов «Тревожный лоток». Инструмент «Линия» ведет себя точно так же, как инструмент Draft Wire, за исключением того, что он останавливается после двух точек.
A Draft Line is in fact a Draft Wire with only two points.
See also: Draft Tray, Draft Snap and Draft Constrain.
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 1.0).
See also: Preferences Editor and Draft Preferences.
См. Draft Wire.
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)
Line
object between points p1
and p2
, each defined by its FreeCAD.Vector
, with units in millimeters.Line
object from a Part.LineSegment
.Line
object from the first vertex to the last vertex of the given Shape
.Пример:
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()