当前位置:网站首页>A Preliminary Study on Netgen Volume Meshing and Display of CAD Based on OSG+OCC
A Preliminary Study on Netgen Volume Meshing and Display of CAD Based on OSG+OCC
2022-08-06 20:32:00 【Xiaoxiang FIT】
When I was integrating netgen before, the division option was surface mesh division, and there was no volume mesh division option. Recently, the company has not been very busy. I read Netgen's C++ API, so I added body mesh to my system.For mesh division and surface mesh division options, see the mesh type tab under Netgen parameter settings in the screenshot.
Nengen's core API for volume meshing is: Ng_GenerateVolumeMesh interface, followed by the interface for reading mesh data: Ng_GetNE to get the number of units, Ng_GetVolumeElement to get the specific unit coordinate label, and Ng_GetPoint to get the specific coordinates according to the label, which can be directly exchanged later.Just render it, the core code is extracted as follows:
ng_res = Ng_GenerateVolumeMesh(occ_mesh, &mp);//Volume meshing
int net = nglib::Ng_GetNE(occ_mesh);//Get the number of volume mesh elements
nglib::Ng_GetVolumeElement(occ_mesh, i, p);//Get the three coordinate subscript values of the i-th unit
nglib::Ng_GetPoint(occ_mesh, p[0], pt);//Get the coordinate position of the first subscript
where p is: int p[3] = { 0.0 }; pt is: double pt[3] = { 0.0 };
The effect of rendering with OSG is as follows:
Figure 1. Stp model display

Where: the blue solids show the face mesh effect, and the black lines show the volume mesh effect.
边栏推荐
- Pytest学习-读取YAML文件
- SMW0 SAP upload template
- playbook中template、tags、roles操作示例
- y89.第五章 分布式链路追踪系统 -- 部署skywalking和skywalking案例(三)
- 什么是业财一体化?
- Redis 的网络框架是实现了 Reactor 模型吗?
- 为什么Video Speed Manager 和 Video Speed Controller 的chrome插件对有些B站视频不能调速
- CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) F
- 什么是鸟撞?该如何设计防鸟撞的建筑?#可持续设计
- Hudi(1.0、2.0)简介
猜你喜欢
随机推荐
UNet语义分割网络
代码随想录笔记_动态规划_474一和零
电商巨头困境反转,阿里和亚马逊的殊途同归
Eye Tracking translations for Everyone
R语言ggplot2可视化:使用ggpubr包的ggpie函数可视化饼图(pie chart)、为饼图不同区域添加标签、palette参数自定义不同区域的填充色
Pytest learning - yaml + parametrize use
STM32MP157A驱动开发 | 02-使用sdmmc接口读写sd卡(热插拔)
云GPU如何安装和启动VNC远程桌面服务?
R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的方差
多线程-静态代理
Pytest学习-YAML
【23考研】408代码题参考模板——二叉树
C语言详解系列——操作符详解
【目标检测】数据增强:YOLO官方数据增强实现/imgaug的简单使用
iQOO Neo6评测:产品力稳步升级 同价位不错的选择
如何运营外贸独立站
distributed theory
跨境新风向——海外众筹
解决Google AdSense导致网站加载慢的优化方法
Kotlin - 协程构建器 CoroutineBuilder









