Rendering method and rendering apparatus

By working in concert with the central processing unit and the graphics processing unit, efficient collision detection and rendering of the mouse in path editing software is achieved, solving the problem of inconvenient operation in the existing technology and improving the user's operating experience.

WO2026085806A1PCT designated stage Publication Date: 2026-04-30DELTA ELECTRONICS INC(CN)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
DELTA ELECTRONICS INC(CN)
Filing Date
2024-10-24
Publication Date
2026-04-30

AI Technical Summary

Technical Problem

In existing technologies, mice cannot effectively perform collision detection and display tooltips on geometric line segments in path editing software, resulting in inconvenience for users.

Method used

The central processing unit (CPU) interprets the drawing file to generate geometric units and vertex data, the graphics processing unit (GPU) performs mouse collision detection and rendering, and the shader displays tooltips to achieve collision determination between mouse coordinates and vertices and display of corresponding line segments.

Benefits of technology

It improves the ease of mouse operation in path editing software, reduces the burden on the central processing unit through fast and efficient collision detection and rendering, and achieves intuitive tooltip display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024126973_30042026_PF_FP_ABST
    Figure CN2024126973_30042026_PF_FP_ABST
Patent Text Reader

Abstract

A rendering method and a rendering apparatus. The rendering method comprises the following steps: receiving a diagram file; interpreting the diagram file to generate a plurality of geometric units and, on the basis of the geometric units, generating a plurality of vertices and a plurality of pieces of entity data; on the basis of the vertices, a graphics processing unit generating a multi-layer picture that contains a plurality of geometric graphics, and executing mouse collision detection between mouse coordinates and the vertices; on the basis of a result of the mouse collision detection, determining that the mouse coordinates contact at least one of the plurality of vertices and, on the basis of the at least one of the plurality of vertices and at least one of the plurality of pieces of entity data corresponding to the at least one of the plurality of vertices, determining a corresponding line segment; and, on the basis of the corresponding line segment, displaying a prompt display effect in the picture. FIG. 2
Need to check novelty before this filing date? Find Prior Art

Description

Rendering methods and rendering devices Technical Field

[0001] This invention relates to a rendering method and a rendering apparatus. Specifically, this invention relates to a rendering method and a rendering apparatus for mouse collision detection. Background Technology

[0002] In existing technologies, a central processing unit (CPU) can interpret various circuit diagrams using path editing software, storing the geometric information in the circuit diagrams as multiple entities. Based on layers, these multiple geometric information items are aggregated into entity packages, and then multiple vertices from multiple geometric line segments are extracted using a discrete method. Based on these multiple vertices, the graphics processing unit (GPU) renderer can render these multiple geometric line segments and generate an image.

[0003] Path editing software allows users to edit the screen. Generally, when a user is editing, a mouse cursor will appear on the screen based on the user's actions. If the mouse cursor moves over or touches a specific geometric line segment, highlighting that line segment on the screen—for example, by using a yellow marker, a dashed line, or a bold marker—it will make it easier for users to use the path editing software.

[0004] Summary of the Invention

[0005] One object of the present invention is to provide a rendering method. This rendering method includes the following steps: receiving a drawing file; interpreting the drawing file to generate multiple geometric units, and generating multiple point vertexes and multiple object data based on the multiple geometric units; generating a screen containing multiple layers of geometric shapes by a graphics processor based on the multiple vertices; performing mouse collision detection between mouse coordinates and the multiple vertices by the graphics processor; determining, based on the result of the mouse collision detection, that the mouse coordinates have touched at least one of the multiple vertices, and determining the corresponding line segment based on at least one of the multiple vertices and at least one of the multiple object data corresponding to the at least one of the multiple vertices; and displaying a prompt effect on the screen based on the corresponding line segment by the graphics processor.

[0006] Another object of the present invention is to provide a rendering apparatus. This rendering apparatus includes a central processing unit (CPU) and a graphics processing unit (GPU). The CPU receives a drawing file, decodes the drawing file to generate multiple geometric units, and generates multiple vertices and multiple object data based on the multiple geometric units. The GPU is coupled to the CPU and generates a screen containing multiple layers of geometric shapes based on the multiple vertices, and performs mouse collision detection between mouse coordinates and the multiple vertices. The CPU further determines, based on the result of the mouse collision detection, that the mouse coordinates have collided with at least one of the multiple vertices, and determines the corresponding line segment based on at least one of the multiple vertices and at least one of the multiple object data corresponding to the at least one of the multiple vertices. The GPU further displays a tooltip on the screen based on the corresponding line segment.

