如何設置廠房模型中的構件顏色?

示例描述與操作指南

以廠房類模型爲例,通過傳入16進制顏色值的方式,修改所選的某一類構件的顏色,本示例默認選中 IfcWallStandardCase 類型構件組。其它常用的構件類型還有 IfcDoor、IfcFlowController、IfcRailing、IfcSlab、IfcFlowFitting 等。
通過接口colorfulComponentsByKeysortComponentsByKey來實現。

示例效果展示

在這裏插入圖片描述

實現步驟

通過接口colorfulComponentsByKeysortComponentsByKey來實現。

// 點擊運行觸發的函數
const run = () =>{
   viewer3D.colorfulComponentsByKey(defaultCk,0xa451c5);   //改變構件顏色
}

下載完整代碼

相關示例

分類構件顏色

住房類示例-構件顏色

辦公區示例-構件顏色

相關接口

colorfulComponentsByKey

sortComponentsByKey

getHighlightComponentsKey

resetScene

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章