• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            eryar

            PipeCAD - Plant Piping Design Software.
            RvmTranslator - Translate AVEVA RVM to OBJ, glTF, etc.
            posts - 603, comments - 590, trackbacks - 0, articles - 0

            OpenCASCADE Performance Test

            Posted on 2014-09-25 21:41 eryar 閱讀(2508) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): 2.OpenCASCADE

            OpenCASCADE Performance Test

            eryar@163.com

            Abstract. Use the Draw Test Harness to test the performance of OpenCASCADE by Tcl scripts. From the test result, you will check whether the OpenCASCADE meet your need.

            Key Words. OpenCASCADE, Performance Test, Draw Test Harness, Tcl/Tk

            1. Introduction

            OpenCASCADE開(kāi)發(fā)平臺(tái)提供了3D曲面和實(shí)體造型,CAD數(shù)據(jù)交換及可視化的功能。作為C++的開(kāi)發(fā)庫(kù),OpenCASCADE最適于處理3D造型的CAD,制造、測(cè)量(CAM)及數(shù)值仿真(CAE)等軟件的開(kāi)發(fā)。

            Draw Test Harness使用Tcl封裝了OpenCASCADE的很多命令,通過(guò)編寫(xiě)Tcl腳本,可以方便地測(cè)試OpenCASCADE相應(yīng)的功能。

            本文主要介紹使用Tcl/Tk腳本在Draw Test Harness中測(cè)試OpenCASCADE的網(wǎng)格及可視化的性能。

            wps_clip_image-27844

            Figure 1.1 Test 1000 Spheres

            2.Mesh Test

            實(shí)體形狀顯示需要被網(wǎng)格化,網(wǎng)格化速度的快慢直接影響顯示的速度。所以先測(cè)試一下OpenCASCADE的網(wǎng)格剖分算法的速度。相應(yīng)的Tcl腳本如下所示:

             

            #
            #    Copyright (c) 2014 eryar All Rights Reserved.
            #
            #        File    : testocc.tcl
            #        Author  : eryar@163.com
            #        Date    : 2014-09-25 18:10
            #        Version : 1.0v
            #
            #    Description : Test the OpenCASCADE performance.
            #


            pload MODELING VISUALIZATION

            set shapeCount 
            100
            set count 
            10
            set distance 
            5000

            #psphere s 3.0
            #restore data/occ/CrankArm.brep s
            #restore data/occ/Moto.brep s

            restore data/occ/F1.brep s

            puts 
            "\nMeshing the $shapeCount shapes"
            chrono aTimer start
            for {set i 0} {$i < $shapeCount} {incr i 1} {
                copy s s
            $i

                set dx [expr (
            $i%$count)*$distance]
                set dy [expr (
            $i/$count)*$distance]
                set dz 
            0.0

                ttranslate s
            $i $dx $dy $dz

                
            # mesh the shape
                incmesh s$i 1 1
            }
            chrono aTimer show

            下面對(duì)上述代碼進(jìn)行簡(jiǎn)單分析:

            v 用pload命令加載所需要的建模及可視化模塊;

            v 用restore命令加載一個(gè)brep文件到形狀變量s;

            v 用chrono打開(kāi)一個(gè)計(jì)時(shí)器aTimer;

            v 用ttranslate來(lái)陣列復(fù)制形狀s得到的形狀;

            v 用incmesh來(lái)對(duì)形狀進(jìn)行網(wǎng)格化;

            wps_clip_image-31088

            Figure 2.1 Mesh 100 F1

            上述Tcl測(cè)試了網(wǎng)格化100輛F1賽車(chē)的時(shí)間如上圖所示。可以修改上述Tcl腳本代碼,來(lái)測(cè)試網(wǎng)格化10000個(gè)球所需要的時(shí)間。

            3.Display Test

            網(wǎng)格化之后可以顯示出形狀了。下面的Tcl腳本測(cè)試了OpenCASCADE的顯示性能:


            puts 
            "\nDisplaying the $shapeCount shapes"
            chrono aTimer start
            for {set i 0} {$i < $shapeCount} {incr i 1} {
                vdisplay s
            $i
            }
            chrono aTimer show
            chrono aTimer stop

            vsetdispmode 
            1
            vfit

            puts 
            "\nShow the frame rate"
            vfps

             

            顯示效果如下圖所示:

            wps_clip_image-18679

            Figure 3.1 Hundreds of F1

            其中命令vfps是顯示當(dāng)前視圖的幀頻數(shù)的。100輛F1的幀數(shù)有26,速度還行,稍有卡滯。

            4. Conclusion

            根據(jù)上述Tcl腳本可以看出OpenCASCADE的網(wǎng)格及可視化的性能還可以。可以修改上述代碼,來(lái)測(cè)試顯示10000個(gè)球體所需要的時(shí)間。

            最后給出上述Tcl測(cè)試用的模型數(shù)據(jù)及Tcl腳本完整代碼供下載使用。

            PDF Version and Tcl Script: OpenCASCADE Performance Test

            久久国产亚洲精品麻豆| 91精品无码久久久久久五月天| 亚洲国产成人精品女人久久久 | 精品综合久久久久久97| 亚洲精品午夜国产va久久| 久久久久久曰本AV免费免费| 丰满少妇人妻久久久久久| 国产成人无码精品久久久免费 | 国产精品久久影院| 久久亚洲中文字幕精品一区| 亚洲愉拍99热成人精品热久久| 国产欧美一区二区久久| 精品久久久一二三区| 天天综合久久久网| 奇米综合四色77777久久| 久久本道综合久久伊人| 亚洲国产精品无码久久| 99久久精品九九亚洲精品| 亚洲AV无码久久精品成人| 精品无码久久久久久国产| 久久66热人妻偷产精品9| 久久综合色老色| 久久国产精品二国产精品| 久久精品一区二区| 久久精品中文无码资源站| 亚洲精品午夜国产va久久| 看全色黄大色大片免费久久久| 久久免费高清视频| 2022年国产精品久久久久| 伊人久久大香线蕉亚洲| 久久无码高潮喷水| 久久久精品人妻一区二区三区蜜桃| 国产99久久久国产精品~~牛| 久久久一本精品99久久精品88| 2020久久精品亚洲热综合一本| 人妻精品久久久久中文字幕| 国产福利电影一区二区三区久久久久成人精品综合 | 久久人妻无码中文字幕| 久久久久99精品成人片三人毛片| 久久久精品2019免费观看| 国产精品久久久久久福利漫画 |