[0007] The following detailed description of the technology and embodiments of the present invention, in conjunction with the accompanying drawings, enables those skilled in the art to understand the technical features of the claimed invention. Attached Figure Description

[0008] Figure 1 is a schematic diagram of a rendering apparatus according to some embodiments of the present invention;

[0009] Figure 2 shows a flowchart of a rendering method according to some embodiments of the present invention;

[0010] Figure 3 is a schematic diagram of a screen shown according to some embodiments of the present invention;

[0011] Figure 4 is a partial schematic diagram of a screen shown according to some embodiments of the present invention;

[0012] Figure 5 is a schematic diagram of vertex information according to some embodiments of the present invention; and

[0013] Figure 6 shows a schematic diagram of a graphics processor according to some embodiments of the present invention.

[0014] The reference numerals in the attached figures are explained as follows: 100: Rendering device; 110: Central processing unit; 130: Graphics processor; 132: Buffer; 134: Vertex shader; 136: Geometry shader; 150: Memory; 200: Rendering method; S210, S220, S230, S240, S250, S260: Steps; 300: Screen; c1, c2, r1, r2: Geometry; Arc1: Object; T: Processing path; M: Mouse coordinates; E: Viewpoint; L: Ray; s1, s2, s3, s4: Line segments; v1, v2, v3, v4, v5, v6, v7, v8: Vertex; 500: Vertex information; X, Y, Z: Position information; R, G, B: Color information; D: Touch information. Detailed Implementation

[0015] The following will explain a rendering method and apparatus provided by the present invention through embodiments. However, these embodiments are not intended to limit the implementation of the invention to any environment, application, or manner described in these embodiments. Therefore, the description of the embodiments is for illustrative purposes only and is not intended to limit the scope of the invention. It should be understood that in the following embodiments and drawings, elements not directly related to the present invention have been omitted and are not shown, and the dimensions of each element and the dimensional ratios between elements are merely illustrative and are not intended to limit the scope of the invention.

[0016] Please refer to Figure 1. Figure 1 is a schematic diagram of a rendering apparatus 100 according to some embodiments of the present invention. As shown in Figure 1, the rendering apparatus 100 includes a central processing unit 110, a graphics processing unit 130, and a memory 150. In terms of connectivity, the central processing unit 110 and the graphics processing unit 130 are coupled together, and the central processing unit 110 and the graphics processing unit 130 are respectively coupled to the memory 150. In addition, the graphics processing unit 130 includes a buffer 132.

[0017] It should be noted that the embodiments shown in Figure 1 are used as examples only, and the implementation methods disclosed herein are not limited thereto.

[0018] Please refer to Figure 2. To better understand the present invention, the detailed steps of the rendering apparatus 100 will be discussed in conjunction with the embodiments shown in Figure 2. Figure 2 is a flowchart of a rendering method 200 according to some embodiments of the present invention. It should be noted that the rendering method 200 can be applied to electronic devices with the same or similar structure as the rendering apparatus 100 shown in Figure 1. To simplify the following description, the rendering method 200 of some embodiments of the present disclosure will be described using the embodiment shown in Figure 1 as an example. However, the present disclosure is not limited to the embodiment shown in Figure 1. As shown in Figure 2, the rendering method 200 includes steps S210 to S260.

[0019] In step S210, the central processing unit 110 receives the drawing file, decodes it to generate multiple geometric units, and generates multiple vertices and multiple object data based on these geometric units. In some embodiments, the drawing file received and decoded by the central processing unit 110 may include various formats, including Gerber files, NC DRILL files, DXF files, etc. In some embodiments, after decoding the drawing file, the central processing unit 110 obtains multiple geometric units, or object units, based on the drawing file. In some embodiments, the geometric units include geometric information such as lines, arcs, and points.

[0020] In some embodiments, the central processing unit 110 assembles geometric units into entity packages and then generates multiple point vertices through discrete operations.

[0021] In some embodiments, the central processing unit 110 generates multiple object data sets. In some embodiments, each object data set includes information such as graphics type, graphics index, entity vertex index, number of entity vertices, control point start index, and number of control points. Embodiments involving multiple object data sets will be described below with reference to Figures 3 and 4.

[0022] Please refer to Figure 2. In step S220, the graphics processor 130 generates a screen containing multiple layers of geometric shapes based on multiple vertices.

[0023] Please refer to Figure 3. Figure 3 is a schematic diagram of a screen 300 according to some embodiments of the present invention. As shown in Figure 3, the screen 300 contains multiple geometric shapes, which are composed of different layers. For example, geometric shapes c1, c2, r1, r2, etc. The screen 300 shown in Figure 3 is generated by the graphics processor 130 based on multiple vertices for rendering.

