Draft Arc/zh-cn: Difference between revisions

From FreeCAD Documentation
(Created page with "==脚本== {{Emphasis|参见:}} Draft APIFreeCAD Scripting Basics。")
(Created page with "示例:")
Line 60: Line 60:
See the information in [[Draft Circle]].
See the information in [[Draft Circle]].


示例:
Example:
{{Code|code=
{{Code|code=
import Draft
import Draft

Revision as of 02:57, 14 July 2019

Draft Arc

Menu location
Draft → Arc
Workbenches
Draft, Arch
Default shortcut
A R
Introduced in version
0.7
See also
Draft Circle, Draft Ellipse

描述

底图绘弧工具通过用户输入的4个点(圆的中心点、半径、第一个点与最后一个点),或通过拾取切线,或上述若干组合来在当前的work plane上创建一个圆弧。它将根据Draft Tray中的Draft Linestyle来创建圆弧。

除了添加起始角度与终止角度这两个参数之外,本工具的工作方式与底图圆形工具相同。要绘制椭圆弧,可借助底图椭圆工具。另外,您也可以通过底图B样条底图贝叶斯曲线工具来近似地逼近一条圆弧。

通过中心点、半径、弧的初始点、弧的结束点这4点所定义的圆弧

如何使用

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

通过双击树状视图(tree view)中的元素或点击 Draft Edit按钮即可编辑对应弧。届时,您就可将中心点移动到预定的新位置。

创建弧之后,通过将其第一角度(first angle)与最后角度(last angle)两个属性设置为相同值,便可以将它转换为一个圆。

选项

  • 绘弧工具的主要用法就是通过拾取四个点:中点、一个圆周上的点,弧的起始及其终点。
    • 通过按Alt键,您能以一条切线而非拾取的点来定义弧所基于的圆。就此,您可以通过选择的一个、两个或三个切线来构建若干种不同的圆。
  • 弧的方向取决于鼠标的移动操作。如果您在输入第三个点后,沿着顺时针移动鼠标,则所创的弧为顺时针。为了令其为逆时针方向,可令鼠标简单地向第三个点的另一侧移动,直到弧以另一个方向开始绘制。
  • 为了手动输入坐标,可在简单地输入每一个X、Y、Z分量后,再按Enter键。当您需要在特定位置处插入点时,可以按 add point按钮。
  • T或点击continue多选框切换至连续模式。如果您开启了连续模式,则绘制完一条弧后,将立即重新开始绘制下一条弧,这可使您在绘制另一条弧时,无需再次按绘制弧工具按钮。
  • 按住Ctrl可将您正在绘制的点强制捕捉至最近的捕捉位置上,这与距离无关。
  • 按住Shift可将您正在绘制的点约束在相对于中点的水平方向或垂直方向。
  • EscClose按钮来终止当前命令。

属性

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

Data

  • 数据First Angle: specifies the angle of the first point of the arc.
  • 数据Last Angle: specifies the angle of the last point of the arc.
  • 数据Radius: specifies the radius of the arc.
  • 数据Make Face: specifies if the arc makes a face or not. This property only works if the shape is a full circle.
To make an arc a full circle set the 数据First Angle and 数据Last Angle to the same value. The values 0° and 360° aren't considered the same, so if these two values are used, the circle will not form a face.

View

  • 视图Pattern: specifies a Draft Pattern with which to fill the face of the arc. This property only works if the arc is a full circle, and if 数据Make Face is true, and if 视图Display Mode is "Flat Lines".
  • 视图Pattern Size: specifies the size of the Draft Pattern.

脚本

参见: Draft APIFreeCAD Scripting Basics

The Arc tool can be used in macros and from the Python console by using the same function to create circles, with additional arguments. See the information in Draft Circle.

示例:

import Draft

Arc1 = Draft.makeCircle(200, startangle=0, endangle=90)
Arc2 = Draft.makeCircle(500, startangle=20, endangle=160)
Arc3 = Draft.makeCircle(750, startangle=-30, endangle=-150)