Block

Block 指令以选取的物件建立图块定义,同时将选取的物件转为图块引例。

图块的用途

在模型里建立图块定义

  1. 选取物件。

  2. 指定图块的基准点。

    此点为图块引例的定位点及缩放、旋转的基准点。

    图块的基准点上会被放置一个图块的控制点。

  3. 输入图块定义的名称。

    The block definition is created with the active unit system (model/layout). RH-74172

Block Definition Properties

名称

图块定义的名称。

描述

图块描述信息。

Hyperlink

Adds hyperlink information to a block definition. This information can be retrieved with the Hyperlink command.

描述

A description of the URL.

URL

A web address. Click the address to open the page in the default browser.

将外部文件插入为图块定义

  • 使用 Insert 指令,將插入为选项设定为图块引例。
    文件会被加入模型成为图块定义。

以拖放的方式从外部文件建立图块定义

  1. 从 Windows 文件总管将 Rhino 可以读取的文件拖放进 Rhino 视窗。
  2. 设置插入文件选项。
    文件会被加入模型成为图块定义。

重新定义图块

  • 以和定义图块同样的方法建立图块定义,并使用已存在的图块名称命名新图块。

附注

图块引例与图层

图块引例中的几何图形 (曲线、曲面...) 的属性可由图层属性或自己的物件属性控制。当图块引例被插入到模型空间时是插入到目前的图层上,您也可以自由地将它移动到其它图层。建立图块定义时物件所在的图层与图块引例所在的图层之间并没有关联。举例来说,在红色图层建立的图块定义插入到预设图层 (黑色) 时,图块引列的颜色并不会由红色变成黑色。

当图块定义中有某些物件位于某个图层时,关闭该图层,图块引例在该图层上的物件会被隐藏。但关闭图块引例插入至的图层时,整个图块引例都会被隐藏。

锁定图层

图层被锁定时只有插入点位于该图层上的图块引例会被锁定。如果有一个图块引例里有物件位于被锁定的图层,但它的插入点位于未锁定的图层,该图块引例并不会被锁定,因为控制图块引例是否随着图层而被锁定的决定因素是图块插入点所在的图层是否被锁定。

群组

Grouped objects will maintain their grouped status inside a block. RH-39190

属性为“以父物件”

可以在物件属性中将显示颜色线型打印颜色打印线宽设置为以父物件。如果是渲染材质,可以选择使用物件父物件。渲染材质仅在渲染光线跟踪显示模式下可见。

BlockManager

The BlockManager command opens the Block Definitions panel for managing the block definitions in the model.

Block Definitions panel

Create Block Definition
From selected objects

Creates a new block definition from objects in the model as what the Block command does. RH-80109

From file

Inserts a supported file format into the model as a block definition. Similar to what the Insert command does. RH-80109

Filters

Show hidden block definitions

Lists hidden block definitions.

Hidden block definitions have names beginning with * (asterisk character), such as *Chair.

Show reference block definitions

Lists the blocks in linked block definitions as separate top level items.

Show unused block definitions

Lists the block definitions that do not have instances in the model.

Show all objects in block definitions

Lists objects in block definitions. Otherwise, only lists top level block definitions.

Show children of nested blocks

Lists the block definitions nested in other ones. RH-72972

Group similar block instances

Duplicate nested blocks in the same block definition will be listed only once. RH-77975

Show embedded block definitions

Lists the block definitions saved in the model.

Show embedded and linked block definitions

Lists the block definitions saved in the model also referencing external files.

Show linked block definitions

Lists the block definitions referencing external files.

搜索框

Enter a text string to filter items in the list.

You can include wildcard characters: RH-80369

* = match zero or more characters
? = exactly one character

Options menu

Collapse All

Collapses the list to only show items of the top level.

Expand All

Expands the list to show items of all levels.

Get selection from viewport

Selects the block definitions referenced by the selected block instances in the viewport. RH-75791

Purge unused block definitions

Deletes the block definitions that do not have any instances inserted to the model or layout spaces. RH-74774

Use the Purge command to delete more types of unused data.

Export linked block definitions

Saves all the Linked and Embedded and Linked block definitions in the current model to a zip file. RH-80155

Embedded and linked block should

These options decide how "embedded and linked" block definitions will update each time a model is opened.

总是更新

Update without any prompt.

更新前先提示

The Block Definitions to Update dialog box appears for actions.

永不更新

Never update and prompt.

List structure

RH-80068

Columns
名称

The block definition name.

Top Level

The instance number of the block definition.

Nested

The instance number of the block definition nested in other block instances.

Total

The instance number of the block definition regardless of Top Level and Nested.

Object Count

The total number of objects and direct nested blocks in the block definition.