[0024] Please refer to Figure 4. Figure 4 is a partial schematic diagram of screen 300 in Figure 3, showing some embodiments of the present invention. The portion of screen 300 shown in Figure 4 can be exemplified as a part of the geometric figure c1 in Figure 3. As shown in Figure 4, a portion of the geometric figure c1 includes multiple line segments s1, s2, s3, and s4. The two ends of line segment s1 are vertices v1 and v2, the two ends of line segment s2 are vertices v3 and v4, the two ends of line segment s3 are vertices v5 and v6, and the two ends of line segment s4 are vertices v7 and v8. In some embodiments, vertices v2 and v3 overlap, vertices v4 and v5 overlap, and vertices v7 and v8 overlap.

[0025] In some embodiments, when generating vertices, the central processing unit 110 generates vertex information for each vertex simultaneously. Please refer to Figure 5. Figure 5 is a schematic diagram of vertex information 500 according to some embodiments of the present invention. As shown in Figure 5, vertex information 500 includes 7 fields. Among them, three fields X, Y, and Z constitute the position information or coordinate information of the vertex, three fields R, G, and B constitute the color information of the vertex, and field D is the touch information of the vertex. Each vertex contains corresponding vertex information.

[0026] Table 1 below is an example of object data corresponding to part of circle c1 (i.e., Arc1) as shown in Figure 4.

[0027] Table 1

[0028] It should be noted that Table 1 above contains only the object data for one arc (Arc number 1) of circle c1 in Figure 3. Similarly, the other parts of circle c1 in Figure 3 also contain corresponding object data, and the geometric figures in Figure 3 also contain corresponding object data.

[0029] In some embodiments, the central processing unit 110 is further used to transmit multiple vertices and multiple vertex information to the buffer 132 of the graphics processor 130. For example, the central processing unit 110 transmits and stores vertices v1 to v8 in FIG4 and multiple vertex information corresponding to vertices v1 to v8 in the buffer 132 of the graphics processor 130.

[0030] In some embodiments, when generating the screen 300 shown in FIG. 3, the graphics processor 130 enables the shaders to generate the screen 300. Please also refer to FIG. 6. FIG. 6 is a schematic diagram of the graphics processor 130 according to some embodiments of the present invention. As shown in FIG. 6, the graphics processor 130 also includes a vertex shader 134 and a geometry shader 136. In terms of connectivity, a buffer 132 is coupled to the vertex shader 134, the vertex shader 134 is coupled to the geometry shader 136, and the geometry shader 136 is coupled to the buffer 132. In some embodiments, the graphics processor 130 enables the vertex shader 134 and the geometry shader 136 to perform rendering based on the vertices and vertex information stored in the buffer 132 to generate the screen 300.

[0031] Please refer back to Figure 2. In step S230, the graphics processor 130 performs mouse collision detection between the mouse coordinates and multiple vertices. In some embodiments, mouse collision detection is performed by the geometry shader 136.

[0032] Please refer to Figure 4. In some embodiments, the geometry shader 136 calculates the distance between the ray L between the mouse coordinates M and the viewpoint E and each of the plurality of line segments s1 to s4. In some embodiments, the geometry shader 136 fills the calculated distance into the touch information fields of the vertex information at both ends of the line segments, wherein the vertex information is stored in the buffer 132. That is, as the mouse moves, the geometry shader 136 calculates the distance between the ray L and each of the plurality of line segments s1 to s4, and updates the touch information fields of the vertex information of vertices v1 to v8 stored in the buffer 132 according to the calculated distance, so as to adjust the touch information of the vertex information of vertices v1 to v8. In some embodiments, the viewpoint E is a virtual viewpoint.

[0033] For example, after calculating the distance between ray L and line segment s3, geometry shader 136 updates the calculated distance to the touch information fields of the vertex information of vertices v5 and v6 at both ends of line segment s3.

[0034] Please refer back to Figure 2. In step S240, the central processing unit 110 determines, based on the results of mouse collision detection, that the mouse coordinates have touched at least one of the multiple vertices.

[0035] In some embodiments, the central processing unit 110 periodically reads touch information from the vertex information in the buffer 132 and determines whether a vertex has been collided based on the touch information. In some embodiments, after the central processing unit 110 reads the touch information from the vertex information in the buffer 132, if the distance in the touch information is less than a distance threshold, the vertex corresponding to this touch information is determined to be a collided vertex. On the other hand, if the distances in the touch information are all not less than the distance threshold, it is determined that no vertex has been collided.

