Manual:Traditional 2D drafting/zh-cn: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(91 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav|[[Manual:Traditional modeling, the CSG way|Traditional modeling, the CSG way]]|[[Manual:Modeling for product design|Modeling for product design]]|[[Manual:Introduction|Manual start]]|IconC=Crystal Clear manual.png}}
{{Docnav/zh-cn
|[[Manual:Traditional modeling, the CSG way|传统建模,CSG 方式]]
|[[Manual:Modeling for product design|产品设计建模]]
|[[Manual:Introduction|手册首页]]
|IconC=Crystal Clear manual.png
}}


{{Manual:TOC}}
{{Manual:TOC}}


可能你对 FreeCAD 感兴趣,因为你有技术绘图经验,例如使用 [https://en.wikipedia.org/wiki/AutoCAD AutoCAD] 等软件。 你了解设计,或者你更喜欢在实际制它们之前绘制出来。无论哪种情况,FreeCAD 都具有更传统的工作台: [[Draft_Module|Draft Workbench]],包含大多数 2D CAD 应用程序中都有的工具。
对 FreeCAD 感兴趣,因为你已经一些技术绘图经验,例如使用 [https://en.wikipedia.org/wiki/AutoCAD AutoCAD] 等软件。或者已经了解一些关于设计的知识,或者你更喜欢在造之前绘制物品。无论哪种情况,FreeCAD 都具有更传统的工作台,其中包含大多数 2D CAD 应用程序中能找到的工具:[[Draft_Workbench|草图工作台]]


Draft 工作台虽然继承了传统 2D CAD 的工作方式,但并不局限于 2D 领域。Draft 工作台的所有工具都可以在整个 3D 空间中工作。许多 Draft 工具,例如,[[Image:Draft_Move.png|16px]] [[Draft_Move|Move]] 和 [[Image:Draft_Rotate.png|16px]] [[Draft_Rotate|Rotate]]在 FreeCAD 中使用广泛,因为比起手动更改位置参数,Move 和 Rotate 更直观。
Draft 工作台虽然继承了传统 2D CAD 的工作方式,但并不局限于 2D 领域。Draft 工作台的所有工具都可以在整个 3D 空间中工作。许多 Draft 工具,例如,[[Image:Draft_Move.svg|16px]] [[Draft_Move/zh-cn|Move]] 和 [[Image:Draft_Rotate.svg|16px]] [[Draft_Rotate/zh-cn|Rotate]]在 FreeCAD 中使用广泛,因为比起手动更改位置参数,Move 和 Rotate 更直观。


在 Draft 工作台提供的工具中,你会发现传统的绘图工具,[[Image:Draft_Line.png|16px]] [[Draft_Line|Line]], [[Image:Draft_Circle.png|16px]] [[Draft_Circle|Circle]], or [[Image:Draft_Wire.png|16px]] [[Draft_Wire|Wire]] (polyline), modification tools like [[Image:Draft_Move.png|16px]] [[Draft_Move|Move]], [[Image:Draft_Rotate.png|16px]] [[Draft_Rotate|Rotate]] or [[Image:Draft_Offset.png|16px]] [[Draft_Offset|Offset]], a [[Draft_SelectPlane|working plane/grid system]],修改工具之类[[Image:Draft_Move.png|16px]] [[Draft_Move|Move]], [[Image:Draft_Rotate.png|16px]] [[Draft_Rotate|Rotate]] or [[Image:Draft_Offset.png|16px]] [[Draft_Offset|Offset]], a [[Draft_SelectPlane|working plane/grid system]],你精确定义正在工作的平面,以及一个完整的 [[Draft_Snap|snapping system]]使得相对于彼此绘制和定位元素非常容易。
在 Draft 工作台提供的工具中,你会发现传统的绘图工具,例如[[Image:Draft_Line.svg|16px]] [[Draft_Line|线]],[[Image:Draft_Circle.svg|16px]] [[Draft_Circle|]][[Image:Draft_Wire.svg|16px]] [[Draft_Wire|线段]],修改工具,例如[[Image:Draft_Move.svg|16px]] [[Draft_Move|移动]][[Image:Draft_Rotate.svg|16px]] [[Draft_Rotate|旋转]][[Image:Draft_Offset.svg|16px]] [[Draft_Offset|偏移]],一个[[Draft_SelectPlane|工作平面/网格系统]],它允许你精确定义正在工作的平面,并且完整的[[Draft_Snap|捕捉系统]]使得元素之间精确定位和绘制非常容易。


为了展示 Draft 的工作流程和能力范围,我们一个简单的练习,结果将是这个小图,一个只包含厨房顶部的小房子的平面图(一个非常荒谬的平面图,但我们可以在这里做我们想做的事,不是够了吗?):
为了展示 Draft 工作台的工作流程和,我们将通过一个简单的练习来演示结果将是这个小图显示一个只包含厨房的小房子的平面图(这是一个相当荒谬的平面图,但我们在这里可以做我们想做的事,不是吗?):


[[Image:Exercise_cabin_01.jpg]]
[[Image:Exercise_cabin_01.jpg]]


* 切换到 Draft 工作台
* 切换到 Draft 工作台
* 与所有技术绘图应用程序一样,正确设置环境是明智的,它将为你节省大量时间。在菜单 '''Edit -> Preferences -> Draft''' 根据自己的喜好配置[[Draft_SelectPlane|grid and working plane]], [[Draft_Text|Text]] 和 [[Draft_Dimension|Dimension]]。 但是,在本练习中,我们将这些设置保留默认值。
* 与所有技术绘图应用程序一样,正确设置环境是明智的,它将为你节省大量时间。在菜单 '''Edit Preferences Draft''' 根据自己的喜好配置[[Draft_SelectPlane/zh-cn|grid and working plane]], [[Draft_Text/zh-cn|Text]] 和 [[Draft_Dimension/zh-cn|Dimension]]。 但是,在本练习中,我们将这些设置保留默认值。


[[Image:Freecad_draft_options_01.jpg]]
[[Image:Freecad_draft_options_01.jpg]]


* 可能需要注意一个选项,它很霸道:"'''Fill objects with faces whenever possible'''" 选项。如果选这个选项,默认情况下 FreeCAD 将用面来填充诸如矩形或圆形这的闭对象,这可能就难以捕捉到底层对象。你可以立即关闭此选项,或者稍后关闭每个单独对象的 "'''Make Face'''" 属性,以防止它们创建面。
* 不过,有一个选项可能需要你的注意:“'''尽可能使用面填充对象'''"选项。如果选择了这个选项,默认情况下,像矩形或圆形这闭对象将被填充为面,这可能会使对底层对象的捕捉变得困难。你现在可以关闭此选项,或者稍后关闭每个单独对象的'''创建面'''"属性,以防止它们创建面。


* Draft 工作台还有两个特殊的工具栏一个 '''visual settings''',可以更改当前工作平面,打开/关闭 [[Draft_ToggleConstructionMode|construction mode]],设置用于新对象的线条颜色、面颜色、线和文本大小另一个是'''snap locations''',可以打开/关闭网格并设置/取消设置单个 [[Draft_Snap|Snap locations]]
* Draft 工作台还有两个特殊的工具栏一个是'''可视化设置'''工具栏可以在其中更改当前工作平面,打开/关闭 [[Draft_ToggleConstructionMode|构造模式]],设置用于新对象的线条颜色、面颜色、线条粗细和文本大小另一个是'''捕捉位置'''工具栏。在那里可以打开/关闭网格并设置/取消单个[[Draft_Snap|捕捉位置]]


[[Image:Draft_toolbars.jpg]]
[[Image:Draft_toolbars.jpg]]


* 打开所有捕捉按钮是会带来方便,但也会使绘图变慢,因为移动鼠标光标时需要进行更多的计算。通常只保留实际使用的那些就好了
* 打开所有捕捉按钮虽然方便,但同时也会使绘图速度变慢,因为移动鼠标时需要进行更多的计算。通常最好只保留实际使用的捕捉


* 让我们首先打开'''构造模式''',这将允许我们绘制一些指导线,我们将在这些指导线上绘制最终的几何图形。
* Let's start by turning '''construction mode''' on, which will allow us to draw some guidelines on which we will draw our final geometry.
* 如果你想的话,把'''工作平面'''设置为'''XY'''。如果这样做,无论当前视图如何,工作平面都不会改变。如果没有这样做,工作平面将自动适应当前视图,你应该确保在想要在XY(地面)平面上绘制时保持在俯视视图。
* If you wish, set the '''working plane''' to '''XY'''. If you do this, the working plane won't change, no matter the current view. If not, the working plane will adapt automatically to the current view, and you should take care of staying in top view whenever you want to draw on the XY (ground) plane.
* Then, select the [[Image:Draft_Rectangle.png|16px]] [[Draft_Rectangle|Rectangle]] tool and draw a rectangle, starting at point (0,0,0), of 2 meters by 2 meters (leave the Z at zero). Note that most of the Draft commands can be fully performed from the keyboard, without touching the mouse, using their two-letter shortcut. Our first 2x2m rectangle can be done like this: re 0 '''Enter''' 0 '''Enter''' 0 '''Enter''' 2m '''Enter''' 2m '''Enter''' 0 '''Enter'''.
* 然后,选择[[Image:Draft_Rectangle.svg|16px]] [[Draft_Rectangle|矩形]]工具,并绘制一个 2 米乘 2 米(将 Z 保持为零)的矩形,从点 (0,0,0) 开始。注意,大多数草图命令可以完全使用键盘执行,不需要触摸鼠标,只需使用它们的两个字母的快捷键。我们的第一个 2x2 m 矩形可以这样做:re 0 '''Enter''' 0 '''Enter''' 0 '''Enter''' 2m '''Enter''' 2m '''Enter''' 0 '''Enter'''
* Duplicate that rectangle by 15cm inside, using the [[Image:Draft_Offset.png|16px]] [[Draft_Offset|Offset]] tool, turning its Copy mode on, and giving it a distance of 15cm:
* 使用[[Image:Draft_Offset.svg|16px]] [[Draft_Offset|偏移]] 工具,在内部 15cm 处复制该矩形。打开其复制模式,并给它一个距离为 15cm:


[[Image:Exercise_cabin_02.jpg]]
[[Image:Exercise_cabin_02.jpg]]


* 接下来,绘制几条垂直的线来定义门窗的位置,使用 [[Image:Draft_Line.png|16px]] [[Draft_Line/zh-cn|Line]] 工具。 这些线与两个矩形的交叉点为我们提供帮助,来捕捉墙壁的位置。从点(15cm,1m,0)到点(15cm,3m,0)绘制第一条线。
* We can then draw a couple of vertical lines to define where our doors and windows will be placed, using the [[Image:Draft_Line.png|16px]] [[Draft_Line|Line]] tool. The crossing of these lines with our two rectangles will give us useful intersections to snap our walls to. Draw the first line from point (15cm, 1m, 0) to point (15cm, 3m, 0).
* 使用 [[Image:Draft_Move.png|16px]] [[Draft_Move/zh-cn|Move]] 工具,打开 Copy 模式,将这条线复制 5 次。同时打开 '''Relative''' 模式,定义相对距离的移动,这比计算每条线的确切位置更容易。给每个新副本任意起始点,例如,可以保留在(0,0,0),指定相对终点如下:
* Duplicate that line 5 times, using the [[Image:Draft_Move.png|16px]] [[Draft_Move|Move]] tool with Copy mode turned on. Turn also the Relative mode on, which will allow us to define movements in relative distances, which is easier than calculating the exact position of each line. Give each new copy any start point, you can leave it at (0,0,0) for example, and the following relative endpoints:
** line001: x: 10cm
** line002: x: 120cm
** line003: x: -55cm, y: -2m
** line004: x: 80cm
** line005: x: 15cm

* 接下来,我们可以使用[[Image:Draft_Line.svg|16px]] [[Draft_Line|线条]] 工具绘制一些垂直线,来定义我们的门和窗户的位置(注意,此步骤应取消勾选"相对"模式)。这些线与我们的两个矩形的交点将为我们提供有用的交点,以便将我们的墙壁对齐。从点 (15cm, 1m, 0) 到点 (15cm, 3m, 0) 绘制第一条线。
* 使用[[Image:Draft_Move.svg|16px]] [[Draft_Move|移动]] 工具复制该线 5 次,并打开复制模式。同时,打开相对模式,这将使我们能够以相对距离定义移动,比计算每条线的确切位置更容易。按顺序在刚刚创建的线上执行每个移动操作。给每个新副本任何起始点,例如可以将其保留为 (0,0,0),然后设置以下相对终点:
** line001: x: 10cm
** line001: x: 10cm
** line002: x: 120cm
** line002: x: 120cm
Line 44: Line 58:
[[Image:Exercise_cabin_03.jpg]]
[[Image:Exercise_cabin_03.jpg]]


* 现在我们已经完成了这一步,所以可以关闭构造模式。检查所有构造几何体是否已经被放置在“Construction”组中,这使得一次性隐藏或甚至完全删除它们变得容易。
* That is all we need now, so we can switch construction mode off. Check that all the construction geometry has been placed into a "Construction" group, which makes it easy to hide it all at once or even delete it completely later on.
* 现在让我们使用[[Image:Draft_Wire.svg|16px]] [[Draft_Wire|线段]]工 具绘制我们的两个墙壁。确保[[Image:Draft_Snap_Intersection.svg|16px]] [[Draft_Snap|交点捕捉]] 已打开,因为我们需要对线和矩形的交点进行捕捉。按如下方式绘制两条线段,通过单击它们的轮廓的所有点进行绘制。要关闭它们,可以再次单击第一个点,或者按'''Close'''按钮:
* Now let's draw our two wall pieces using the [[Image:Draft_Wire.png|16px]] [[Draft_Wire|Wire]] tool. Make sure the [[Image:Snap_Intersection.png|16px]] [[Draft_Snap|intersection snap]] is turned on, as we will need to snap to the intersections of our lines and rectangles. Draw two wires as follows, by clicking all the points of their contours. To close them, either click on the first point again, or press the '''Close''' button:


[[Image:Exercise_cabin_04.jpg]]
[[Image:Exercise_cabin_04.jpg]]


<div class="mw-translate-fuzzy">
* We can change their default grey color to a nice hatch pattern, by selecting both walls, then setting their '''Pattern''' property to '''Simple''', and their '''Pattern size''' to your liking, for example '''0.005'''.
* 我们可以将它们的默认灰色更改为漂亮的阴影图案,方法是选择两个墙壁,然后将它们的'''Pattern'''属性设置为'''Simple''',将它们的'''Pattern size'''设置为你喜欢的大小,例如'''0.005'''。
</div>


[[Image:Exercise_cabin_05.jpg]]
[[Image:Exercise_cabin_05.jpg]]


* 现在我们可以通过右键单击构造组并选择'''隐藏选定项'''来隐藏构造几何体。
* We can now hide the construction geometry by right-clicking the Construction group and choose '''Hide Selection'''.
* Let's now draw the windows and doors. Make sure the [[Image:Snap_Midpoint.png|16px]] [[Draft_Snap|midpoint snap]] is turned on, and draw six lines as follow:
* 现在让我们绘制窗户和门。确保 [[Image:Draft_Snap_Midpoint.svg|16px]] [[Draft_Snap|中点捕捉]] 已打开,并按照以下方式绘制六条线:


[[Image:Exercise_cabin_06.jpg]]
[[Image:Exercise_cabin_06.jpg]]


* We will now change the door line to create an opened door symbol. Start by rotating the line using the [[Image:Draft_Rotate.png|16px]] [[Draft_Rotate|Rotate]] tool. Click the endpoint of the line as rotation center, give it a start angle of '''0''', and an end angle of '''-90'''.
* 现在我们将更改门的线来创建一个开着的门的符号。首先使用 [[Image:Draft_Rotate.svg|16px]] [[Draft_Rotate|旋转]] 工具旋转该线。以该线的端点为旋转中心,将起始角度设置为'''0''',结束角度设置为'''-90'''
* 然后使用 [[Image:Draft_Arc.svg|16px]] [[Draft_Arc|弧线]] 工具创建开口弧线。将旋转中心设置为我们在上一步中使用的相同点,单击线的另一个点以设置半径,然后按如下设置起始点和结束点:
* Then create the opening arc with the [[Image:Draft_Arc.png|16px]] [[Draft_Arc|Arc]] tool. Pick the same point as the rotation center we used in the previous step as center, click the other point of the line to give the radius, then the start and end points as follow:


[[Image:Exercise_cabin_07.jpg]]
[[Image:Exercise_cabin_07.jpg]]


* 现在我们可以开始放置一些家具。首先,让我们通过从内部左上角绘制一个矩形,给它一个宽度为 170cm 和高度为 -60cm 的尺寸来放置一个柜台。在下面的图像中,该矩形的'''透明度'''属性设置为 80%,以使其具有漂亮的家具外观。
* We can now start placing some furniture. To begin with, let's place a counter by drawing a rectangle from the upper left inner corner, and giving it a width of 170cm and a height of -60cm. In the image below, the '''Transparency''' property of the rectangle is set to 80%, to give it a nice furniture look.
* 然后让我们添加一个水槽和一个炉灶。手工绘制这些符号可能非常繁琐,通常可以在互联网上轻松找到它们,例如在 http://www.cad-blocks.net。为方便起见,在下面的'''下载'''部分中,我们将从该项目中提取出一个水槽和一个炉灶来,并将它们保存为 DXF 文件。您可以通过访问下面的链接,右键单击'''Raw'''按钮,然后选择'''另存为'''来下载这两个文件。
* Then let's add a sink and a cookertop. Drawing these kinds of symbols by hand can be very tedious, and they are usually easy to find on the internet, for example on http://www.cad-blocks.net . In the '''Downloads''' section below, for convenience, we separated a sink and a cookertop from this project, and saved them as DXF files.You can download these two files by visiting the links below, and right-clicking the '''Raw''' button, then choosing '''save as'''.
* 将 DXF 文件插入到已打开的 FreeCAD文 档中可以通过选择'''文件→导入'''菜单选项或从文件浏览器中将 DXF 文件拖放到 FreeCAD 窗口中来完成。DXF 文件的内容可能不会出现在当前视图的中心,这取决于它们在 DXF 文件中的位置。您可以使用菜单'''视图→标准视图→全部适合'''来缩放并查找导入的对象。插入这两个 DXF 文件,并将它们移动到桌面上的适当位置:
* Inserting a DXF file into an opened FreeCAD document can be done either by choosing the '''File -> Import''' menu option, or by dragging and dropping the DXF file from your file explorer into the FreeCAD window. The contents of the DXF files might not appear right on the center of your current view, depending on where they were in the DXF file. You can use menu '''View -> Standard views -> Fit all''' to zoom out and find the imported objects. Insert the two DXF files, and move them to a suitable location on the tabletop:


[[Image:Exercise_cabin_08.jpg]]
[[Image:Exercise_cabin_08.jpg]]


* 现在我们可以使用 [[Image:Draft_Dimension.svg|16px]] [[Draft_Dimension|标注]] 工具放置一些尺寸标注。标注通过单击 3 个点绘制:起始点、终点和第三个点来放置标注线。即使前两个点没有对齐,也可以按住 '''Shift''' 键绘制水平或垂直标注。
* We can now place a couple of dimensions using the [[Image:Draft_Dimension.png|16px]] [[Draft_Dimension|Dimension]] tool. Dimensions are drawn by clicking 3 points: the start point, an end point, and a third point to place the dimension line. To make horizontal or vertical dimensions, even if the two first points are not aligned, press '''Shift''' while clicking the second point.
* 您可以通过在树视图中双击标注来更改标注文字的位置。控制点将使您可以以图形方式移动文本。在我们的练习中,“0.15” 文字已移开以获得更好的清晰度。
* You can change the position of a dimension text by double-clicking the dimension in the tree view. A control point will allow you to move the text graphically. In our exercise, the "0.15" texts have been moved away for better clarity.
* 您可以通过编辑它们的 '''Override''' 属性来更改标注文字的内容。在我们的示例中,已编辑门和窗的标注文字以指示它们的高度:
* You can change the contents of the dimension text by editing their '''Override''' property. In our example, the texts of the door and window dimensions have been edited to indicate their heights:


[[Image:Exercise_cabin_09.jpg]]
[[Image:Exercise_cabin_09.jpg]]


* Let's add some description texts using the [[Image:Draft_Text.png|16px]] [[Draft_Text|Text]] tool. Click a point to position the text, then enter the lines of text, pressing Enter after each line. To finish, press Enter twice.
* 让我们使用 [[Image:Draft_Text.svg|16px]] [[Draft_Text|文本]] 工具添加一些描述性文本。单击一个点来定位文本,然后输入每行文本,每行结束时按 Enter 键。要结束,请按两次 Enter 键。
* 将文本与它们描述的项目连接起来的标记线(也称为“引线”)可以使用 Wire 工具完成。从文本位置开始绘制线,到所描述的地方。完成后,您可以通过将它们的 '''End Arrow''' 属性设置为 '''{{TRUE}}''' 来在线的末端添加一个小圆点或箭头。
* The indication lines (also called "leaders") that link the texts to the item they are describing are simply done with the Wire tool. Draw wires, starting from the text position, to the place being described. Once that is done, you can add a bullet or arrow at the end of the wires by setting their '''End Arrow''' property to '''True'''


[[Image:Exercise_cabin_10.jpg]]
[[Image:Exercise_cabin_10.jpg]]


* 我们的绘图现在已经完成!由于有相当多的对象,因此一个明智的选择是对它们进行一些清理,并将其重新组织成清爽的分组,使文件更易于其他人理解:
* Our drawing is now complete! Since there are quite a number of objects there, it would be wise do some cleaning and restructure everything into nice groups, to make the file easier to understand for other people:


[[Image:Exercise_cabin_11.jpg]]
[[Image:Exercise_cabin_11.jpg]]


* 我们现在可以将我们的工作打印到制图图框里,这将稍后在本手册中展示,或通过将其导出为 DXF 文件直接将我们的绘图导出到其他 CAD 应用程序中。只需选择我们的“平面图”组,选择菜单'''文件→导出''',并选择 Autodesk DXF 格式。然后可以在任何其他 2D CAD 应用程序(如[http://www.librecad.org LibreCAD])中打开该文件。您可能会注意到一些差异,这取决于每个应用程序的配置。
* We can now print our work by placing it on a Drawing sheet, which we will show later in this manual, or directly export our drawing to other CAD applications, by exporting it to a DXF file. Simply select our "Floor plan" group, select menu '''File -> Export''', and select the Autodesk DXF format. The file can then be opened in any other 2D CAD application such as [http://www.librecad.org LibreCAD]. You might notice some differences, depending on the configurations of each application.


[[Image:Exercise_cabin_12.jpg]]
[[Image:Exercise_cabin_12.jpg]]


* 然而,Draft工作台最重要的是,您使用它创建的几何图形可以用作基础或轻松地从其中提取 3D 对象,只需使用 [[Part_Workbench|Part 工作台]] 中的 [[Image:Part_Extrude.svg|16px]] [[Part_Extrude|拉伸]] 工具,或者要来保持在 Draft 工作台中,就使用 [[Image:Draft_Trimex.svg|16px]] [[Draft_Trimex|Trimex]](修剪/延伸/拉伸)工具,这会在幕后执行 Part Extrusion,但使用“Draft 方法”执行它,即允许您以图形方式指示并捕捉拉伸长度。尝试按照下面所示的方式拉伸我们的墙壁。
* The most important thing about the Draft Workbench, however, is that the geometry you create with it can be used as a base or easily extruded into 3D objects, simply by using the [[Image:Part_Extrude.png|16px]] [[Part_Extrude]] tool from the [[Part_Module|Part Workbench]], or, to stay in Draft, the [[Image:Draft_Trimex.png|16px]] [[Draft_Trimex|Trimex]] (Trim/Extend/Extrude) tool, which under the hood performs a Part Extrusion, but does it "the Draft way", that is, allows you to indicate and snap the extrusion length graphically. Experiment extruding our walls as shown below.
* 在选择对象的面后,按下 [[Image:Draft_SelectPlane.svg|16px]] [[Draft_SelectPlane|工作平面]] 按钮,您也可以将工作平面放置在任何位置,并因此在不同的平面上绘制 Draft 对象,例如在墙壁上方。然后可以将它们拉伸以形成其他 3D 实体。尝试将工作平面设置在墙壁顶部面之一上,然后在那里绘制一些矩形。
* By pressing the [[Image:Draft_SelectPlane.png|16px]] [[Draft_SelectPlane|working plane]] button after selecting a face of an object, you are also able to place the working plane anywhere, and therefore draw Draft objects in different planes, for example on top of the walls. These can then be extruded to form other 3D solids. Experiment setting the working plane on one of the top faces of the walls, then draw some rectangles up there.


[[Image:Exercise_cabin_13.jpg]]
[[Image:Exercise_cabin_13.jpg]]


* 同样地,通过在墙壁的面上绘制 Draft 对象,然后将它们拉伸,再使用 Part 工作台中的布尔运算工具从另一个实体中减去它们,可以轻松地完成各种类型的开口,就像我们在前一章中看到的一样。
* All kinds of openings can also be done as easily by drawing Draft objects on the faces of walls, then extruding them, then using the boolean tools from the Part Workbench to subtract them from another solid, as we saw in the previous chapter.

从根本上说,Draft 工作台所做的就是提供以图形方式创建基本Part操作的方法。在 Part 中,通常会通过设置它们的放置参数来定位对象,而在 Draft 中,您可以在屏幕上完成。有时候一个更好,其他时候另一个更可取。不要忘记,您可以在其中一个工作台中创建 [[Interface_Customization|自定义工具栏]],添加另一个中的工具,得到两者的优势资源。


<span id="Downloads"></span>
Fundamentally, what the Draft Workbench does is provide graphical ways to create basic Part operations. While in Part you will usually position objects by setting their placement parameter, in Draft you can do it on-screen. There are times when one is better, other times when the other is preferable. Don't forget, you can create [[Interface_Customization|custom toolbars]] in one of these workbenches, add the tools from the other, and get the best of both worlds.
== 下载 ==


* 本练习中创建的文件:https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/cabin.FCStd
'''Downloads'''
* 水槽的 DXF 文件:https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/sink.dxf
* 台面的 DXF 文件:https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/cooktop.dxf
* 本练习中生成的最终DXF文件:https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/cabin.dxf


<span id="Related"></span>
* The file created during this exercise: https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/cabin.FCStd
== 延伸阅读 ==
* The sink DXF file: https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/sink.dxf
* The cookertop DXF file: https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/cooktop.dxf
* The final DXF file produced during this exercise: https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/cabin.dxf


* [[Draft_Workbench/zh-cn|Draft 工作台]]
'''Read more'''
* [[Draft_Snap/zh-cn|捕捉]]
* [[Draft_SelectPlane/zh-cn|Draft 工作平面]]


* [[Draft_Module|The Draft Workbench]]
* [[Draft_Snap|Snapping]]
* [[Draft_SelectPlane|The Draft working plane]]


{{Docnav
{{Docnav|[[Manual:Traditional modeling, the CSG way|Traditional modeling, the CSG way]]|[[Manual:Modeling for product design|Modeling for product design]]|[[Manual:Introduction|Manual start]]|IconC=Crystal Clear manual.png}}
|[[Manual:Traditional modeling, the CSG way|传统建模,CSG方式]]
|[[Manual:Modeling for product design|面向产品设计的建模]]
|[[Manual:Introduction|手册起始页]]
|IconC=Crystal Clear manual.png
}}


[[Category:Tutorials]]
[[Category:Tutorials{{#translation:}}]]
[[Category:Draft{{#translation:}}]]

Latest revision as of 20:07, 4 November 2023

Other languages:

你会对 FreeCAD 感兴趣,因为你已经有一些技术绘图经验,例如使用 AutoCAD 等软件。或者你已经了解一些关于设计的知识,或者你更喜欢在建造之前绘制物品。无论哪种情况,FreeCAD 都具有更传统的工作台,其中包含在大多数 2D CAD 应用程序中能找到的工具:草图工作台

Draft 工作台虽然继承了传统 2D CAD 的工作方式,但并不局限于 2D 领域。Draft 工作台的所有工具都可以在整个 3D 空间中工作。许多 Draft 工具,例如, Move Rotate在 FreeCAD 中使用广泛,因为比起手动更改位置参数,Move 和 Rotate 更直观。

在 Draft 工作台提供的工具中,你会发现传统的绘图工具,例如 线 线段,修改工具,例如 移动 旋转 偏移,一个工作平面/网格系统,它允许你精确定义你正在工作的平面,并且完整的捕捉系统使得在元素之间精确定位和绘制非常容易。

为了展示 Draft 工作台的工作流程和可能性,我们将通过一个简单的练习来演示,其结果将是这个小图纸,显示一个只包含厨房的小房子的平面图(这是一个相当荒谬的平面图,但是我们在这里可以做我们想做的事情,不是吗?):

  • 切换到 Draft 工作台
  • 与所有技术绘图应用程序一样,正确设置环境是明智的,它将为你节省大量时间。在菜单 Edit → Preferences → Draft 根据自己的喜好配置grid and working plane, TextDimension。 但是,在本练习中,我们将这些设置保留默认值。

  • 不过,有一个选项可能需要你的注意:“尽可能使用面填充对象"选项。如果选择了这个选项,默认情况下,像矩形或圆形这样的封闭对象将被填充为面,这可能会使对底层对象的捕捉变得困难。你现在可以关闭此选项,或者稍后关闭每个单独对象的“创建面"属性,以防止它们创建面。
  • Draft 工作台还有两个特殊的工具栏:一个是可视化设置工具栏,你可以在其中更改当前工作平面,打开/关闭 构造模式,设置用于新对象的线条颜色、面颜色、线条粗细和文本大小,另一个是捕捉位置工具栏。在那里,你可以打开/关闭网格并设置/取消单个捕捉位置

  • 打开所有捕捉按钮虽然方便,但同时也会使绘图速度变慢,因为移动鼠标时需要进行更多的计算。通常最好只保留你实际使用的捕捉。
  • 让我们首先打开构造模式,这将允许我们绘制一些指导线,我们将在这些指导线上绘制最终的几何图形。
  • 如果你想的话,把工作平面设置为XY。如果这样做,无论当前视图如何,工作平面都不会改变。如果没有这样做,工作平面将自动适应当前视图,你应该确保在想要在XY(地面)平面上绘制时保持在俯视视图。
  • 然后,选择 矩形工具,并绘制一个 2 米乘 2 米(将 Z 保持为零)的矩形,从点 (0,0,0) 开始。注意,大多数草图命令可以完全使用键盘执行,不需要触摸鼠标,只需使用它们的两个字母的快捷键。我们的第一个 2x2 m 矩形可以这样做:re 0 Enter 0 Enter 0 Enter 2m Enter 2m Enter 0 Enter
  • 使用 偏移 工具,在内部 15cm 处复制该矩形。打开其复制模式,并给它一个距离为 15cm:

  • 接下来,绘制几条垂直的线来定义门窗的位置,使用 Line 工具。 这些线与两个矩形的交叉点为我们提供帮助,来捕捉墙壁的位置。从点(15cm,1m,0)到点(15cm,3m,0)绘制第一条线。
  • 使用 Move 工具,打开 Copy 模式,将这条线复制 5 次。同时打开 Relative 模式,定义相对距离的移动,这比计算每条线的确切位置更容易。给每个新副本任意起始点,例如,可以保留在(0,0,0),指定相对终点如下:
    • line001: x: 10cm
    • line002: x: 120cm
    • line003: x: -55cm, y: -2m
    • line004: x: 80cm
    • line005: x: 15cm
  • 接下来,我们可以使用 线条 工具绘制一些垂直线,来定义我们的门和窗户的位置(注意,此步骤应取消勾选"相对"模式)。这些线与我们的两个矩形的交点将为我们提供有用的交点,以便将我们的墙壁对齐。从点 (15cm, 1m, 0) 到点 (15cm, 3m, 0) 绘制第一条线。
  • 使用 移动 工具复制该线 5 次,并打开复制模式。同时,打开相对模式,这将使我们能够以相对距离定义移动,比计算每条线的确切位置更容易。按顺序在刚刚创建的线上执行每个移动操作。给每个新副本任何起始点,例如可以将其保留为 (0,0,0),然后设置以下相对终点:
    • line001: x: 10cm
    • line002: x: 120cm
    • line003: x: -55cm, y: -2m
    • line004: x: 80cm
    • line005: x: 15cm

  • 现在我们已经完成了这一步,所以可以关闭构造模式。检查所有构造几何体是否已经被放置在“Construction”组中,这使得一次性隐藏或甚至完全删除它们变得容易。
  • 现在让我们使用 线段工 具绘制我们的两个墙壁。确保 交点捕捉 已打开,因为我们需要对线和矩形的交点进行捕捉。按如下方式绘制两条线段,通过单击它们的轮廓的所有点进行绘制。要关闭它们,可以再次单击第一个点,或者按Close按钮:

  • 我们可以将它们的默认灰色更改为漂亮的阴影图案,方法是选择两个墙壁,然后将它们的Pattern属性设置为Simple,将它们的Pattern size设置为你喜欢的大小,例如0.005

  • 现在我们可以通过右键单击构造组并选择隐藏选定项来隐藏构造几何体。
  • 现在让我们绘制窗户和门。确保 中点捕捉 已打开,并按照以下方式绘制六条线:

  • 现在我们将更改门的线来创建一个开着的门的符号。首先使用 旋转 工具旋转该线。以该线的端点为旋转中心,将起始角度设置为0,结束角度设置为-90
  • 然后使用 弧线 工具创建开口弧线。将旋转中心设置为我们在上一步中使用的相同点,单击线的另一个点以设置半径,然后按如下设置起始点和结束点:

  • 现在我们可以开始放置一些家具。首先,让我们通过从内部左上角绘制一个矩形,给它一个宽度为 170cm 和高度为 -60cm 的尺寸来放置一个柜台。在下面的图像中,该矩形的透明度属性设置为 80%,以使其具有漂亮的家具外观。
  • 然后让我们添加一个水槽和一个炉灶。手工绘制这些符号可能非常繁琐,通常可以在互联网上轻松找到它们,例如在 http://www.cad-blocks.net。为方便起见,在下面的下载部分中,我们将从该项目中提取出一个水槽和一个炉灶来,并将它们保存为 DXF 文件。您可以通过访问下面的链接,右键单击Raw按钮,然后选择另存为来下载这两个文件。
  • 将 DXF 文件插入到已打开的 FreeCAD文 档中可以通过选择文件→导入菜单选项或从文件浏览器中将 DXF 文件拖放到 FreeCAD 窗口中来完成。DXF 文件的内容可能不会出现在当前视图的中心,这取决于它们在 DXF 文件中的位置。您可以使用菜单视图→标准视图→全部适合来缩放并查找导入的对象。插入这两个 DXF 文件,并将它们移动到桌面上的适当位置:

  • 现在我们可以使用 标注 工具放置一些尺寸标注。标注通过单击 3 个点绘制:起始点、终点和第三个点来放置标注线。即使前两个点没有对齐,也可以按住 Shift 键绘制水平或垂直标注。
  • 您可以通过在树视图中双击标注来更改标注文字的位置。控制点将使您可以以图形方式移动文本。在我们的练习中,“0.15” 文字已移开以获得更好的清晰度。
  • 您可以通过编辑它们的 Override 属性来更改标注文字的内容。在我们的示例中,已编辑门和窗的标注文字以指示它们的高度:

  • 让我们使用 文本 工具添加一些描述性文本。单击一个点来定位文本,然后输入每行文本,每行结束时按 Enter 键。要结束,请按两次 Enter 键。
  • 将文本与它们描述的项目连接起来的标记线(也称为“引线”)可以使用 Wire 工具完成。从文本位置开始绘制线,到所描述的地方。完成后,您可以通过将它们的 End Arrow 属性设置为 true 来在线的末端添加一个小圆点或箭头。

  • 我们的绘图现在已经完成!由于有相当多的对象,因此一个明智的选择是对它们进行一些清理,并将其重新组织成清爽的分组,使文件更易于其他人理解:

  • 我们现在可以将我们的工作打印到制图图框里,这将稍后在本手册中展示,或通过将其导出为 DXF 文件直接将我们的绘图导出到其他 CAD 应用程序中。只需选择我们的“平面图”组,选择菜单文件→导出,并选择 Autodesk DXF 格式。然后可以在任何其他 2D CAD 应用程序(如LibreCAD)中打开该文件。您可能会注意到一些差异,这取决于每个应用程序的配置。

  • 然而,Draft工作台最重要的是,您使用它创建的几何图形可以用作基础或轻松地从其中提取 3D 对象,只需使用 Part 工作台 中的 拉伸 工具,或者要来保持在 Draft 工作台中,就使用 Trimex(修剪/延伸/拉伸)工具,这会在幕后执行 Part Extrusion,但使用“Draft 方法”执行它,即允许您以图形方式指示并捕捉拉伸长度。尝试按照下面所示的方式拉伸我们的墙壁。
  • 在选择对象的面后,按下 工作平面 按钮,您也可以将工作平面放置在任何位置,并因此在不同的平面上绘制 Draft 对象,例如在墙壁上方。然后可以将它们拉伸以形成其他 3D 实体。尝试将工作平面设置在墙壁顶部面之一上,然后在那里绘制一些矩形。

  • 同样地,通过在墙壁的面上绘制 Draft 对象,然后将它们拉伸,再使用 Part 工作台中的布尔运算工具从另一个实体中减去它们,可以轻松地完成各种类型的开口,就像我们在前一章中看到的一样。

从根本上说,Draft 工作台所做的就是提供以图形方式创建基本Part操作的方法。在 Part 中,通常会通过设置它们的放置参数来定位对象,而在 Draft 中,您可以在屏幕上完成。有时候一个更好,其他时候另一个更可取。不要忘记,您可以在其中一个工作台中创建 自定义工具栏,添加另一个中的工具,得到两者的优势资源。

下载

延伸阅读