To sort the list

  • Click a column header.

    Block definition names are sorted in Natural sort order.RH-59136

    Natural sort order: 1, 2, 3, 10 (10 is listed after 3)

    Alphabetical sort order: 1, 10, 2, 3 (10 is listed before 2)

Block definition

Block A, B, C, and D are block definitions.

  • Selecting a block definition highlights its block instances in pink with axes icons. RH-71857

    The pink highlight is cleared when the Block Definition panel loses focus. RH-71624

  • Selecting a block instance highlights its block definition in light-blue. RH-71857

The icons indicate the definition types:

置入
Embedded and linked
Linked

Block definition context menu

  • Right-click on a block definition name to show the context menu.
Select Instances

Selects instances of the selected block definition in viewports.

插入

Inserts the block definition to viewports as block instances.

Or, you can drag and drop a block definition into a viewport.

Rename

Edits the block definition name.

删除

Deletes the selected block definition and all of its instances in the model.

Block definitions nested in another block definition cannot be deleted.

副本

Makes a new copy of the selected block definitions.

更新

Reloads the external file to see the latest changes.

The icon appears behind the block definition name when the linked block is out of date.

  • Click the icon to reload the block.
Count/Info

Lists the details of the selected block definition in the Block Instance Info dialog box. RH-73652

导出

Saves the block definition's component objects to one of the file formats supported by Rhino.

Instance/Nested instance numbers

Block A has 5 top-level instances and 2 nested instances in the model.

Objects in block definition

Block A contains a curve (a1) and a surface (a2).

  • Selecting an object of a block definition highlights the objects in viewports. RH-71857

The icons indicate the object types.

Block object context menu

  • Right-click on a block object name to show the context menu.
选取

Selects the object in viewports. RH-72406

Rename

Edits the name of the block object.

删除

Deletes the block object from the block definition.

Block definition with nested blocks

Block A and B are nested in Block D.

The icon indicates they are nested blocks.

Status bar

The status bar shows how many block definitions in the model and how many of them are currently selected.RH-80370

  • Point the mouse cursor to the status bar to show a tooltip for the count of different block definition types: Embedded, Embedded and linked, and Linked.

属性

名称

图块定义的名称。

Pop out

Brings up a larger and resizable Block Definition Properties window. RH-72340

描述

显示图块定义的文本信息。

预览

The preview image of the block definition.

  • Right-click to change the display mode or view direction. RH-70669

单位

(Embedded block definitions only) RH-28728

Block units

The units of the block definition.

If you change the Block units, you will be prompted if you want to scale the block definition.

Definition Type

置入

Saves geometry in the model. The block definitions will not update when the external file changes.

Embedded and Linked

Saves geometry in the model and maintains a link to the external file. Linked geometry will update when the external file changes. If the external file cannot be located, the geometry saved in the model is still available.

Linked

Only maintains a link to the external file. Linked geometry will update when the external file changes. If the external file cannot be located, the geometry will be missing in the model.

Linked block definitions use both absolute and relative paths.

When the external file of a linked block is not found

The missing block location is marked with a text dot object listing the missing block name.

Rhino 如何搜寻分工运行与外部链接的文件的详细说明请见: Rhino Wiki: File finding

处理这个问题

  • Click the Browse button to locate the missing block file.
    Or, right-click on the block name and select Delete from the right-click context menu to remove the link.

Options for "Embedded and linked" and "linked"

Filename

The path and name to the external file.

  • Click the button to select a recently used external file.
浏览

Change the path of the external file.

Found at:

The path of the external file.

编辑

Edit the external file with the associated application.

Read linked blocks from external file

Linked blocks in the file being inserted are also inserted.[[not working RH-70668]]

Layer Style

定义图层名称的组织方式

启用

将图块里图层中的物件插入目前模型里相同名称的图层。

参考

以文件名称做为父图层的名称,将图块里的图层插入为它的子图层。

Hyperlink

Adds hyperlink information to a block definition. This information can be retrieved with the Hyperlink command.

描述

A description of the URL.

URL

A web address. Click the address to open the page in the default browser.

测试

Opens the URL in the default web browser.

相关指令

AddObjectsToBlock

The AddObjectsToBlock command adds objects to an existing embedded block definition. RH-73093

步骤

  1. Select an instance of an embedded block definition.

  2. Select the objects to add to the block definition

To remove objects from a block definition, use the BlockEdit command.

BlockEdit

BlockEdit 指令编辑选取的图块引例,并更新它的图块定义。

步骤

  1. 选取要编辑的图块引例。

    双击要编辑的图块引例。
    将在 Rhino 窗口中打开图块编辑,并锁定其他物件。
    您现在可以使用任何编辑工具编辑图块中物件的几何特征。
  2. 按确定按钮接受编辑变更。
    想要取消编辑,点击右上角的 [X] 按钮。
  3. 按确定按钮接受编辑变更。
    想要取消编辑,点击左上角的红色按钮。

