Search for a command to run...
This paper discusses the development and implementation of tools for interactive hiding of the half-space of a modeled area for design systems. The relevance of this research comes from the need for effective analysis of the internal structures of complex 3D models at the pre-processing stage. The C++ programming language is chosen as the tool to implement the interactive occlusion algorithm, integrated with the VTK and OpenGL visualization libraries, as well as the GLSL shader language. The paper describes in detail the mathematical model and implementation of an interactive 3D widget that allows the user to control the position and orientation of the cutting plane in real time using affine transformations (translation, rotation, scaling). The study pays particular attention to the implementation of algorithms for two types of data. An approach based on vertex and fragment shaders has been developed for geometric models: the position of vertices relative to the plane equation is calculated, elements are clipped, and only those above the plane are discarded, then interpolation is performed on the primitive, and the use of a stencil buffer ensures correct “coloring” of the cross-section to preserve the illusion of a solid object. A topological filtering algorithm is implemented for mesh models that physically cuts off cells and rearranges elements intersected by the plane. The developed functionality is of high practical importance, as it is designed to speed up the model preparation process. Testing results on a number of models demonstrate the high speed of the algorithm, the correctness of the display of cross-sections, the efficient use of resources for its task, and high scalability. The practical significance of the work lies in the integration of the developed interactive occlusion tools into specialized software, which allows engineers to significantly speed up the model preparation process, effectively identify geometric collisions, and set boundary conditions on both surface and internal elements.