专业化管理 > 支持可视化和发布 > WVS Creo View 集成 > 显示动态结构
  
显示动态结构
本主题包含以下章节:
装配特征的可视化
Creo Parametric 柔性装配的可视化
CAD 表示的部件的可视化
动态部件结构中图像关联和提供图像关联部件的可视化
WTPart 结构的自定义
影响动态可视化的其他管理首选项
将部件标识为 CAD 表示的部件
示例:CAD 表示的部件 XML 配置
Creo View 中或从产品结构阅览器的“可视化”选项卡中查看 WTPart 或 EPMDocument 结构时,系统会通过将该结构 (部件或 CAD) 中对象的默认表示合并到单个 PVS 文件中来动态地生成该结构的图形。当前的导航条件用于选择选定了哪些 WTPart 或 EPMDocument 进行显示。
在对这些结构进行可视化时,在某些情况下,用户可能希望看到的预期可视化并不保留在结构中部件的默认表示中。本节将介绍在修改动态可视化的行为时处理上述不同情况的方法和注意事项。
装配特征的可视化
如果装配包含的特征可对其子项的几何进行修改,例如对子项进行切除,这会导致生成的几何无法在动态可视化中正确显示。如果装配包含这些类型的修改,则这些修改通常会作为静态表示或扩展定位装配发布,而子项的正确几何将仅存储在装配 (而非子项) 的表示中。这会导致动态结构可视化产生错误,因为它从子项的默认表示中加载子项的几何。
将用户首选项“可视化” > “动态结构” > “动态部件结构中的装配特征”设置为“是”可启用动态部件结构中装配特征的可视化。将用户首选项“可视化” > “动态结构” > “动态 CAD 结构中的装配特征”设置为“是”可启用动态 CAD 结构中装配特征的可视化。
启用此首选项可使 Windchill 系统读取装配文件的表示,并确定装配特征何时存在。在此情况下,Windchill 系统会选择使用在装配表示中生成的几何,而不会使用在子项的默认表示中生成的几何。
在动态可视化中对装配特征的处理受限于其基于导航条件组合访问“正确”几何的功能,而这些导航条件组合被应用于系统中存在的结构和表示。从装配的表示中可检索包含装配特征的 OL 文件。如果有多个小版本/子项部件版本,则无法保证用于显示装配特征的 OL 文件是为当前装配导航条件选定的小版本/版本而创建的。
这在很大程度上取决于已制定的发布策略以及在更改装配子项时是否重新发布装配。
例如,如果您的装配有两个子项部件,且每个子项部件都有两个版本,则存在四种可能的几何组合:
部件1 A.1,部件2 A.1
部件1 A.2,部件2 A.1
部件1 A.1,部件2 A.2
部件1 A.2,部件2 A.2
使用最新的配置规范生成部件结构时,部件1 A.2 和部件2 A.2 将会显示在部件结构中。但是,如果部件1 具有装配特征,则它可能会使用部件1 A.1 的 OL 文件,而不是部件1 A.2 的 OL 文件。
Creo Parametric 柔性装配的可视化
柔性装配可为父项装配提供覆盖其子项装配组件之一的定位信息的功能。这表示在进行动态可视化时,组件的位置从父项装配的表示中进行加载。这将覆盖存在于下部子装配中的位置。
在 Creo View 中打开动态 CAD 或部件结构,且其用户首选项设置为“是”时,柔性装配会显示在动态 CAD 或部件结构中的替代位置上 (由其父装配决定)。
“可视化” > “动态结构” > “动态 CAD 结构中的柔性装配特征”
“可视化” > “动态结构” > “动态部件结构中的柔性装配特征”
当使用具有柔性特征和装配特征的动态结构时,父项装配中的几何将用于装配特征,而父项装配中的变换 (位置) 将用于柔性特征。
* 
仅适用于 Creo Parametric 5.0 或更高版本的 Creo View Adapter 支持柔性装配。
CAD 表示的部件的可视化
当显示动态部件结构时,图形由结构中部件的合并表示组成。对于某些 WTPart 来说,子项部件结构不存在或不完整,且该子项没有相关图形。供应商部件就是其中的一个示例。供应商部件用结构中的单个 WTPart 表示整个供应商装配。在这种情况下,3D 图形并不完整。缺少子项部件结构的 WTPart 结构被称为 CAD 表示的部件
可以将 Windchill 配置为显示 CAD 表示部件的 3D 图形。“CAD 表示的部件”的整个表示用于显示 3D 图形。用于显示该图形的表示是部件的默认表示。如果默认表示缺失,将使用与图像关联的 EPMDocument 上的默认表示,并将对完整表示 (包括所有子项) 进行合并。WTPart 结构中 CAD 表示的部件的所有子项 WTPart 都将从可视化结构中移除。
在下面的示例中,WTPart "ASSYA" 与一个具有三个子项的 CAD 装配存在映像关联。该 CAD 装配有一个已发布的表示。如果将此部件标识为 CAD 表示的部件,则生成的可视化结构包含该 CAD 装配的子项。
动态部件结构中图像关联和提供图像关联部件的可视化
WTPart 的动态部件结构会显示所有者关联的 EPMDocument 的默认表示。但是,如果 WTPart 与一个或多个 EPMDocument 相关联,且 CAD 结构中所使用的表示为图像关联或提供图像关联的 EPMDocument,则动态部件结构可能无法正确显示。
为了在 Creo View 的动态部件结构中或“可视化”选项卡中正确显示上述图像关联或提供图像关联的 EPMDocument 表示,您可通过将“显示来自图像关联 EPM 文档的表示”首选项设置为“是”来启用此首选项,如下所述。
“可视化” > “动态结构” > “显示来自图像关联 EPM 文档的表示”设置为“是”
启用此首选项后,系统可以读取部件结构中具体值链接的信息,并标识结构中所用的图像关联或提供图像关联的 EPMDocument。此信息用于在 Creo View 或在产品结构阅览器的“可视化”选项卡中显示正确的表示。
如果部件结构是使用包含子项的图像关联或提供图像关联 EPMDocument 装配中的子项构建的,则对于此部件结构中的这一具体值,将使用图像关联或提供图像关联的表示来确定此结构中该节点的子项及其位置。然后,将子项与部件结构的子项进行比较,以标识匹配对并从部件结构中继续加载。如果存在不匹配的子项,则将使用图像关联或提供图像关联表示的几何和结构,而非部件结构。因此,几何由 EPMDocument 构成,但会保留部件结构的配置规范和交叉选择功能。
在以下示例中,尽管部件结构装配包含 Part4,但由于它未包括在 CAD 结构中,因此不会显示在动态部件结构中。
WTPart 结构的自定义
用户可以修改 WTPart 动态结构的生成方式,方法是通过提供自定义挂接来排除部件、使用除部件默认表示之外的其他表示或者包括装配的整个表示,而非合并与其子项关联的表示。有关详细信息,请参阅 Windchill Customization Guide (《Windchill 自定义指南》) 的 "Modifying the Default Behavior of Dynamic Part Generation" (修改动态部件生成的默认行为) 一章,或查看 <Windchill>\ prog_examples\wvs\com\ptc\wvs\PartStructureFilter.java
影响动态可视化的其他管理首选项
以下 WVS 特性用于控制装配特征的可视化:
WVS 特性
说明
edrload.dynamicpartstructure.excludeassemblyrepresentations
edrload.dynamiccadstructure.excludeassemblyrepresentations
默认值:True
概要:指定是否要排除具有附加装配特征的表示。这些特性用于提高生成动态结构时的性能。它们并不会影响实际的最终结果;也就是说,无论怎样设置特性,动态结构都是相同的。
说明:这些特性用于指定是否从动态 CAD 部件结构中排除具有附加装配特征 (如焊缝和管道) 的装配部件或 CAD 文档表示。
如果不进行设置,此特性默认为 True
* 
在使用 Creo View 适配器 (能将数据置入到 PVS 文件中以指示是否存在装配特征) 发布表示时,可以获得此特性的效果。目前,只有自 Creo View 3.0 M020 起的 Creo Parametric 适配器支持该功能。
edrload.dynamicpartstructure.versionmismatch
默认值:WTPart
概要:指定在打开 Creo View 时会显示哪些版本不匹配警告。
说明:此特性用于配置当用户查看已启用“装配特征”处理的“动态部件结构”时,如何显示版本不匹配警告消息。具体来说,如果 CAD 文档之间存在版本不匹配情况,则将显示一条警告消息。此特性有以下四种可能的值:
WTPart - 在警告消息中仅显示部件版本不匹配。
EPMDocument - 在警告消息中仅显示 EPMDocument 不匹配。
EPMDocumentRevertToWTPart - 在警告消息中显示 EPMDocument 不匹配。在无法检测是否存在 EPMDocument 不匹配的情况下,系统将检查 WTPart 是否不匹配。
Both - 在警告消息中同时显示 WTPart 不匹配和 EPMDocument 不匹配。
如果未指定该特性的值或未将该值设置为以上所指定的任一个值,则该特性的值将默认为 WTPart
publish.cadconvert.PROE.getalldependentsforextposassy
默认值:False
概要:Java 类搜索的“应用程序类型”。
说明:作为扩展定位装配发布时对 PROE 类型有效。如果将此特性的值设置为 True,表示将从装配结构中所有装配级别的元件中检索依存文件。如果设置为 false,则将仅从装配结构中的一级元件中进行检索。
* 
将此特性设置为 True 会对性能产生影响。当客户执行为顶级装配上的非直接子项创建装配特征的建模操作时,将此特性设置为 True
edrload.dynamiccadstructure.donotreadpvs
edrload.dynamicpartstructure.donotreadpvs
默认值:True
概要:指定是否在 Creo View 中或“可视化”选项卡中查看动态 CAD 结构或部件结构时读取表示的 PVS 文件。
说明:在服务器上生成具有 pvsfile (含单个组件) 的表示的动态结构,而无需从电子仓库读取 pvsfile。为了使动态结构生成能够识别此表示是否适合不读取 pvsfile,可以用一个新的 OL 文件名称标志来标注此表示。
如果设置为 True,在 Creo View 和“可视化”选项卡中加载动态 CAD 和部件结构时的性能会有所改善。
如果设置为 false,WVS 将读取每个组件的 PVS 文件。
将部件标识为 CAD 表示的部件
配置用于标识 CAD 表示的部件的组 - 一种用于控制 CAD 表示的部件标识定义的 XML 文件。可以对该 XML 文件进行配置来用多个组表示 CAD 表示的部件。每个组可以包含多个全局属性和/或 WTPart 可变类型。“可视化” > “动态结构” > “CAD 表示的部件配置 XML 位置”“站点”“组织”上下文中提供了一个 WVS 首选项,使用该首选项可配置 xml 文件 (用于配置标识为 CAD 表示的部件的部件) 的位置和名称。可将该位置指定为相对于 <Windchill> 目录的位置,也可以指定为绝对位置。有关如何创建用于标识 CAD 表示的部件的配置文件的详细信息,包括有关对名称和说明进行本地化的功能的信息,请参阅位于 <Windchill>\codebase\com\ptc\wvs\server\xml\ 中的 CADRepresentedPartConfiguration.xml 文件。
* 
更新 XML 文件时,必须将其重新加载到 Windchill 中。管理员可以更新首选项并单击“确定”来上载更改,否则文件将在下次启动方法服务器时更新。
用于选择标识 CAD 表示的部件时使用的组的用户首选项 - 用户可以通过设置“可视化” > “动态结构” > “动态部件结构中的 CAD 表示的部件”用户首选项来选择使用哪个组将部件标识为 CAD 表示的部件。在下面的示例中,Bucket Cylinder、Main Cylinders 和 Head Lights 均被选中用于将部件标识为 CAD 表示的部件。
用于确定是否显示要在动态部件结构中使用的未放置组件的用户首选项 - 用户可以通过设置“可视化” > “动态结构” > “在动态部件结构中显示未放置的组件”用户首选项来确定是否显示要在动态部件结构中使用的未放置组件。例如,如果将此首选项设置为“是”,则在 Creo View中打开动态部件结构时,将显示未放置的组件。
* 
“可视化”选项卡中查看 CAD 表示的部件的结构时,由于该结构不同于可视项结构,选定对象不会始终突出显示结构中的正确对象。在 Creo View 中查看 CAD 表示的部件时,正确的对象将突出显示出来,这是因为 Creo View 将结构显示为在生成动态结构时进行了修改。
示例:CAD 表示的部件 XML 配置
下面提供了可控制 CAD 表示的部件筛选的 XML 文件示例。
Group 1 defines an IBA-named "cad-represented-part" in which its value starts with "crp"
<!-- ####################################################### --> <!-- This configuration file is used by dynamic part structure visualization to control the CAD Represented Part Filtering. --> <!-- --> <!-- ####################################################### --> <!-- # The following XML elements and attributes are used to control CAD Represented Part Filtering # --> <!-- # defined by the following XML schema CADRepresentedPartConfiguration.xsd # --> <!-- ####################################################### --> <!-- --> <!-- Element: "cad-represented-parts" = Declaration element for all control options pertaining to CAD Represented Part Filtering. --> <!-- Element: "group" = defines a set of CAD Represented filters displayed on the UI --> <!-- Attribute: "id" = String value representing a unique id for the "group" element. --> <!-- Attribute: "name" = If attribute "resource_name" is defined the value is used to access the entry in the resource --> <!-- bundle for the name of the "group" else if "resource_name" is not present the value will --> <!-- be displayed as is on the UI for the name of the "group" element. --> <!-- Attribute: "description" {optional} = If attribute "resource_name" is defined the value will be used to access the entry in the --> <!-- resource bundle for the description of the "group" else if "resource_name" is not defined --> <!-- the value will be displayed as is on the UI for the description of the "group" element. --> <!-- Attribute: "resource_name" {optional} = Resource class to use to pull the "name" and "description" attribute values from. --> <!-- If this is defined for a "group" element the attributes "name" and "description" --> <!-- on the "group" element will be used as the keys to the entries in the resource file. --> <!-- Attribute: "default" {optional} = Sets the default value for the preference "group" to checked (enabled) or --> <!-- unchecked (disabled), if not defined the default will be "disabled" --> <!-- Element: "iba" = Defines a single part attribute to indicate the part as a "CAD Represented Part". --> <!-- Element: "name" = An attribute name that exists on a part in which its value can be used to determine if a part is --> <!-- a "CAD Represented Part". NOTE: The IBA types supported for this feature are String and boolean --> <!-- Element: "regex" = A Java regular expression used to determine if the attribute value equates to a "CAD Represented Part" --> <!-- Element: "object-type" = String name of a Windchill defined WTPart or soft type of WTPart. --> <!-- --> <!-- ############# --> <!-- # Example 1 # --> <!-- ############# --> <!-- Defines Two cad-represented-parts: --> <!-- Group 1 defines an IBA named "cad-represented-part" in which its value starts with "crp" --> <!-- and will be considered a CAD Represented Part. The group is enabled. --> <!-- --> <!-- Group "name" will be displayed as the string literal: "Name of the group displayed on the preference UI" --> <!-- Group "description" will be displayed as the string literal: "Description of group displayed on preference UI" --> <!-- --> <!-- Group 2 defines an IBA value of "cad-represented-part2" --> <!-- in which if its value is true will be considered a CAD Represented Part, The group is disabled. --> <!-- NOTE: Must use true or false for the regex value for boolean attributes. --> <!-- --> <!-- Group "name" will be displayed as the string literal: "Name of the group displayed on the preference UI" --> <!-- Group "description" will be displayed as the string literal: "Description of group displayed on preference UI" --> <!-- --> <!-- <cad-represented-parts> --> <!-- <group id="1" name="Name of the group displayed on the preference UI" --> <!-- description="Description of group displayed on preference UI" default="enabled"> --> <!-- <iba> --> <!-- <name>cad-represented-part</name> --> <!-- <regex>crp.*</regex> --> <!-- </iba> --> <!-- </group> --> <!-- <group id="2" name="Name of the group displayed on the preference UI" --> <!-- description="Description of group displayed on preference UI" default="disabled"> --> <!-- <iba> --> <!-- <name>cad-represented-part2</name> --> <!-- <regex>true</regex> --> <!-- </iba> --> <!-- </group> --> <!-- </cad-represented-parts> --> <!-- --> <!-- ############# --> <!-- # Example 2 # --> <!-- ############# --> <!-- Defines a "cad-represented-parts" with one entry which --> <!-- defines the entry for "object-type" to have a value of "org.rnd.ECADSoftType" which is a Windchill softtype, The --> <!-- group is disabled. --> <!-- --> <!-- Group "name" will be displayed as the string literal: "Name of the group displayed on the preference UI" --> <!-- Group "description" will be displayed as the string literal: "Description of group displayed on preference UI" --> <!-- --> <!-- <cad-represented-parts> --> <!-- <group id="1" name="Name of the group displayed on the preference UI" --> <!-- description="Description of group displayed on preference UI" default="disabled"> --> <!-- <object-type>org.rnd.ECADSoftType</object-type> --> <!-- </group> --> <!-- </cad-represented-parts> --> <!-- --> <!-- ############# --> <!-- # Example 3 # --> <!-- ############# --> <!-- Defines a cad-represented-parts with three entries and is enabled: --> <!-- First entry defining an IBA value "cad-represented-part" in which if its value is true --> <!-- will be considered a CAD Represented Part. --> <!-- NOTE: Must use true or false for the regex value for boolean attributes. --> <!-- Second entry defining a soft type value of "org.rnd.ECADSoftType1" --> <!-- Third entry defining a soft type value of "org.rnd.ECADSoftType2" --> <!-- --> <!-- Group name is defined by the resource class and key pairs: --> <!-- resource class = "com.ptc.wvs.resource" defined by the attribute "resource_name" on element "group" --> <!-- resource key = "name_key" defined by the attribute "name" on element "group" --> <!-- Group description is defined by the resource class and key pairs: --> <!-- resource class = "com.ptc.wvs.resource" defined by the attribute "resource_name" on element "group" --> <!-- resource key = "description_key_key" defined by the attribute "name" on element "group" --> <!-- --> <!-- <cad-represented-parts> --> <!-- <group id="1" name="name_key" --> <!-- description="description_key" resource_name="com.ptc.resource" default="enabled"> --> <!-- <iba> --> <!-- <name>cad-represented-part</name> --> <!-- <regex>true</regex> --> <!-- </iba> --> <!-- <object-type>org.rnd.ECADSoftType1</object-type> --> <!-- <object-type>org.rnd.ECADSoftType2</object-type> --> <!-- </group> --> <!-- </cad-represented-parts> --> <!-- ####################################################### -->
-<cad-represented-parts>
-<group default="enabled" description="Defines an IBA named CRP
where all objects that match the Java regex 'crp.*'
will be treated as a cad represented part."
name="CAD Represented Part" id="1">
-<iba>
<name>CRP</name>
<regex>crp.*</regex>
</iba>
</group>
</cad-represented-parts>