当前位置:网站首页>初探基于OSG+OCC的CAD之任意多个子模型进行netgen以及gmsh网格划分
初探基于OSG+OCC的CAD之任意多个子模型进行netgen以及gmsh网格划分
2022-07-27 12:48:00 【潇湘散客】
此功能是对之前的网格交互操作的扩充,并无实时性的创新,此次修改是根据用于选中任意的模型树节点,通过找到该节点的所有shape后,对这些shape进行网格划分。修改实现了任意节点的隐藏、显示、高亮、消隐功能以及任意节点的网格划分功能。以网格划分为例:
核心思想是对查找到的所有的shape合并为一个新的shape,核心代码如下:
TopoDS_Shape QFormDoc::makeOneShape(Handle(TopTools_HSequenceOfShape) theShapes)
{
TopoDS_Shape res;
Standard_Integer nb = theShapes->Length();
if (nb == 0)
return res;
else if (nb == 1)
return theShapes->Value(1);
else
{
TopoDS_Compound C;
BRep_Builder B;
B.MakeCompound(C);
for (Standard_Integer i = 1; i <= nb; i++)
{
B.Add(C, theShapes->Value(i));
}
return C;
}
}
其他接口不需要变化,直接把新的shape传给netgen或者gmsh就行了,显示这些也是一样的,直接来先看下效果:

边栏推荐
- C语言犄角旮旯的知识之数组与函数
- Feign的整体流程
- Why do you need foreign keys?
- Sff1004-mhchxm diode sff1004
- Detail the construction methods, attributes and common methods in reflection
- Connotative quotations
- Xshell7 can log in to MySQL virtual machine, but not mysql
- 聊聊feign组件的一个重要类RefectiveFeign
- Specify the add method of HashSet
- Plus SBOM: assembly line BOM pbom
猜你喜欢

概述有名内部类与匿名内部类

SparkSubmit.main()方法提交外部参数,远程提交standalone集群任务

Getting started for beginners: build your own blog with WordPress

分布式系统架构理论与组件

Overview of famous inner classes and anonymous inner classes

Interviewer: how to deal with the data loss of redis master-slave cluster switching?

B站713故障后的多活容灾建设|TakinTalks大咖分享
![[cute new solution] Fibonacci sequence](/img/2d/64cdc8b7625ee7a81275ad25dc2b7a.png)
[cute new solution] Fibonacci sequence

How can the top 500 enterprises improve their R & D efficiency? Let's see what industry experts say!

Set interface
随机推荐
粘制定位
Summary of common methods of ArrayList
Time tool class, get the current time, date to string
Why does the class annotated with @configuration generate cglib proxy?
BSP视频教程第21期:轻松一键实现串口DMA不定长收发,支持裸机和RTOS,含MDK和IAR两种玩法,比STM32CubeMX还方便(2022-07-24)
Multi activity disaster recovery construction after 713 failure of station B | takintalks share
Laboratory procedures and references of chloramphenicol acetate
Baoli food listed on Shanghai Stock Exchange: annual revenue of 1.578 billion, market value of 5.8 billion
Error: slf4j: class path contains multiple slf4j bindings
Firefox 103 发布,更快、更安全
「游戏引擎 浅入浅出」4.1 Unity Shader和OpenGL Shader
计算字符串最后一个单词的长度,单词以空格隔开。
SSM实战项目-前后分离(简单易懂)
【萌新解题】斐波那契数列
18. Text processing tool -grep
高度塌陷和BFC
SQL statement problem, calculate the data with a difference of less than 10 minutes to be displayed as the same batch of data
CEPH distributed storage performance tuning (6)
clearfix的作用
Poj1273 drainage ditches [maximum flow] [SAP]