·關於IFC檔案讀取類的設計的想法(LocalPlacement)

aaaaatiger發表於2007-03-29
 IFC檔案是用樹形結構組織的,LocalPalcement也是通過樹形結構來實現一層一層的遞迴巢狀的相對座標系統。那麼,假設我們需要把這個相對座標系統中的點轉換成為一個只有一個絕對座標系統的點,類的設計應該考慮增加一個堆疊,儲存所有的LocalPlacement。在轉換的時候,可以逐個呼叫。

  在這個堆疊中,所儲存的物件應該是一個LocalPlacement物件,它儲存了一個相對座標,包括Direction、相對原點和一個負責把座標系內外的點互相轉換的函式,或者兩個函式。

IFC files are orgnaized like a tree. The LocalPlacement is also orgnaized like a tree, and a relative coordinate system is created like this. Then, suppose we need to convert a point in the relative coordinate system in IFC to a univerisy coordinate system, I think we should consider to add a stack, which store all the LocalPlacement. When we covert the point, we can convert from one coordinate to another one by one, and after we finished all the coordinate, we convert a point in relative coornidate system to a point in uinverity coornidate system.

Inside this stack, it should be a object of LocalPlacement, which contains the Direction of its coordinate system, the origin point of its coordinate system and one function respond for covert points into its coordinate system, another function respond for convert points out of its coordinate system.

 

相關文章