无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

使用OpenCASACDE庫實(shí)現(xiàn)HyperMesh中的toggle edge功能

2023-04-21 18:30 作者:NagahashiKout  | 我要投稿

概述

在HyperMesh的幾何清理模塊中,Quick Edit面板下的toggle edge功能非常強(qiáng)大,在HyperMesh幫助文檔中的解釋如下:

Use the lines selector to select line(s).

  • Left-click a free edge (red) to make it shared (green), or a shared edge to make it suppressed (blue).

  • Right-click a suppressed edge to make it shared, or a shared edge to make it free.

In either case, the edge must meet the criteria for the type of edge you wish to change it to. For example, toggling a free edge to a shared edge requires the presence of a similar edge within the distance you specify in the tolerance field.

其主要作用就是在容差參數(shù)的控制下,實(shí)現(xiàn)free edge、shared edge?和?suppressed edge之間的正向或逆向轉(zhuǎn)換,邏輯非常清晰、易懂。其中shared edge還分為共享邊和T型邊,這里不做討論。

  • OpenCASCADE版本:OpenCASCADE-7.4.0-vc14-64

  • Visual Studio版本:Visual Studio Community 2017

  • HyperMesh版本:Altair HyperWorks Version 2020


1. HyperMesh中的toggle edge功能


OpenCASCADE中的free edge和shared edge

從free edge和shared edge的定義可知,free edge只和一個(gè)面相關(guān),而shared edge則由兩個(gè)面共享。因此在OpenCASCADE中我們只需要知道這個(gè)edge和幾個(gè)面相關(guān)就可以對(duì)它進(jìn)行判斷。示例代碼如下:

2. OpenCASCADE中的free edge


shared edge 到?free edge的轉(zhuǎn)換

想要實(shí)現(xiàn)從shared edge 到?free edge的轉(zhuǎn)換可以借助OpenCASACDE中的BRepBuilderAPI_Copy 和?BRepTools_ReShape 兩個(gè)類,主要思路是復(fù)制這個(gè)shared edge,并使用這個(gè)復(fù)制出來的edge去替代與這個(gè)shared edge相關(guān)的兩個(gè)surface其中之一的對(duì)應(yīng)的edge,這樣這個(gè)原來的shared edge就變成了兩個(gè)free edge。代碼如下:

這里的關(guān)鍵點(diǎn)在于使用復(fù)制出來的edge去替換時(shí)應(yīng)該只應(yīng)用于其中一個(gè)Face,把得到的新的Face再次進(jìn)行替換之后再應(yīng)用到整個(gè)模型。


從free?edge 到?shared edge的轉(zhuǎn)換

把兩個(gè) free?edge 轉(zhuǎn)換為 shared edge,即把兩個(gè)有重合edge的TopoDS_Face通過某種方式轉(zhuǎn)化為TopoDS_Shell,在OpenCASCADE中已經(jīng)提供了這樣的類:BRepBuilderAPI_Sewing,使用方法如下:


3. OpenCASCADE中的shared edge


總結(jié)

借助BRepBuilderAPI_Copy 和?BRepTools_ReShape我們可以實(shí)現(xiàn)從shared edge 到?free edge的轉(zhuǎn)換,而使用BRepBuilderAPI_Sewing可以使兩個(gè)?free?edge 轉(zhuǎn)換為?shared edge。對(duì) suppress 和 unsuppress 兩個(gè)功能的實(shí)現(xiàn)還需要進(jìn)一步探究。


參考

  1. https://dev.opencascade.org/content/sewing-faces-keep-track-sewed-faces

  2. https://dev.opencascade.org/content/local-sewing-opencascade


使用OpenCASACDE庫實(shí)現(xiàn)HyperMesh中的toggle edge功能的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國家法律
化州市| 宁河县| 当阳市| 安吉县| 长垣县| 隆回县| 周宁县| 晋江市| 金寨县| 青岛市| 抚松县| 阳高县| 多伦县| 焉耆| 甘谷县| 临洮县| 沂源县| 上高县| 新余市| 页游| 揭东县| 洪泽县| 榆中县| 崇阳县| 绥中县| 镇巴县| 鹰潭市| 宜宾市| 远安县| 南溪县| 丁青县| 梅河口市| 大英县| 辽阳市| 稻城县| 南和县| 慈利县| 耒阳市| 阿图什市| 清流县| 和龙市|