特定管理 > 支援視覺化與發行 > WVS Creo View 整合 > 視覺化 CAD 表示零件與組件特徵
  
視覺化 CAD 表示零件與組件特徵
Creo View 中或從「產品結構瀏覽器」中的「視覺化」標籤檢視 WTPart 或 EPMDocument 結構時,會透過將結構中所有物件的預設表示合併至單一 PVS 檔案來自動產生結構的圖形。目前導覽條件可用來選取會選取以進行顯示的 WTPart 或 EPMDocument。
不過,如果零件具有切除組件特徵,依預設,切除不可見。如果零件與 CAD 組件相關聯且該組件的子項並沒有與表示相關聯的 WTPart,同時已將組件零件發行為延伸的定位組件,零件的圖形在組件中將不可見。以下幾節描述在如下的使用案例中如何啟用圖形的可見度。
組件特徵的視覺化
動態零件結構中組件功能的視覺化可透過將「視覺化」 > 「動態結構」 > 「動態零件結構內的組件功能」使用者偏好設定設為「是」來啟用。動態 CAD 結構中組件特徵的視覺化可透過將「視覺化」 > 「動態結構」 > 「動態 CAD 結構內的組件功能」使用者偏好設定設為「是」來啟用。
使用案例 -「WTPart 結構」與具有組件特徵及彈性元件的 CAD 組件相關聯。所有結構層級中所有組件的預設表示都會發行為非定位組件或延伸的定位組件。您無法將具有組件特徵的組件發行為定位組件。以動態方式檢視零件結構時,必須顯示組件特徵與彈性元件。
啟用組件特徵有一些限制,必須僅在瞭解這些限制且其可接受的情況下啟用。包含組件特徵的 OL 檔案會從組件的表示擷取。如果存在多個版序/版本的子零件,則無法保證用來顯示組件特徵的 OL 檔案就是針對組件的目前導覽條件所選取之版序/版本建立的檔案。
例如,如果您擁有含兩個子零件且每個子零件有兩個版本的組件,則會有四種可能的幾何組合:
Part1 A.1、Part2 A.1
Part1 A.2、Part2 A.1
Part1 A.1、Part2 A.2
Part1 A.2、Part2 A.2
當使用最新組態規格產生零件結構時,Part1 A.2 與 Part2 A.2 顯示於零件結構中。但是,如果 Part1 有組件特徵,它可以使用 Part1 A.1 而非 Part1 A.2 的 OL 檔案。
使用 wvs.properties 檔案控制組件特徵的視覺化
下列 WVS 內容可用來控制組件特徵的視覺化:
WVS 內容
描述
edrload.dynamicpartstructure.excludeassemblyrepresentations
edrload.dynamiccadstructure.excludeassemblyrepresentations
預設值:True
摘要:指定是否排除具有額外組件特徵的表示。這些內容可用來在產生動態結構時改善效能。它們不會影響實際的最終結果;也就是說,無論將內容設定為何,動態結構都相同。
描述︰這些內容會指定是否要將具有累加組件特徵 (例如焊接和管道) 的組件零件或 CAD 文件的表示排除在動態 CAD 零件結構之外。
如果該內容不存在,則預設為 「真」
* 
此內容的效能提升將在使用 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 會對效能造成影響。請使用在頂層組件上為非直接子項建立組件特徵的建模作法,為客戶將此內容設定為
CAD 表示零件的視覺化
顯示動態零件結構時,圖形由結構中零件的合併表示組成。針對某些 WTPart,子零件結構會無法顯示或不完整,且子項沒有與之關聯的圖形。供應商零件就是一個範例。若為供應商零件,結構中會有表示完整供應商組件的單一 WTPart。在這些情況下,3D 圖形是不完整的。遺失子零件結構的 WTPart 結構稱為 CAD 表示零件
Windchill 10.2 M030 開始,可以將 Windchill 配置為針對「CAD 表示零件」顯示 3D 圖形。「CAD 表示零件」的整個表示可用來顯示 3D 圖形。用來顯示圖形的表示是零件的預設表示。如果預設表示遺失,則會使用圖像關聯 EPMDocument 的預設表示,且會合併完整表示,包括所有子項。WTPart 結構中「CAD 表示零件」的任何子 WTPart 都會從視覺化結構中移除。
在下列範例中,WTPart "ASSYA" 擁有與含三個子項之「CAD 組件」相關聯的圖像。「CAD 組件」擁有已發行的表示。將此零件識別為「CAD 表示零件」時,產生的視覺化結構會包括「CAD 組件」的子項。
將零件識別為 CAD 表示零件
配置用來識別 CAD 表示零件的群組 - XML 檔案可用來控制識別為「CAD 表示零件」之項目的定義。可將 XML 檔案配置為擁有多個群組來代表「CAD 表示零件」。每個群組都可以包含多個全域屬性與/或「WTPart 可變類型」。WVS 偏好設定 (可從「網站」「組織」前後關聯的「視覺化」 > 「動態結構」 > 「配置 CAD 表示的零件 XML 位置」中找到) 可配置用來配置識別為「CAD 表示零件」之零件的 xml 檔案的位置與名稱。位置可相對於 <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 會在產生動態結構時將結構顯示為已修改。
WTPart 結構的自訂
您可以透過提供自訂勾點以排除零件來修改 WTPart 動態結構的產生方式、使用除零件預設表示以外的表示,或包括組件的完整表示,而不是合併與其子項相關聯的表示。如需詳細資訊,請參閱 Windchill Customization Guide (Windchill 自訂指南) 的 "Modifying the Default Behavior of Dynamic Part Generation" 一節,或檢閱 <Windchill>\ prog_examples\wvs\com\ptc\wvs\PartStructureFilter.java
範例 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>