三維建模方法之CSG與B-Rep比較

來源:互聯網
上載者:User

 

轉於http://3dke.blogbus.com/logs/61375826.html

  電腦中表示三維形體的模型,按照幾何特點進行分類,大體上可以分為三種:線框模型、表面模型和實體模型。如果按照表示物體的方法進行分類,實體模型基本上可以分為分解表示、構造表示CSG(Constructive Solid Geometry)和邊界表示BREP(Boundary Representation)三大類。
 
  常用的分解標記法有:四叉樹、八叉樹、多叉樹、BSP樹等等。
  構造表示的主要方法:掃描表示、構造實體幾何表示、特徵和參數化表示。
  邊界表示的典型代表是翼邊結構。
 
  CSG建模法,一個物體被表示為一系列簡單的基本物體(如立方體、圓柱體、圓錐體等)的布爾操作的結果,資料結構為樹狀結構。樹葉為基本體素或變換矩陣,結點為運算,最上面的結點對應著被建模的物體;而BREP的一個物體被表示為許多曲面(例如面片,三角形,樣條)粘合起來形成封閉的空間地區。
   
  BRep優點:
  1. 有較多的關於面、邊、點及其相互關係的資訊。 
  2. 有利於產生和繪製線框圖、投影圖,有利於計算幾何特性,易於同二維繪圖軟體銜接和同曲面建模軟體相關聯。


  BRep局限:
  由於它的核心資訊是面,因而對幾何物體的整體描述能力相對較差,無法提供關於實體產生過程的資訊,也無法記錄組成幾何體的基本體素的元素的未經處理資料,同時描述物體所需資訊量較多,邊界表達法的表達形式不唯一。
 
  CSG優點:
  方法簡潔,產生速度快,處理方便,無冗餘資訊,而且能夠詳細地記錄構成實體的原始特徵參數,甚至在必要時可修改體素參數或附加體素進行重新拼合。資料結構比較簡單,資料量較小,修改比較容易,而且可以方便地轉換成邊界(Brep)表示。
 
  CSG局限:
  由於資訊簡單,這種資料結構無法存貯物體最終的詳細資料,例如邊界、頂點的資訊等。由於CSG表示受體素的種類和對體素操作的種類的限制,使得它表示形體的覆蓋域有較大的局限性,而且對形體的局部操作(例如,倒角等等)不易實現,顯示CSG表示的結果形體時需要的間也比較長。

  到底使用哪種方法呢?取決於不同的視角,他們各自都有優缺點,可以從以下幾點來考慮:
  1.現實 - 模型是否需要近似實際的材質密度,厚度和體積,或者是否需要顯示真實的曲面細節
  2.精度 - 需要什麼樣的精度層級
 
  混合模式(Hybird Model)是建立在BRep與CSG的基礎上,在同一系統中,將兩者結合起來,共同表示實體的方法。以CSG法為系統外部模型,以B-Rep法為內部模型,CSG法適於做使用者介面,而在電腦內部轉化為B-Rep的資料模型。相當於在CSG樹結構的結點上擴充邊界法的資料結構。混合模式是在CSG基礎上的邏輯擴充,起主導作用的是CSG結構,B-Rep的存在,減少了中間環節中的數學計算量,可以完整的表達物體的幾何、拓撲資訊,便於構造產品模型。
 
  還有空間劃分標記法,利用四叉樹或八叉數的資料結構來表示2D/3D的模型。

--------------------------------

To determine if the B-rep model of the handle was actually smaller than models created using the CSG method, a sample handle was created using both of these methods. The CSG method produced a model that used 50% more disk space than the B-rep method handle.
It was also more difficult to construct, and required more constraint equations and variables. Clearly, the B-rep method was indeed the best choice for this model.

Next, a similar study was conducted for the connector model. Again, the same model was created using CSG and B-rep methods. The CSG method did have to use a profile and circular sweep to construct the countersink on the bottom of the connector. For this
set of models, the CSG method had a 10% smaller file size, and was easier to construct. This is most likely due to the complex profile that had to be created for the B-rep method. By constructing this part as a series of co-axial cylinders that all start at
the same point, but have different heights and diameters, the process was significantly simpler than the original design. The original design for the CSG model used cylinders stacked on top of each other, and the inside part of the connector was not hollow.
The decision to create a hollow center in the connector complicated the B-rep method significantly, but simplified the CSG method. Due to this change, the connector model would probably have been better created using the CSG method from this test.

The third family was simply a profile, so those parts could not be made with CSG methods. For the fourth family, the main body of the part was again constructed with B-rep and a combination of B-rep and CSG methods. Again, the method that used CSG proved
to be a better choice. A CSG box primitive of the proper size was inserted. Then, a B-rep rotate face operation was performed on two of the faces. The pure B-rep method required that the cplane first be changed from the default top cplane to the right cplane.
The profile had to be inserted in two parts and then unioned. The profile was extruded, and the cplane changed back to the top cplane. This required six commands, and multiple attempts before the profile could be constructed correctly. The B-rep method also
resulted in a 10% larger disk file.

 

 

 

目前, 常用的特徵(Feature)的表示方法主要有以下三種:

  (1) 基於B-rep的方法: 在B-rep 方法中, 特徵被定義為一個零件的相互聯絡的面的集合(面集)。 這些特徵也被稱為“面特徵”。 B-rep 模型是基於圖的, 所有的幾何/拓撲資訊顯式地表達在面棗邊棗頂點圖中, 因此, B-rep模型常被稱為賦值的模型。 B-rep 表示特徵的方法受到許多研究者的喜歡, 這是因為可以得到充足的資訊以及它是基於圖的表示方法(許多特徵識別系統是基於圖表示的)。B-rep模型可以與屬性值(如, 表面粗糙度, 材料等)、尺寸和公差聯絡在一起,B-rep方法的缺點是它與特徵體素和體積特徵沒有直接的聯絡, 特徵操作(如, 刪除特徵)難於進行。

  (2) 基於CSG 的方法: 基於CSG 的特徵表達方法將特徵定義為體積元素,體積元素通過布爾操作構造零件。 使用CSG 表示方法簡捷、有效、易於編輯和操作體素,並提供CSG和特徵體素之間有意義的聯絡, 而且二叉樹可用於特徵模型的構造。 對於特徵提取,CSG 模型的主要問題是其表示的不唯一性, 以及缺少對低層的構形元素的顯式表達。然而,給CSG 模型賦值, 推匯出其相應的邊界表示, 就可以克服這些問題。

  (3) 基於混合CSG/B-rep的方法: 由於CSG 和B-rep表示方法都各有優缺點,因此,汲取二者優點的混合表示方法便產生了。Nnaji和Liu開發了一個工藝規劃系統,可以提取基於CSG 的資訊(B-rep資訊是由CSG 模型匯出的)。重新構造CSG 樹和B-rep資訊,使其成為以一種混合形式來表示特徵的另一種CSG 樹。Roy和Liu提出一種混合CSG/B-rep方法表示特徵及尺寸和公差。特徵的階層提供物體組件關係的多級表示,並在每級的細節保持有邊界表示。Gossard等人提出一種在幾何造型中顯式地表示尺寸公差和幾何特徵的方法,此方法將CSG 和B-rep表示結合在一個被稱為形體圖的圖結構中。

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.