草图工作台

From FreeCAD Documentation
Revision as of 05:12, 8 October 2018 by Normandc (talk | contribs) (Created page with "* 32px Map sketch to face: 将草图映射到以前选定的实心面。")

草图工作台用于创建二维几何,用于零件设计工作台和其他工作台。 通常,2D几何被认为是大多数CAD模型的起点 - 简单的2D草图可以“挤压”成3D形状,另外可以使用2D草图在该形状的表面中创建凹坑,并且可以使用草图在3D对象的表面定义“垫高”(挤压)。 随着部件模块|布尔运算,草图编辑器形成了生成实体形状设计的核心。

草图工作台本身具有约束条件 - 允许将2D形状约束到精确的几何定义。以及一个约束求解器,它计算二维几何约束范围,并允许对草图自由度的交互式探索。

一个基本的,全约束的草图

约束草图的基础

为了解释草图编辑器的工作原理,将其与“传统的”起草方式进行比较可能是有用的。

传统起草

CAD绘图的传统方式继承于旧的绘图板. 正交(2D)视图 手动绘制,用于生产技术图纸(也称为蓝图)。对象被精确地绘制到预期的尺寸或尺寸上。如果要从(0,0)开始绘制长度为100mm的水平线,您可以激活线条工具,点击屏幕或输入第一个点的(0,0)坐标,然后再次点击或在(100,0)处输入第二点坐标。或者你会画你的线,而不考虑它的位置,然后移动它。绘制几何图形后,可以向其添加尺寸。

约束草图

草图远离这个逻辑。对象不需要完全按照您的意图进行绘制,因为它们将在稍后被约束定义。对象可以松散绘制,只要不受约束,就可以进行修改。它们实际上是“浮动”,可以移动,拉伸,旋转,缩放等等。这在设计过程中给予了很大的灵活性。

什么是约束?

使用约束来限制对象的自由度。例如,没有约束的线条具有4 自由度(简写为“DOF”):可以水平或垂直移动,可以被拉伸,并且可以旋转。

应用水平或垂直约束或角度约束(相对于另一条线或与其中一条轴)将限制其旋转能力,从而使其具有3个自由度。锁定其原点之一的点将消除另外2个自由度。并且应用维度约束将消除最后的自由度。然后,该行被认为是“完全受限制的”。

多个对象可以彼此约束。可以通过其中一个点与重合点约束连接两条线。可以在它们之间设置一个角度,或者它们可以垂直设置。一条线可以与弧或圆相切,依此类推。具有多个对象的复杂草图将具有多种不同的解决方案,并使其“完全受约束”,这意味着基于所应用的约束只能达到其中一种可能的解决方案。

有两种约束:几何和尺寸。它们在下面的'工具'部分中详细介绍。

草图编辑器不擅长于

草图编辑器不打算制作2D蓝图。草图一旦用于生成实体特征后,会自动隐藏。约束仅在草图编辑模式下可见。

如果您仅需要生成2D视图进行打印,并不想创建3D模型,请查看底图工作台(请注意,底图工作台也可用于创建此时草图编辑器中不可用的2D几何,如B-Splines。)

草图工作流程

草图总是二维(2D)。要创建一个实体,创建单个封闭区域的2D草图,然后垫高或旋转以添加第三维,从2D草图创建3D实体。

如果草图具有彼此交叉的段,其中一个点不直接位于段上的位置,或相邻段的端点之间存在间隙的位置,垫高或旋转将不会创建一个实体。这个规则的例外是它不适用于构造(蓝色)几何对象。

在封闭区域内,我们可以有较小的非重叠区域。当创建3D实体时,这些将变为空白。

工具

草图工作台工具都位于加载草图工作台时出现的草图菜单中。

  • New sketch: 在所选的面或平面上创建新的草图。如果在执行此工具时未选择任何面, 则系统将提示用户从弹出窗口中选择一个平面。
  • View sketch: 设置垂直于草图平面的模型视图。
  • View section: v0.18 and above Creates a section plane that temporarily hides any matter in front of the sketch plane.
  • Validate sketch: It allows you to check if there are in the tolerance of different points and to match them.
  • Mirror sketch: Mirror a sketch along the x-axis, the y-axis or the origin [v 0.16]

Sketcher geometries

These are tools for creating objects.

  • Arc: Draws an arc segment from center, radius, start angle and end angle.
  • Arc by 3 Point: Draws an arc segment from two endpoints and another point on the circumference.
  • Circle: Draws a circle from center and radius.
  • Polyline (multiple-point line): Draws a line made of multiple line segments. Pressing the M key while drawing a Polyline toggles between the different polyline modes.
  • Rectangle: Draws a rectangle from 2 opposite points.
  • Triangle: Draws a regular triangle inscribed in a construction geometry circle. (v0.15)
  • Square: Draws a regular square inscribed in a construction geometry circle. (v0.15)
  • Pentagon: Draws a regular pentagon inscribed in a construction geometry circle. (v0.15)
  • Hexagon: Draws a regular hexagon inscribed in a construction geometry circle. (v0.15)
  • Heptagon: Draws a regular heptagon inscribed in a construction geometry circle. (v0.15)
  • Octagon: Draws a regular octagon inscribed in a construction geometry circle. (v0.15)
  • Slot: Draws an oval by selecting the center of one semicircle and an endpoint of the other semicircle.
  • Fillet: Makes a fillet between two lines joined at one point. Select both lines or click on the corner point, then activate the tool.
  • Trimming: Trims a line, circle or arc with respect to the clicked point.
  • Construction Mode: Toggles sketch geometry from/to construction mode. Construction geometry is shown in blue and is discarded outside of Sketch editing mode.

