• <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 閱讀(2499) 評論(0)  編輯 收藏 引用 所屬分類: 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開發平臺提供了3D曲面和實體造型,CAD數據交換及可視化的功能。作為C++的開發庫,OpenCASCADE最適于處理3D造型的CAD,制造、測量(CAM)及數值仿真(CAE)等軟件的開發。

            Draw Test Harness使用Tcl封裝了OpenCASCADE的很多命令,通過編寫Tcl腳本,可以方便地測試OpenCASCADE相應的功能。

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

            wps_clip_image-27844

            Figure 1.1 Test 1000 Spheres

            2.Mesh Test

            實體形狀顯示需要被網格化,網格化速度的快慢直接影響顯示的速度。所以先測試一下OpenCASCADE的網格剖分算法的速度。相應的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

            下面對上述代碼進行簡單分析:

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

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

            v 用chrono打開一個計時器aTimer;

            v 用ttranslate來陣列復制形狀s得到的形狀;

            v 用incmesh來對形狀進行網格化;

            wps_clip_image-31088

            Figure 2.1 Mesh 100 F1

            上述Tcl測試了網格化100輛F1賽車的時間如上圖所示。可以修改上述Tcl腳本代碼,來測試網格化10000個球所需要的時間。

            3.Display Test

            網格化之后可以顯示出形狀了。下面的Tcl腳本測試了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是顯示當前視圖的幀頻數的。100輛F1的幀數有26,速度還行,稍有卡滯。

            4. Conclusion

            根據上述Tcl腳本可以看出OpenCASCADE的網格及可視化的性能還可以??梢孕薷纳鲜龃a,來測試顯示10000個球體所需要的時間。

            最后給出上述Tcl測試用的模型數據及Tcl腳本完整代碼供下載使用。

            PDF Version and Tcl Script: OpenCASCADE Performance Test

            怡红院日本一道日本久久| 久久无码国产专区精品| 久久精品国产亚洲av麻豆蜜芽 | 色综合久久久久| 色欲综合久久中文字幕网| 久久天天婷婷五月俺也去| 久久久久久久国产免费看| 久久香蕉综合色一综合色88| 久久综合精品国产二区无码| 97精品国产97久久久久久免费 | 亚洲乱码精品久久久久..| 久久精品国产亚洲av麻豆图片| 国产精品99久久久精品无码 | 狠狠色综合网站久久久久久久高清| 久久久久久A亚洲欧洲AV冫| 久久久久这里只有精品 | 久久无码人妻一区二区三区| 亚洲va中文字幕无码久久不卡| 一本一本久久A久久综合精品| 亚洲国产精品久久电影欧美| 久久综合久久自在自线精品自 | 久久91亚洲人成电影网站| AV无码久久久久不卡蜜桃 | 亚洲国产成人久久综合区| 无码国内精品久久人妻麻豆按摩| 2020久久精品国产免费| 久久精品国产亚洲AV久| 人妻无码αv中文字幕久久琪琪布| 久久精品国产清高在天天线| 久久久久亚洲av无码专区喷水 | 国内精品久久久人妻中文字幕| 国产精品久久久久国产A级| 女人香蕉久久**毛片精品| 久久97久久97精品免视看秋霞| 久久无码精品一区二区三区| 亚洲午夜无码久久久久| 亚洲国产成人久久精品动漫| 久久精品免费全国观看国产| 国产一区二区精品久久| 久久乐国产综合亚洲精品| 久久99久久99精品免视看动漫|