視覺化動態結構
本主題包含下列各節:
• 組件功能的視覺化
• Creo Parametric 彈性組件的視覺化
• CAD 表示零件的視覺化
• WTPart 結構的自訂
• 影響動態視覺化的其他管理偏好設定
• 將零件識別為 CAD 表示零件
• 範例:CAD 表示的零件 XML 組態
在 Creo View 中或從「產品結構瀏覽器」中的「視覺化」標籤檢視 WTPart 或 EPMDocument 結構時,會透過將結構中物件 (零件或 CAD) 的預設表示合併至單一 PVS 檔案來動態產生結構的圖形。目前導覽條件可用來選取會選取以進行顯示的 WTPart 或 EPMDocument。
顯現這些結構時,在一些情況下,使用者想要看到預期視覺化不會保存在結構中零件的預設表示上。本節將介紹在修改動態視覺化的行為時如何處理這些不同類型的情況與考量。
組件特徵的視覺化
如果組件包含修改其子項幾何的特徵,例如切除子項,這會導致產生的幾何在動態視覺化中錯誤顯示。如果組件包含這些類型的修改,它們通常會發行為靜態表示或延伸的定位組件,子項的正確幾何將僅儲存在組件 (而非子項) 表示中。這會導致動態結構視覺化不正確,因為它會從子項的預設表示載入子項的幾何。
動態零件結構中組件功能的視覺化可透過將 > > 使用者偏好設定設為「是」來啟用。動態 CAD 結構中組件特徵的視覺化可透過將 > > 使用者偏好設定設為「是」來啟用。
啟用此偏好設定可讓 Windchill 系統讀取組件檔案的表示,並識別是否存在組件特徵。若存在,它會選擇使用在組件的表示中,而不是子項的預設表示中產生的幾何。
能否在動態視覺化中正確處理組件特徵,受限於其能否根據套用至結構與系統中存在之表示的導覽條件組合存取「正確的」幾何。包含組件特徵的 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 檔案。
Creo Parametric 彈性組件的視覺化
彈性組件為父組件提供了取代其中一個子項組件元件之定位資訊的能力。這表示若進行動態視覺化,將從父組件的表示載入元件的位置。這會取代出現在較低子組件中的位置。
依照父組件的指示,在 Creo View 中開啟動態 CAD 或零件結構時,彈性組件會顯示在其在動態 CAD 或零件結構中的替代位置,且其使用者偏好設定設為「是」。
• > >
• > >
如果動態結構具有彈性特徵與組件特徵,父組件中的幾何可用於組件特徵,父組件的轉換 (位置) 可用於彈性特徵。
| Creo View Adapter for Creo Parametric 5.0 或更新版本支援彈性組件。 |
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 組件」的子項。
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 表示零件的群組 - XML 檔案可用來控制識別為「CAD 表示零件」之項目的定義。可將 XML 檔案配置為擁有多個群組來代表「CAD 表示零件」。每個群組都可以包含多個全域屬性與/或「WTPart 可變類型」。WVS 偏好設定 (可從「網站」與「組織」前後關聯的 > > 中找到) 可配置用來配置識別為「CAD 表示零件」之零件的 xml 檔案的位置與名稱。位置可相對於 <Windchill> 目錄指定,也可以是絕對的。如需有關如何建立用來識別「CAD 表示零件」之組態檔案 (包括本地化名稱與描述的能力) 的詳細資訊,請參閱 <Windchill>\codebase\com\ptc\wvs\server\xml\ 中的 CADRepresentedPartConfiguration.xml 檔案。
| 更新 XML 檔案時,必須將其重新載入到 Windchill。管理員可以更新偏好設定,並按一下「確定」來上載變更;否則,檔案將在下次啟動應用伺服器時更新。 |
用於選取用來識別 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>