C#ATIA

↑タイトル詐欺 主にFusion360API 偶にCATIA V5 VBA(絶賛ネタ切れ中)

スケッチのスピードテスト2

こちらの続きです。
スケッチのスピードテスト - C#ATIA

先日のUpdateで、以前の最後の方に記載した
「”点の表示” をOFFにすることで速度向上することがわかっておりAPIで操作出来ないか?」
が実装されました。 それのテストです。

今回は自宅の非力なPCでのテストの為、前回の速度と一概には比較できない為
test1と2を再テスト。

test1-time:19.54s
test1-time:20.17s
test1-time:20.33s
test1-time:21.97s
test1-time:20.73s

test2-time:1.59s
test2-time:1.55s
test2-time:1.48s
test2-time:1.43s
test2-time:1.41s

性能的に半分以下です・・・。


点の表示OFFは、arePointsShownプロパティです。

#test7 arePointsShown
def test7(root,lst):
    skt = root.sketches.add(root.xYConstructionPlane)
    skt.arePointsShown = False
    
    [initBox(skt,a1,a2) for (a1,a2) in lst]
       
    skt.arePointsShown = True

    f = inspect.currentframe()
    return inspect.getframeinfo(f)[2]

結果はこちら。

test7-time:20.49s
test7-time:18.14s
test7-time:17.78s
test7-time:18.03s
test7-time:18.97s

全然ダメじゃないか! と思ったのですが、よく考えたら
スケッチの点を全く作成しなかった為、効果があるわけありませんね。


APIのHelpがまた落ちている。あれしか頼れるもの無いから
勘弁して欲しい。