• ISSN: 1674-7461
  • CN: 11-5823/TU
  • 主管:中国科学技术协会
  • 主办:中国图学学会
  • 承办:中国建筑科学研究院有限公司

基于QT和OSG的计算机辅助设计显示平台研发

Research and Development of Computer-aided Platform Based on QT and OSG

  • 摘要: 针对大型CAD模型可视化中几何精确性、渲染效率与场景适配性的协同难题,本文提出一种基于Qt、Open CASCADE(OCC)与Open Scene Graph(OSG)深度集成的架构。该架构采用分层解耦设计,Qt负责UI交互与图形环境管理,OCC处理边界表示(B-Rep)建模与精确网格化,OSG专注实时渲染与相机控制,通过OsgQOpenGLWidget和OsgRenderer实现低耦合通信。本文研究了双引擎协作机制,OCC生成的三角网格经自定义函数转换为OSG格式,并结合正交投影与毫米级相机控制确保尺寸对应,通过几何体合并等策略优化性能。同时,系统构建多维度扩展框架,支持交互工具、建模算法与渲染特效的灵活定制。案例测试表明,该架构在大量构件场景中可保持较高帧率,兼顾工程级精度与实时交互需求,适用于建筑、机械等多样化CAD场景,有效解决了大型模型可视化中的核心矛盾。

     

    Abstract: To address the collaborative challenges of geometric accuracy, rendering efficiency, and scene adaptability in large-scale CAD model visualization, this paper proposes an architecture deeply integrating Qt, Open CASCADE (OCC), and Open Scene Graph (OSG). The architecture adopts a layered and decoupled design: Qt manages UI interaction and graphics environment, OCC handles Boundary Representation (B-Rep) modeling and precise meshing, while OSG focuses on real-time rendering and camera control, with low-coupling communication achieved through OsgQOpenGLWidget and OsgRenderer. In this paper, the two-engine collaboration mechanism is studied. The triangular mesh generated by OCC is converted into OSG format by custom functions. Combined with orthogonal projection and millimeter-level camera control to ensure size correspondence, the performance is optimized by strategies such as geometry merging. Additionally, the system constructs a multi-dimensional extension framework, supporting flexible customization of interaction tools, modeling algorithms, and rendering effects. Case tests show that the architecture maintains a high frame rate in scenarios with a large number of components. It balances engineering-level accuracy and real-time interaction requirements, applicable to diverse CAD scenarios such as architecture and machinery, effectively resolving the core contradictions in large-scale model visualization.

     

/

返回文章
返回