[0036] For example, when the distance value in the touch information of vertex v5 and the distance value in the touch information of v6 are less than the distance threshold, that is, when the distance between ray L and line segment s3 is less than the distance threshold, the central processing unit 110 determines that the mouse coordinate M touches the line segment s3 and the vertices v5 and v6 at both ends of the line segment s3, or that the mouse coordinate M is closest to the line segment s3 and the vertices v5 and v6 at both ends of the line segment s3 in the screen.

[0037] In step S250, the central processing unit 110 determines the corresponding line segment based on at least one of the multiple vertices and at least one of the multiple object data corresponding to the multiple vertices.

[0038] In some embodiments, in step S250, the central processing unit 110 searches for the corresponding object in multiple object data based on the collided vertex. For example, in step S272, the central processing unit 110 determines that vertices v5 and v6 in Figure 4 have been touched, and in step S273, the central processing unit 110 searches for the corresponding object in the object data based on vertices v5 and v6.

[0039] For example, in the object data shown in Table 1, object Arc1 contains vertices v1 to v8. Therefore, based on the object data shown in Table 1, the central processing unit 110 can determine that the touched vertices v5 and v6 correspond to object Arc1.

[0040] In some embodiments, based on object data, the central processing unit 110 obtains line segments s1 to s4 corresponding to object Arc1. That is, the central processing unit 110 obtains the line segments contained in object Arc1.

[0041] In step S260, the graphics processor 130 displays a prompt on the screen based on the corresponding line segment. In some embodiments, in step S250, after the central processing unit 110 determines the corresponding line segment, the central processing unit 110 updates multiple vertices and their vertex information.

[0042] Please refer to Figures 4 and 5 together. In some embodiments, the central processing unit 110 adjusts the values ​​of color information R, G, and B in the vertex information of vertices v1 to v8. After updating the vertex information, the central processing unit 110 transmits the updated vertices and vertex information to the buffer 132 of the graphics processor 130.

[0043] In some embodiments, when updating vertex information, the central processing unit 110 resets all touch information in the vertex information to 0 or a preset value.

[0044] In some embodiments, in step S260, the graphics processor 130 performs rendering again to generate a screen based on the updated multiple vertices and their vertex information stored in the buffer 132. When generating the screen, based on the vertex information, the line segments s1 to s4 between vertices v1 to v8 are rendered according to the updated color information R, G, B (e.g., rendered in yellow) to produce a prompt display effect.

[0045] In addition to generating prompts for objects based on geometric shapes after interpreting the drawing file, similarly, the processing paths between vertices generated by the user's editing on the screen (such as the processing path T shown in Figure 4) can also generate prompts through the rendering method 200 shown in Figure 2.

[0046] In some embodiments, the central processing unit 110 may be implemented by one or more processing circuits, such as a central processing circuit and / or a microprocessor circuit, but the embodiments disclosed herein are not limited thereto. In some embodiments, the memory 150 may be dynamic random access memory (DRAM) or static random access memory (SRAM). The memory 150 may include one or more non-transitory computer-readable storage media. The non-transitory computer-readable storage media may be read-only memory (ROM), flash memory, disk drive, hard disk, optical disk, USB flash drive, portable drive, magnetic tape, database accessible from a network, and / or any storage media with the same functionality that can be conceived by one of ordinary skill in the art to which this disclosure pertains. The non-transitory computer-readable storage media may be read by the central processing unit 110 and the graphics processor 130 to perform the rendering method 200 shown in FIG2.

[0047] In summary, the rendering method and apparatus provided by this invention perform collision detection on a large number of layers and line segments through transform feedback. Specifically, after the central processing unit (CPU) transmits vertices and vertex information to the graphics processing unit's (GPU) buffer, the GPU performs collision detection calculations and then stores the calculated data in the buffer for the CPU to read. This method is faster than performing collision detection calculations by the CPU itself and reduces the CPU's workload.

[0048] It should be noted that, unless otherwise specified, there is no specific order in the steps of the rendering method 200 described above. Furthermore, the steps can be executed simultaneously, or their execution times can at least partially overlap.

[0049] Furthermore, according to the various embodiments disclosed herein, steps of the rendering method 200 may be appropriately added, replaced, and / or eliminated.

[0050] This document has described various functional modules, components, or blocks. As those skilled in the art will understand, modules or functional blocks will preferably be implemented by circuitry (whether dedicated or general-purpose, operating under the control of one or more processing circuits and coded instructions), which typically includes transistors or other circuit elements configured to control the circuitry according to the functions and procedures described herein.

