OpenCascade Primitives BRep-Cone
Abstract. BRep is short for Boundary Representation. Boundary Representation gives a complete description of an object by associating topological and geometric information for solid modeling. In this case, objects are described by their boundaries. There are two types of information in BRep: Topological information and Geometric information. This paper is concerned with the Cone BRep in OpenCascade, and also show how to use Tcl script to dump cone BRep info.?
Key words. OpenCascade, BRep, Boundary Representation, Cone
1. Introduction
本文通過在Draw Test Harness中的Tcl腳本來生成圓錐體Cone的邊界表示(BRep)數(shù)據(jù),通過對生成的數(shù)據(jù)進(jìn)行分析,來理解OpenCascade中的Cone的邊界表示方式。?
如下圖所示為使用Tcl命令在Draw Test Harness中生成的圓錐體:?
Figure 1.1 Cone Generated by Tcl in Draw Test Harness?
2. Dump Cone BRep Info by Tcl
使用Tcl腳本在Draw Test Harness中輸出圓錐體(Cone)的邊界表示(BRep)數(shù)據(jù)的命令如下圖所示:?
Figure 2.1 Dump Cone BRep Info by Tcl in Draw Test Harness?
以上命令會生成一個圓心位于坐標(biāo)原點(diǎn)(0,0,0),半徑R為10,高度H為20的圓錐體,圓錐體的尺寸如下圖所示:?
Figure 2.2 Cone Generated by Tcl Script?
3. Cone BRep in OpenCascade
還是先從頂點(diǎn)(Vertex)開始編號,來對圓錐體(Cone)的邊界表示(BRep)進(jìn)行理解。從導(dǎo)出的BRep信息可以看出,圓錐體有兩個頂點(diǎn)(Vertex),對其編號,如下圖所示:?
Figure 3.1 Vertex of the Cone?
圓錐體共有三條邊Edge,分別為Edge #7,Edge#8和Edge#10?,F(xiàn)在來分析每條邊中的幾何信息。先來看看邊Edge#7的幾何信息:?
Figure 3.2 Edge #7 of the Cone?
三維空間曲線2是一個圓(Circle),取值范圍是[0,2PI]。由其參數(shù)可知此圓圓心位于原點(diǎn)(0,0,0),半徑為10,位于XOZ平面上,即圓錐的底面的圓。?
曲面1上的參數(shù)曲線4的取值范圍是[0,2PI]。即PCurve4是位于原點(diǎn),沿U方向的直線。所以在取值范圍內(nèi)得到曲面上的參數(shù)分別是(0, 0)和(2PI, 0)。即曲面上v值恒為0,u從0到2PI。由圓錐面的參數(shù)方程可知:?
這就是圓的參數(shù)方程。即與空間曲線2表示的是同一個圓。同理曲面2上的曲線5也一樣。?
Figure 3.3 PCurve 4 on Surface 1 and PCurve5 on Surface 2 of the Cone?
同理對Edge#8中的幾何信息進(jìn)行分析可知,其中有一條三維空間曲線1和曲面1上的閉合曲線2和3。它們都表示起點(diǎn)在(10,0,0)沿錐面上的一條斜線。?
Figure 3.4 Edge#8 of the Cone?
Edge#10中的幾何信息只有曲面1上的曲線1,對應(yīng)曲面上的參數(shù)分別為(0, 22.36)和(2PI, 22.36),且是退化邊,退化(Degenerated)成一個點(diǎn)。即當(dāng)v取22.36時(shí),曲線的參數(shù)方程為:?
Figure 3.5 Edge #10 of the Cone?
Figure 3.6 Wires of the Cone?
由上圖可知,圓錐體有兩個環(huán)Wire,分別是Wire#4和Wire#6。其中環(huán)Wire#4就是圓錐體的底面圓環(huán)。將兩個環(huán)畫出如下圖所示:?
Figure 3.7 Wires of the Cone?
由兩個環(huán)Wire#4和Wire#6對應(yīng)的面Face#3和Face#5組成了殼Shell#2,殼Shell#2組成了體Solid#1。?
4. Conclusion
通過Tcl生成的圓錐體Cone的邊界表示BRep信息,分析了OpenCascade中的圓錐體的邊界表示方式。?
通過對OpenCascade中基本體Primitves的BRep信息進(jìn)行分析,來理解OpenCascade中的邊界表示方式。?
通過使用Tcl腳本來輸出BRep信息,來熟悉Tcl命令,體驗(yàn)Tcl在便利。?
5. References
1. OpenCascade, Test Harness User’s Guide 2013?
2. OpenCascade, BRep Format Description White Paper, 2013?
3. John K. Ousterhout, Tcl and Tk Toolkit, 1993?
?
PDF Version: OpenCascade Primitives BRep-Cone
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯(lián)系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
