{'fraction_non_alphanumeric': 0.02568351284175642, 'fraction_numerical': 0.0, 'mean_word_length': 4.921568627450981, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Efficient Geometric Algorithm for Clipping and Capping Solid Triangle Meshes

Clipping three-dimensional geometry by arbitrarily oriented planes is a common operation in computer graphics and visualization applications. In most cases, the geometry used in those applications is provided as surface models consisting of triangles which are called meshes. Clipping such surface models by a plane cuts them open, destroying the illusion of a solid object. Often this is not desirable, and the resulting mesh should again be a closed surface model, e.g., when generating cross-sections in technical visualization applications. We propose an algorithm which performs the clipping operation geometrically for a given input mesh on the GPU. The intersection edges of the mesh and the clipping plane are then transferred to the CPU, where a cap geometry closing the mesh is computed and eventually added to the clipped mesh. Our algorithm can process solid (i.e., closed two-manifold) triangle meshes, or sets of non-intersecting solids, and has a worst-case runtime of O(N +n logn) where N is the number of triangles in the input geometry, and n is the number of input triangles intersecting the clipping plane.