[0051] The above embodiments are merely illustrative of some implementations of the present invention and to explain the technical features of the present invention, and are not intended to limit the scope and range of protection of the present invention. Any changes or equivalent arrangements that can be easily made by those skilled in the art to which this invention pertains are within the scope of the present invention, and the scope of protection of the present invention is determined by the scope of the claims.

Claims

1. A rendering method, comprising: Receive drawing files; The drawing file is interpreted to generate multiple geometric units, and multiple vertices and multiple object data are generated based on the multiple geometric units; The graphics processor generates a multi-layered image containing multiple geometric shapes based on the multiple vertices; The graphics processor performs mouse collision detection between the mouse coordinates and the plurality of vertices. Based on the result of the mouse collision detection, it is determined that the mouse coordinates touch at least one of the plurality of vertices, and based on the at least one of the plurality of vertices and at least one of the plurality of object data corresponding to the at least one of the plurality of vertices, a corresponding line segment is determined; as well as The graphics processor displays the prompt effect on the screen based on the corresponding line segments.

2. The rendering method according to claim 1, wherein the mouse collision detection performed by the graphics processor comprises: The graphics processor calculates multiple distances between the ray connecting the mouse coordinates and the viewpoint and multiple line segments between the plurality of vertices; and When the central processing unit determines that the mouse coordinates touch at least one of the plurality of vertices when the first distance among the plurality of distances is less than a distance threshold, wherein the at least one of the plurality of vertices includes the two endpoints of the first line segment among the plurality of line segments corresponding to the first distance.

3. The rendering method according to claim 1, further comprising: The plurality of vertices and their vertex information are transmitted to the buffer of the graphics processor.

4. The rendering method according to claim 3, wherein at least one of the plurality of vertices includes a first vertex and a second vertex among the plurality of vertices, and wherein the rendering method further comprises: The graphics processor adjusts the touch value in the first vertex information of the first vertex and the touch value in the second vertex information of the second vertex, so that the central processing unit can determine whether the mouse coordinates touch the first vertex and the second vertex based on the touch value in the first vertex information and the touch value in the second vertex information.

5. The rendering method according to claim 4, wherein the first object data in the plurality of object data includes a first object and a plurality of first object vertices included in the first object, wherein the rendering method further includes: When it is determined that the plurality of first object vertices include the first vertex and the second vertex, the corresponding line segment is determined based on the first object.

6. A rendering apparatus, comprising: A central processing unit is used to receive a drawing file, interpret the drawing file to generate multiple geometric units, and generate multiple vertices and multiple object data based on the multiple geometric units; A graphics processor, coupled to the central processing unit, is used to generate a screen containing multiple layers of multiple geometric shapes based on the multiple vertices, and to perform mouse collision detection between mouse coordinates and the multiple vertices; The central processing unit is further configured to determine, based on the result of the mouse collision detection, that the mouse coordinates have touched at least one of the plurality of vertices, and to determine a corresponding line segment based on the at least one of the plurality of vertices and at least one of the plurality of object data corresponding to the at least one of the plurality of vertices; The graphics processor is also used to display prompts on the screen based on the corresponding line segments.

7. The rendering apparatus of claim 6, wherein the graphics processor is further configured to calculate a plurality of distances between a ray between the mouse coordinates and the viewpoint and a plurality of line segments between the plurality of vertices, and when a first distance among the plurality of distances is less than a distance threshold, the central processing unit determines that the mouse coordinates touch at least one of the plurality of vertices, wherein the at least one of the plurality of vertices includes the two endpoints of a first line segment among the plurality of line segments corresponding to the first distance.

8. The rendering apparatus of claim 6, wherein the central processing unit is further configured to transmit the plurality of vertices and vertex information of the plurality of vertices to a buffer of the graphics processor.

9. The rendering apparatus of claim 8, wherein the at least one of the plurality of vertices includes a first vertex and a second vertex, wherein the graphics processor is further configured to adjust the touch value in the first vertex information of the first vertex and the touch value in the second vertex information of the second vertex, so that the central processing unit determines, based on the touch value in the first vertex information and the touch value in the second vertex information, that the mouse coordinates touch the first vertex and the second vertex.

10. The rendering apparatus according to claim 9, wherein the first object data in the plurality of object data includes a first object and a plurality of first object vertices included in the first object, wherein when the central processing unit determines that the plurality of first object vertices include the first vertex and the second vertex, the central processing unit generates the corresponding line segment based on the first object.