Creating Terrain from Scratch从头开始创建地形

In SketchUp, importing preexisting terrain is your easiest route to creating terrain. However, the tools for creating terrain from scratch are useful in the following scenarios:在SketchUp中,导入预先存在的地形是创建地形的最简单方法。但是,从头开始创建地形的工具在以下场景中很有用:

  • You have contour lines that you either imported or traced and now need to transform into a TIN (triangulated irregular network).您有导入或跟踪的等高线,现在需要转换为三角网(三角不规则网络)。
  • Reality would only interfere with your creative vision. That is, you want to shape the terrain yourself, starting from a fairly flat surface or you want to model something other than terrain. 现实只会干扰你的创造性视野。也就是说,你想自己塑造地形,从一个相当平坦的表面开始,或者你想模拟地形以外的东西。This approach is a great starting point if, for example, you’re creating a model of a golf course full of ponds, sand traps, and other obstacles or a model sprung wholly from your imagination.例如,如果你正在创建一个充满池塘、沙坑和其他障碍物的高尔夫球场模型,或者一个完全由你想象出来的模型,那么这种方法是一个很好的起点。

Tip: If you’re working with imported contour lines, simplify them before you create a TIN.如果使用导入的等高线,请在创建三角网之前对其进行简化。

Simplifying contour lines with a script使用脚本简化轮廓线

To optimize SketchUp’s performance, include the minimum number of contour lines needed to create your TIN. Beyond erasing actual lines, you can simplify the lines themselves by reducing the number of segments in each line. Of course, do this only if the contours’ complexity isn’t necessary for your overall model.为了优化SketchUp的性能,请包含创建三角网所需的最小轮廓线数量。除了擦除实际行之外,您还可以通过减少每行中的段数来简化行本身。当然,只有当轮廓的复杂性对你的整体模型来说不是必需的时,才这样做。

Note: For a refresher on how curve and polyline entities are made of segments, see Drawing Freehand Shapes.有关曲线和多段线实体如何由线段构成的复习信息,请参阅绘制徒手图形

If your hands feel cramped just thinking about all that mousing, you’ll be happy to know that an extension can simplify contour lines for you. Developers create SketchUp extensions, which are Ruby scripts designed to do special jobs. 如果你的手一想到鼠标就感到局促,你会很高兴知道延长线可以简化你的轮廓线。开发人员创建SketchUp扩展,这是设计用于执行特殊工作的Ruby脚本。The Simplify Contours Tool script is specifically designed to reduce the number of segments in curves and polylines so that a TIN created from your contours has the least geometry necessary.Simplify Contours Tool脚本专门用于减少曲线和多段线中的线段数量,以便从轮廓创建的三角网具有最少的几何图形。

To install the script, follow these steps:要安装脚本,请执行以下步骤:

  1. Select Window > Extension Warehouse.选择“窗口”>“扩展仓库”。
  2. Sign in with your Google account user name and password.使用您的Google帐户用户名和密码登录。
  3. Search for Simplify Contours Tool.搜索“简化轮廓工具”。
  4. Follow the on-screen instructions to download and install the extension. 按照屏幕上的说明下载并安装扩展程序。The Knowledge Center’s Extension Warehouse section explains all the ins and outs of SketchUp Extensions.知识中心的扩展仓库部分解释了SketchUp扩展的所有细节。

After you install the script, here’s how to make it evaluate and simplify contour line segments:安装脚本后,以下是如何使其评估和简化轮廓线段的方法:

  1. Select all the contour lines you want to simplify.选择要简化的所有轮廓线。
  2. From the menu bar, select Extensions > Simplify Contours.从菜单栏中,选择“扩展”>“简化轮廓”。
  3. In the Simplify Angle dialog box that appears, enter the angle at which you want to merge two segments into one. 在出现的“简化角度”对话框中,输入要将两个线段合并为一个的角度。For example, say you use the default of 10 degrees. If any pair of segments forms an angle of less than 10 degrees, the script merges the pair into one segment.例如,假设您使用默认值10度。如果任何一对线段形成的角度小于10度,脚本会将该对线段合并为一个线段。
  4. Click OK and the contours are simplified.单击“确定”,轮廓将简化。

Creating a TIN from contour lines从等高线创建三角网

