Draft Arc 3Points/zh-cn: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
(8 intermediate revisions by 3 users not shown)
Line 5: Line 5:
|[[Draft_Circle/zh-cn|底图圆形]]
|[[Draft_Circle/zh-cn|底图圆形]]
|[[Draft_Arc_3Points/zh-cn|底图绘弧]]
|[[Draft_Arc_3Points/zh-cn|底图绘弧]]
|[[Draft_Module/zh-cn|底图模块]]
|[[Draft_Workbench/zh-cn|底图模块]]
|IconL=Draft_Circle.svg
|IconL=Draft_Circle.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
Line 14: Line 14:
{{GuiCommand
{{GuiCommand
|Name=Draft Arc 3Points
|Name=Draft Arc 3Points
|MenuLocation=Draft → Arc 3 points
|MenuLocation=Drafting → Arc tools → Arc by 3 points
|Workbenches=[[Draft_Module|Draft]], [[Arch_Module|Arch]]
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]]
|Shortcut={{KEY|A}} {{KEY|T}}
|Shortcut={{KEY|A}} {{KEY|T}}
|Version=0.19
|Version=0.19
|SeeAlso=[[Draft_Arc|Draft Arc]], [[Draft_Circle|Draft Circle]], [[Draft_Ellipse|Draft Ellipse]]
|SeeAlso=[[Draft_Arc|Draft Arc]], [[Draft_Circle|Draft Circle]]
}}
}}


Line 27: Line 27:
</div>
</div>


A Draft Arc is in fact a [[Draft_Circle|Draft Circle]] with a {{PropertyData|First Angle}} that is not the same as its {{PropertyData|Last Angle}}.
<div class="mw-translate-fuzzy">
除了添加起始角度与终止角度这两个参数之外,本工具的工作方式与[[Draft Circle/zh-cn|底图圆形]]工具相同。要绘制椭圆弧,可借助[[Draft Ellipse/zh-cn|底图椭圆]]工具。另外,您也可以通过[[Draft BSpline|底图B样条]]与[[Draft BezCurve/zh-cn|底图贝叶斯曲线]]工具来近似地逼近一条圆弧。
</div>


[[Image:Draft_Arc_3Points_example.png|400px]]
[[Image:Draft_Arc_3Points_example.png|400px]]
<div class="mw-translate-fuzzy">

{{Caption|根据圆周上的3个点而定义的弧}}
{{Caption|根据圆周上的3个点而定义的弧}}
</div>


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==如何使用==
==如何使用==
</div>
</div>

See also: [[Draft_Tray|Draft Tray]], [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
# 按下{{Button|[[Image:Draft Arc 3Points.svg|16px]] [[Draft Arc 3Points]]}}按钮,或先按{{KEY|A}}键再按{{KEY|T}}键。
# 按下{{Button|[[Image:Draft Arc 3Points.svg|16px]] [[Draft Arc 3Points]]}}按钮,或先按{{KEY|A}}键再按{{KEY|T}}键。
# 在3D视图中点击第一个点,或输入一个 [[Draft_Coordinates|坐标]]并按下{{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}}按钮。
# 在3D视图中点击第一个点,或输入一个坐标并按下{{Button|[[Image:Draft_AddPoint.svg|16px]] add point}}按钮。
# 在3D视图中点击第二个点,或输入一个半径值。
# 在3D视图中点击第二个点,或输入一个半径值。
# 在3D视图中点击第三个点,或输入一个起始角度。
# 在3D视图中点击第三个点,或输入一个起始角度。
Line 48: Line 49:
==选项==
==选项==


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.
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after one point to constrain the following point on the given axis.

* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component.
** You can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button when you have entered the desired values to insert the 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|R}} or click the checkbox to toggle ''relative'' mode. If relative mode is on, the coordinates of the following point are relative to the previous one; if not, they are absolute, taken from the origin {{incode|(0, 0, 0)}}.
* Press {{KEY|R}} or click the {{MenuCommand|Relative}} checkbox to toggle relative mode. If relative mode is on, coordinates are relative to the last point, if available, else they are relative to the coordinate system origin.
* 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}}
* Hold {{KEY|Shift}} while drawing to [[Draft_Constrain|constrain]] your next point horizontally or vertically in relation to the previous one.
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the current command.
* Press {{KEY|T}} 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 arcs. {{Version|0.20}}
* 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 Arc can be edited with the [[Draft_Edit|Draft Edit]] command.

==Preferences==

See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]].

* To change the number of decimals used for the input of coordinates: {{MenuCommand|Edit → Preferences... → General → Units → Units settings → Number of decimals}}.
* If the {{MenuCommand|Edit → Preferences... → Draft → General settings → Draft tools options → Use Part Primitives when available}} option is checked, the command will create a non-editable [[Part_Feature|Part Feature]] instead of a Draft Circle.


==属性==
==属性==
Line 67: Line 81:
</div>
</div>