Sketcher constraints

Constraints are used to define lengths, set rules between sketch elements, and to lock the sketch along the vertical and horizontal axes. Some constraints require use of Helper constraints.

Geometric constraints

These constraints are not associated with numeric data.

  • Coincident: Affixes a point onto (coincident with) one or more other points.
  • Point On Object: Affixes a point onto another object such as a line, arc, or axis.
  • Vertical: Constrains the selected lines or polyline elements to a true vertical orientation. More than one object can be selected before applying this constraint.
  • Horizontal: Constrains the selected lines or polyline elements to a true horizontal orientation. More than one object can be selected before applying this constraint.
  • Parallel: Constrains two or more lines parallel to one another.
  • Perpendicular: Constrains two lines perpendicular to one another, or constrains a line perpendicular to an arc endpoint.
  • Tangent: Creates a tangent constraint between two selected entities, or a co-linear constraint between two line segments. A line segment does not have to lie directly on an arc or circle to be constrained tangent to that arc or circle.
  • Equal Length: Constrains two selected entities equal to one another. If used on circles or arcs their radii will be set equal.
  • Symmetric: Constrains two points symmetrically about a line, or constrains the first two selected points symmetrically about a third selected point.

Dimensional constraints

These are constraints associated with numeric data, for which you can use the expressions. The data may be taken from a spreadsheet.

  • Lock: Constrains the selected item by setting vertical and horizontal distances relative to the origin, thereby locking the location of that item. These constraint distances can be edited later.
  • Horizontal Distance: Fixes the horizontal distance between two points or line endpoints. If only one item is selected, the distance is set to the origin.
  • Vertical Distance: Fixes the vertical distance between 2 points or line endpoints. If only one item is selected, the distance is set to the origin.
  • Distance: Defines the distance of a selected line by constraining its length, or defines the distance between two points by constraining the distance between them.
  • Radius: Defines the radius of a selected arc or circle by constraining the radius.
  • Internal Angle: Defines the internal angle between two selected lines.
  • Snell's Law: Constrains two lines to obey a refraction law to simulate the light going through an interface. (v 0.15)
  • Internal Alignment: Aligns selected elements to selected shape (e.g. a line to become major axis of an ellipse).
  • Toggle Constraint: Toggles the toolbar or the selected constraints to/from reference mode. v0.16

Sketcher tools

  • Select solver DOFs: v0.18 and above Highlights in green the geometry with degrees of freedom (DOFs), i.e. not fully constrained.
  • Close Shape: Creates a closed shape by applying coincident constraints to endpoints [v 0.15]
  • Connect Edges: Connect sketcher elements by applying coincident constraints to endpoints [v 0.15]
  • Show/Hide internal geometry: Recreates missing/deletes unneeded internal geometry of a selected ellipse, arc of ellipse/hyperbola/parabola or B-spline.
  • Symmetry: Copies a sketcher element symmetrical to a chosen line [v 0.16]
  • Clone: Clones a sketcher element [v 0.16]
  • Copy: Copies a sketcher element [v 0.16]
  • Move: v0.18 and above Moves the selected geometry taking as reference the last selected point.

Sketcher B-spline tools

Sketcher virtual space

Preferences

最佳做法

每个CAD用户随着时间的推移发展自己的工作方式,但跟随一些有用的一般原则。

  • 一系列简单的草图比单个复杂的草图更容易管理。例如,可以为基础3D特征(衬垫或旋转)创建第一个草图,而第二个可以包含孔或切口(凹坑)。一些细节可以省略,稍后将作为3D功能实现。如果太多,你可以选择避免草图中的圆角,并将其添加为3D功能。
  • 始终创建一个封闭的配置文件,或者你的草图不会产生实体,而是一组开放的面。如果你不希望将某些对象包含在实体创建中,请使用“构造模式”工具将其转换为构造元素。
  • 使用自动约束特性来限制你必须手动添加的约束数量。
  • 作为一般规则,首先应用几何约束,然后应用尺寸约束,并最后锁定草图。但请记住:规则被破坏。如果你在操作草图时遇到问题,在完成配置文件之前先限制几个对象可能很有用。
  • 如果可能,将草图中心定位到具有锁定约束的原点(0,0)。如果你的草图不对称,请将其中一个点定位到原点,或者为锁定距离选择好的圆角参数。在v0.12中,外部约束(将草图约束到现有3D几何像边缘或其他草图)未实现。这意味着要将以下草图定位到你的第一个草图中,你需要手动设置相对于你的第一个草图的距离。一个基于原点的(25,75)的锁定约束比(23.47,73.02)更容易记住。
  • 如果你有可能在长度约束和水平或垂直距离约束之间进行选择,则选择后者。水平和垂直距离约束在计算上更便宜。
  • 一般来说,最好使用的约束是:水平和垂直约束;水平和垂直长度约束;点对点相切。如果可能,限制使用这些:一般长度约束;边缘到边缘相切;固定点到线约束;对称约束