After you import or draw contour lines and then simplify them, follow these steps to transform contours into a TIN:导入或绘制轮廓线并对其进行简化后,请按照以下步骤将轮廓转换为三角网:

  1. Place each contour line at the appropriate height relative to the ground plane, as shown in the following figure. Your first contour might be on the ground plane, the second line 2 feet above the ground plane, the third line 4 feet above the ground plane, and so on. 将每条等高线放置在相对于地平面的适当高度,如下图所示。您的第一条等高线可能位于地平面上,第二条等高线位于地平面上方2英尺处,第三条等高线位于地面上方4英尺处,以此类推。Use the Move tool () to raise or lower each contour along the blue axis.使用“移动”工具)沿蓝色轴升高或降低每个轮廓。

  2. With the Select tool ( ), select all the contour lines.使用“选择”工具(),选择所有轮廓线。
  3. Click the Sandbox From Contours tool ( ) on the Sandbox toolbar or select Draw > Sandbox > From Contours on the menu bar. 单击Sandbox工具栏上的“根据轮廓的沙盒”工具(),或在菜单栏上选择“绘图”>“沙盒”>“根据轮廓”。Either way, the contour lines instantly become a TIN, as shown in the following figure. SketchUp automatically organizes all the TIN geometry into a group, so you have to open the group context to edit the TIN.无论哪种方式,等高线都会立即成为三角网,如下图所示。SketchUp会自动将所有三角网几何体组织到一个组中,因此您必须打开组上下文才能编辑三角网。

Tip: Sometimes, the Sandbox From Contours tool creates flat spots or plateaus that don’t belong in your TIN. 有时,“Sandbox From Contours”工具会创建不属于三角网的平坦点或平台。You can retriangulate the plateaus (to create a slope) using the Flip Edge tool. 可以使用“翻转边”工具重新调整平台的角度(以创建坡度)。Editing and Fine-Tuning Terrain explains how to flip edges and make other common edits.编辑和微调地形解释了如何翻转边和进行其他常见编辑。

Creating a flat rectangular TIN创建平面矩形三角网

If you prefer to to start modeling terrain from a flat, rectangular TIN, you draw the shape with the Sandbox From Scratch tool:如果您更喜欢从平坦的矩形三角网开始建模地形,可以使用Sandbox from Scratch工具绘制形状:

  1. Select the Sandbox From Scratch tool ( ) on the Sandbox toolbar, or select Draw > Sandbox > From Scratch from the menu bar.在“沙盒”工具栏上选择“根据轮廓的沙盒”工具(),或从菜单栏中选择Draw>Sandbox>From Scratch。
  2. Click to set the TIN’s starting point.单击以设置三角网的起点。
  3. Set the TIN’s length by moving the mouse cursor in any direction and clicking to set the desired length. 通过在任何方向上移动鼠标游标并单击以设置所需的长度来设置三角网的长度。As you move the cursor, you see inferences that help you align the length to your desired drawing axis or in relation to existing geometry. 移动游标时,您会看到有助于将长度与所需图形轴对齐或与现有几何图形对齐的推断。Instead of using the mouse, you can type a value and press Enter (Microsoft Windows) or Return (Mac OS X) to set a precise distance in the Measurements box. 您可以键入一个值,然后按Enter(Microsoft Windows)或Return(Mac OS X)在测量框中设置精确的距离,而不是使用鼠标。If you type only a number, SketchUp uses the units that your template specifies. 如果只键入数字,SketchUp将使用模板指定的单位。But you can also use a different unit by typing it after the value. 但您也可以在值后键入其他单位。For example, if your template is set to inches, typing 48 sets a length of 48 inches but typing 104cm or 6’ sets a length of 104 centimeters or 6 feet, respectively.例如,如果模板设置为英寸,则键入48将设置为48英寸的长度,但键入104cm6'将分别设置为104厘米或6英尺的长度。
  4. Set the TIN’s width by moving the mouse cursor and clicking or typing a precise value. 通过移动鼠标游标并单击或键入精确值来设置三角网的宽度。In the following figure, the inference engine is indicating that the width is parallel with the green axis, and the Measurements box, which updates dynamically as you move the cursor, indicates that clicking at this point would set the width at 51 feet, 8 5/16 inches.在下图中,推理引擎指示宽度与绿色轴平行,当您移动游标时动态更新的测量框指示此时单击将宽度设置为51英尺,8 5/16英寸。

  5. (Optional) Type a value in the Measurements box and press Enter (Microsoft Windows) or Return (Mac OS X) to change the TIN’s default grid spacing from 10 feet to some other value. (可选)在“测量”框中键入一个值,然后按Enter键(Microsoft Windows)或Return键(Mac OS X)将三角网的默认网格间距从10英尺更改为其他值。In the following figure, you see the newly created TIN and the Measurements box ready to accept a Grid Spacing value.在下图中,您可以看到新创建的三角网和测量框已准备好接受网格间距值。

Tip: When you create a TIN with the Sandbox From Contours or Sandbox From Scratch tool, the TIN geometry is contained within a group. 使用“Sandbox From Contours”或“Sandbox From Scratch”工具创建三角网时,三角网几何体包含在一个组中。This means you need to open the group’s context in order to sculpt or edit your TIN. 这意味着您需要打开组的上下文才能雕刻或编辑TIN。Grouping Geometry explains how SketchUp groups work, and Editing and Fine-Tuning Terrain walks you through common edits to terrain.几何体分组”解释了SketchUp组的工作方式,“编辑和微调地形”将引导您完成对地形的常见编辑。