{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


To create a Draft Arc by 3 points use the {{incode|make_arc_3points}} method of the Draft module:
The Arc by 3 points tool can be used in [[macros|macros]] and from the [[Python_console|Python console]] by using the following function:


{{Code|code=
{{Code|code=
Line 78: Line 92:
* If a {{incode|placement}} is given, the center of the circular arc will be moved to this place. See [[Placement|Placement]] for more information.
* If a {{incode|placement}} is given, the center of the circular arc will be moved to this place. See [[Placement|Placement]] for more information.
* If {{incode|face}} is {{incode|True}}, the arc will make a face, that is, it will appear filled.
* If {{incode|face}} is {{incode|True}}, the arc will make a face, that is, it will appear filled.
* If {{incode|support}} is given, it is a {{incode|LinkSubList}}, that is, a list indicating an object, and a subelement of that object. This is used so that the object appears referenced to this support.
* If {{incode|support}} is given, it is a {{incode|LinkSubList}}, that is, a list indicating an object and a subelement of that object. This is used so that the object appears referenced to this support.
:For example, <code>support=[(obj, ("Face1"))]</code>
: For example: <code>support=[(obj, ("Face1"))]</code>.
* If {{incode|map_mode}} is given, it is a string defining a type of mapping, for example, <code>map_mode='FlatFace'</code>, <code>map_mode='ThreePointsPlane'</code>, etc. See [[Part_Attachment|Part Attachment]] for more information.
* If {{incode|map_mode}} is given, it is a string defining a type of mapping, for example: <code>map_mode='FlatFace'</code>, <code>map_mode='ThreePointsPlane'</code>, etc. See [[Part_EditAttachment|Part EditAttachment]] for more information.
* If {{incode|primitive}} is {{incode|True}}, the arc created will be a simple [[Part_Feature|Part Feature]], not a complex Draft object.
* If {{incode|primitive}} is {{incode|True}}, the arc created will be a simple [[Part_Feature|Part Feature]], not a complex Draft object.


Line 87: Line 101:
{{Code|code=
{{Code|code=
import FreeCAD as App
import FreeCAD as App
import Draft
import draftobjects.arc_3points as arc3


doc = App.newDocument()
doc = App.newDocument()

points = [App.Vector(0, 0, 0),
points = [App.Vector(0, 0, 0),
App.Vector(5, 10, 0),
App.Vector(5, 10, 0),
App.Vector(10, 0, 0)]
App.Vector(10, 0, 0)]


arc = arc3.make_arc_3points(points)
arc = Draft.make_arc_3points(points)


doc.recompute()
doc.recompute()
}}
}}


{{Emphasis|Note:}} internally this function still uses {{incode|Draft.makeCircle}}, so the object created is the same as the one created by [[Draft_Circle|Circle]] and [[Draft_Arc|Arc]].


{{Docnav
{{Docnav
|[[Draft_Arc|Arc]]
|[[Draft_Arc|Arc]]
|[[Draft_Ellipse|Ellipse]]
|[[Draft_Circle|Circle]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Circle.svg
|IconL=Draft_Arc.svg
|IconR=Draft_Ellipse.svg
|IconR=Draft_Circle.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
}}
}}
Line 112: Line 126:
{{Draft Tools navi{{#translation:}}}}
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Revision as of 16:18, 12 December 2021

Draft Arc 3Points

Menu location
Drafting → Arc tools → Arc by 3 points
Workbenches
Draft, Arch
Default shortcut
A T
Introduced in version
0.19
See also
Draft Arc, Draft Circle

描述

底图三圆周点绘弧工具通过输入4个点:中点、半径、第一个点、最后一点,或拾取的切线,或上述若干组合,在当前的工作平面上创建一条圆弧。它将根据Draft Tray中的Draft Linestyle设置来创建对应圆弧。

A Draft Arc is in fact a Draft Circle with a 数据First Angle that is not the same as its 数据Last Angle.

根据圆周上的3个点而定义的弧

如何使用

See also: Draft Tray, Draft Snap and Draft Constrain.

  1. 按下 Draft Arc 3Points按钮,或先按A键再按T键。
  2. 在3D视图中点击第一个点,或输入一个坐标并按下 add point按钮。
  3. 在3D视图中点击第二个点,或输入一个半径值。
  4. 在3D视图中点击第三个点,或输入一个起始角度。

选项

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.
  • Press R or click the Relative checkbox to toggle relative mode. If relative mode is on, coordinates are relative to the last point, if available, 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 arcs. introduced in version 0.20
  • Press S to switch Draft snapping on or off.
  • Press Esc or the Close button to abort the command.

Notes

  • A Draft Arc can be edited with the Draft Edit command.

Preferences

See also: Preferences Editor and Draft Preferences.

  • To change the number of decimals used for the input of coordinates: Edit → Preferences... → General → Units → Units settings → Number of decimals.
  • If the Edit → Preferences... → Draft → General settings → Draft tools options → Use Part Primitives when available option is checked, the command will create a non-editable Part Feature instead of a Draft Circle.

属性

属性

弧对象享有Draft Circle中的所有属性,但是有些属性仅对圆形而言才有意义。

脚本

参见: Draft APIFreeCAD Scripting Basics

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a Draft Arc by 3 points use the make_arc_3points method of the Draft module:

arc = make_arc_3points(points, placement=None, face=False, support=None, map_mode="Deactivated", primitive=False)
  • Creates an arc object from the given points list.
  • If a placement is given, the center of the circular arc will be moved to this place. See Placement for more information.
  • If face is True, the arc will make a face, that is, it will appear filled.
  • If support is given, it is a LinkSubList, that is, a list indicating an object and a subelement of that object. This is used so that the object appears referenced to this support.
For example: support=[(obj, ("Face1"))].
  • If map_mode is given, it is a string defining a type of mapping, for example: map_mode='FlatFace', map_mode='ThreePointsPlane', etc. See Part EditAttachment for more information.
  • If primitive is True, the arc created will be a simple Part Feature, not a complex Draft object.

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

points = [App.Vector(0, 0, 0),
          App.Vector(5, 10, 0),
          App.Vector(10, 0, 0)]

arc = Draft.make_arc_3points(points)

doc.recompute()