指令行选项

These command-line options are only available for the scriptable -BlockEdit command. RH-34493

打开

Prompts to select a block instance to edit.

SaveAndClose

Saves any changes you have made to the block definition and closes the dialog.

DiscardAndCancel

Discards any changes you have made to the block definition and closes the dialog.

  • SaveAndClose and DiscardAndCancel only work for editing embedded block definitions. For linked block definitions, use the scriptable -Exit command to script closing the second Rhino window. RH-82022

图块编辑选项

图块编辑对话框将图块以层级嵌套关系显示出图块的名称。

加入物件

将选取的物件加入图块定义,如果选取的物件是一个图块,该图块会被加入层级嵌套图块。新加入的嵌套图块在下次执行 BlockEdit 指令时才会出现在图块的树状清单里。

物件将被复制并加入到图块定义中,原始的物件依然在模型中而不会被删除。

移除物件

从图块定义移除选取的物件。

图块更新以后,从图块中移除的物件会被作为独立的物件添加到模型。

设定基准点

重新指定图块的插入点。

图块定义更新后,图块引例会偏移,以符合新的插入点。

附注

  • 图块定义里不支持隐藏或锁定的物件,如果您隐藏或锁定图块定义里的物件,会有另一个讯息提示您是否要将该物件移出图块定义。
  • 其它用户使用中的链接的图块无法编辑。
  • 如果在保存和关闭当前模型时图块编辑对话框保持打开状态的话,则在重新打开模型时将弹出图块编辑对话框。方便您继续进行图块编辑。
  • Properties of objects (selected by sub-object selection) in block instances can be directly edited. RH-69724
  • Objects (selected by sub-object selection) in a block instance can be directly deleted and the block definition will be updated. RH-80067

BlockResetScale

BlockResetScale 指令可以将图块引例的 x、y 和 z 比例重置为 1,或将最适合的比例应用于所有轴。

非均匀缩放的图块引例将被重置为原始比例。

指令行选项

模式
1

将图块引例的x、y和z比例重置为1。

自动

如果任何两个轴具有相同的比例,则将比例应用于第三个轴。

如果所有三个轴都有不同的比例,则将平均比例应用于所有轴。

  • 如果图块引例已预选,该指令将不会提示选上述项。

请参考

编辑一个图块

管理图块

CopyLinkedBlockDefinition

CopyLinkedBlockDefinition 通过引用的图层复制一个链接的图块。

示例 - 创建链接的图块:

  1. 创建一个简单的模型文件命名为 BlockDef.3dm,将用它来作为图块定义。
  2. 新建一个模型文件,命名为"FancyModel.3dm"。
  3. 使用 Insert 指令以“链接”的方式插入图块,图层样式选择为“参考”。
  4. 将图块命名为"A"。
  5. 执行 CopyLinkedBlockDefinition 指令将 "A" 复制为一个新的图块"B"。
  6. 执行 CopyLinkedBlockDefinition 指令将 "A" 复制为一个新的图块"C"。
  7. 调整这三个图块的图层设置。
  8. 执行 BlockManager 就可以看到有三个链接到同一个文件"BlockDef.3dm"的图块引例。

CreateUniqueBlock

The CreateUniqueBlock command duplicates the block definition of a block instance and changes the block instance to reference the new block definition. RH-71621

步骤

  • Select a block instance or multiple block instances of the same block definition.

ReplaceBlock

ReplaceBlock 指令将选取的图块引例以另一个图块定义取代。

步骤

  1. Select block instances to change in the viewports.
    如果您未选取一个图块定义的所有引例,指令视窗会提示模型里还有多少相同的图块引例未选取。
  2. 选取用来取代的图块定义。

指令行选项

从图块定义清单选取

列出模型里所有可供选取的图块定义。

全部

选取所有相同的图块引例,包括未选取的、隐藏的及锁定的图块引例。

不选取其它相同的图块引例,只变更目前选取的图块引例。

BlockDefinitionName

Selects the replacement block definition by entering its name. RH-72651

ExportLinkedBlocks

The ExportLinkedBlocks command saves all the Linked and Embedded and Linked block definitions in the current model to a zip file. RH-80155

ExportBlockAttributes

The ExportBlockAttributes command saves block definition properties and attribute user text of the selected block instances to a .csv file.

步骤

  1. Select one or more block instances.

  2. Select the block definition properties and attribute user text that you want to export.

    Hold Ctrl (CMD) or Shift key to make a non-continuous or range selection.

请参考

How to add block attribute text to a block definition

McNeel Wiki: Using blocks