Chamfering processing method and device, computer equipment and storage medium
By separately chamfering the hollow figures and outline figures of the to-processed figures in the layout design, the problem of chamfer abnormalities at the graphic connections is solved and the design efficiency is improved.
Patent Information
- Application Number
- CN202510084551.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-13
AI Technical Summary
In layout design, chamfer abnormalities are prone to the connection between the closed hollow figures and the entire figure outline, including errors in chamfer direction and unnecessary chamfers, which require manual modification and troublesome operation.
By obtaining the hollow figure and outline figure of the to-processed figure, chamfer the hollow figure and outline figure respectively, obtain the target hollow figure and the target outline figure, and then determine the target figure after the chamfering is based on these target figures.
It avoids chamfer abnormalities at the connection between hollow figures and outline figures, improves the efficiency of layout design, and reduces the need for manual modification.
Smart Images

Figure CN119989695A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of layout design technology, and in particular to a chamfering method, device, computer equipment and storage medium. Background Art
[0002] Chamfering refers to processing the edges and corners of a workpiece, such as creating a bevel of a specified angle or processing the edges and corners into an arc shape. In layout design, chamfering graphics is a common way of processing graphics. However, if there is a closed hollow graphic inside the graphic, after the graphic is chamfered, the chamfer abnormality will appear at the connection between the hollow graphic and the entire graphic outline, including the wrong chamfer direction and the appearance of redundant chamfers. The layout designer needs to manually modify the abnormal chamfer, which is troublesome. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a chamfering method, device, computer equipment and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a chamfering method is provided, the method comprising:
[0005] Acquire a hole pattern of a to-be-processed pattern, wherein the hole pattern is a pattern formed by a closed area inside the to-be-processed pattern;
[0006] Based on the hole graph and the to-be-processed graph, determining a contour graph of the to-be-processed graph, wherein the contour graph is a graph formed by the outer contour of the to-be-processed graph;
[0007] Performing chamfering processing on the cavity figure to obtain a target cavity figure, and performing chamfering processing on the contour figure to obtain a target contour figure;
[0008] Based on the target cavity figure and the target contour figure, a target figure after chamfering is determined.
[0009] In an exemplary embodiment, determining the contour graphic of the graphic to be processed based on the hole graphic and the graphic to be processed includes:
[0010] The hole graphics in the graphics to be processed are filled to obtain the contour graphics.
[0011] In an exemplary embodiment, determining the target graphic after chamfering based on the target cavity graphic and the target contour graphic includes:
[0012] The target hole pattern is eliminated from the target contour pattern to obtain the target pattern.
[0013] In an exemplary embodiment, removing the target hole graphic from the target contour graphic to obtain the target graphic includes:
[0014] Determining the position information of the target hole pattern in the target contour pattern based on the position information of the hole pattern in the pattern to be processed;
[0015] Based on the position information of the target hole pattern in the target contour pattern, the target hole pattern is eliminated from the target contour pattern to obtain the target pattern.
[0016] In an exemplary embodiment, the step of obtaining a hole graphic of a graphic to be processed includes:
[0017] The to-be-processed graphic is processed based on a preset algorithm to obtain the hole graphic, wherein the preset algorithm is used to identify a graphic formed by a closed area inside an input graphic.
[0018] In an exemplary embodiment, determining the contour graphic of the graphic to be processed based on the hole graphic and the graphic to be processed includes:
[0019] If it is determined that the to-be-processed graphic includes the hole graphic, determining the contour graphic based on the hole graphic and the to-be-processed graphic;
[0020] If it is determined that the to-be-processed graphic does not include the hole graphic, chamfering is performed on the to-be-processed graphic to obtain a target graphic after the chamfering.
[0021] In an exemplary embodiment, the chamfering the hole pattern to obtain a target hole pattern includes:
[0022] If the hollow figure has corners, chamfer the hollow figure to obtain the target hollow figure;
[0023] If the hole pattern has no edges or corners, the hole pattern is used as the target hole pattern.
[0024] According to a second aspect of an embodiment of the present disclosure, a chamfering processing device is provided, the device comprising:
[0025] An acquisition module is configured to acquire a hole pattern of a to-be-processed pattern, wherein the hole pattern is a pattern formed by a closed area inside the to-be-processed pattern;
[0026] A first determining module is configured to determine a contour figure of the figure to be processed based on the hole figure and the figure to be processed, wherein the contour figure is a figure formed by an outer contour of the figure to be processed;
[0027] A processing module is configured to perform chamfering on the hole pattern to obtain a target hole pattern, and to perform chamfering on the contour pattern to obtain a target contour pattern;
[0028] The second determining module is configured to determine a target shape after chamfering based on the target cavity shape and the target contour shape.
[0029] In an exemplary embodiment, the first determining module is further configured to:
[0030] The hole graphics in the graphics to be processed are filled to obtain the contour graphics.
[0031] In an exemplary embodiment, the second determining module is further configured to:
[0032] The target hole pattern is eliminated from the target contour pattern to obtain the target pattern.
[0033] In an exemplary embodiment, the second determining module is further configured to:
[0034] Determining the position information of the target hole pattern in the target contour pattern based on the position information of the hole pattern in the pattern to be processed;
[0035] Based on the position information of the target hole pattern in the target contour pattern, the target hole pattern is eliminated from the target contour pattern to obtain the target pattern.
[0036] In an exemplary embodiment, the acquisition module is further configured to:
[0037] The to-be-processed graphic is processed based on a preset algorithm to obtain the hole graphic, wherein the preset algorithm is used to identify a graphic formed by a closed area inside an input graphic.
[0038] In an exemplary embodiment, the first determining module is further configured to:
[0039] If it is determined that the to-be-processed graphic includes the hole graphic, determining the contour graphic based on the hole graphic and the to-be-processed graphic;
[0040] If it is determined that the to-be-processed graphic does not include the hole graphic, chamfering is performed on the to-be-processed graphic to obtain a target graphic after the chamfering.
[0041] In an exemplary embodiment, the processing module is further configured to:
[0042] If the hollow figure has corners, chamfer the hollow figure to obtain the target hollow figure;
[0043] If the hole pattern has no edges or corners, the hole pattern is used as the target hole pattern.
[0044] According to a third aspect of an embodiment of the present disclosure, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0045] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect is implemented.
[0046] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: respectively obtaining a hole graphic composed of an internal closed area and a contour graphic composed of an external contour in the graphics to be processed, and respectively performing chamfering processing on the hole graphic and the contour graphic to obtain a target hole graphic and a target contour graphic, and then determining the target graphic after chamfering based on the target hole graphic and the target contour graphic. This method can avoid the problem of abnormal chamfering at the connection between the hole graphic and the contour graphic by performing separate chamfering processing on the hole graphic and the contour graphic, thereby improving the efficiency of layout design.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] Figure 1 is a schematic diagram of a graphic after chamfering according to an exemplary embodiment;
[0050] Figure 2 is a flow chart of a chamfering processing method according to an exemplary embodiment;
[0051] Figure 3 is a schematic diagram showing a to-be-processed graphic, a hole graphic and a contour graphic according to an exemplary embodiment;
[0052] Figure 4 is a schematic diagram of a target hole graph, a target outline graph, and a target graph according to an exemplary embodiment;
[0053] Figure 5 is a flow chart of a chamfering processing method according to an exemplary embodiment;
[0054] Figure 6 is a block diagram of a chamfering processing device according to an exemplary embodiment;
[0055] Figure 7 It is a block diagram of a computer device according to an exemplary embodiment.
[0056] In the figure:
[0057] 100 - computer device; 101 - computing unit; 102 - ROM; 103 - RAM; 104 - bus; 105 - input / output interface; 106 - input unit; 107 - output unit; 108 - storage unit; 109 - communication unit. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0059] In some embodiments, Figure 1 is a schematic diagram of a chamfered graphic according to an exemplary embodiment. Figure 1 As shown, there is a closed hollow figure inside the figure, and there is a connecting line between the hollow figure and the outline of the entire figure. When the figure is chamfered, the figure on the left represents the actual chamfered figure, and the figure on the right represents the expected chamfered figure. It can be seen that at the position circled in the white circle in the left figure, one end of the connecting line has the wrong chamfer direction, and the other end of the connecting line has extra chamfering, resulting in abnormal chamfering of the figure after chamfering.
[0060] In an exemplary embodiment of the present disclosure, in order to overcome the problem of abnormal chamfers in the related art, a chamfer processing method is provided, including: obtaining a hole graphic of a to-be-processed graphic, the hole graphic being a graphic composed of a closed area inside the to-be-processed graphic; determining a contour graphic of the to-be-processed graphic based on the hole graphic and the to-be-processed graphic, the contour graphic being a graphic composed of the outer contour of the to-be-processed graphic; performing chamfer processing on the hole graphic to obtain a target hole graphic, and performing chamfer processing on the contour graphic to obtain a target contour graphic; determining the target graphic after chamfer processing based on the target hole graphic and the target contour graphic. This method can avoid the problem of abnormal chamfers at the connection between the hole graphic and the contour graphic by performing separate chamfer processing on the hole graphic and the contour graphic, thereby improving the efficiency of layout design.
[0061] In an exemplary embodiment of the present disclosure, a chamfering method is provided. Figure 2 is a flow chart of a chamfering method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0062] Step S201, obtaining a hole pattern of a to-be-processed pattern, where the hole pattern is a pattern formed by a closed area inside the to-be-processed pattern.
[0063] The figure to be processed is a figure formed by connecting the position points of multiple positions, and the hollow figure is a figure composed of the closed area inside the figure to be processed, that is, a closed figure composed of connecting lines. The number of hollow figures in the figure to be processed is determined according to the actual situation, and the size, specific shape and relative position of each hollow figure in the figure to be processed are not limited. Obtaining the hollow figure of the figure to be processed means separating the hollow figure from the figure to be processed. In some embodiments, all the position points constituting the hollow figure are separated and connected to obtain the hollow figure.
[0064] Step S202: determining the contour graphic of the graphic to be processed based on the hole graphic and the graphic to be processed, where the contour graphic is a graphic formed by the outer contour of the graphic to be processed.
[0065] The contour graph is a graph formed by the outer contour of the graph to be processed, that is, a graph formed by the outer contour line. After the hole graph is separated from the graph to be processed, the remaining graph is the contour graph. In some embodiments, after all the position points constituting the hole graph are separated, the remaining position points are connected to obtain the contour graph. It should be noted that there may or may not be an intersection between the hole graph and the contour graph.
[0066] In one example, Figure 3 is a schematic diagram of a to-be-processed graphic, a hole graphic, and a contour graphic according to an exemplary embodiment. Figure 3 As shown, the image on the left is the figure to be processed. It can be seen that there are three quadrilaterals composed of three closed areas inside it, that is, three hole figures. All the hole figures are separated from the figure to be processed, and the three hole figures in the middle image are obtained. After separating the hole figures from the figure to be processed, the remaining contour figure of the figure to be processed in the right image is obtained.
[0067] Step S203, chamfering the hole pattern to obtain a target hole pattern, and chamfering the contour pattern to obtain a target contour pattern.
[0068] Chamfering refers to processing the edges and corners of a graphic. It can be C chamfering, that is, creating a slope of a specified angle at the edges and corners, or it can be R chamfering, that is, processing the edges and corners into an arc shape. In some embodiments, a preset number of position points at the edges and corners are deleted, and the lines are reconnected to obtain chamfers. In some embodiments, the graphics are chamfered by the chamfering command in the layout design tool. The hole graphics and the contour graphics are chamfered respectively to obtain a target hole graphics after the hole graphics are chamfered, and a target contour graphics after the contour graphics are chamfered. In some embodiments, the hole graphics are used as the input graphics for the layout design, and the hole graphics are chamfered by the chamfering command to obtain the target hole graphics, and then the contour graphics are used as the input graphics for the layout design, and the contour graphics are chamfered by the chamfering command to obtain the target contour graphics.
[0069] Step S204, determining a target shape after chamfering based on the target cavity shape and the target contour shape.
[0070] The target hole pattern and the target contour pattern are combined, and the relative positions of the target hole pattern and the target contour pattern and the relative positions of the hole pattern and the contour pattern are kept consistent, so as to obtain the target pattern after the chamfering of the pattern to be processed. In some embodiments, the position point of each position in the target hole pattern and the position point of each position in the target contour pattern are integrated together, and then all the integrated position points are connected to obtain the target pattern after the chamfering.
[0071] In one example, taking C chamfering as an example, Figure 4 is a schematic diagram of a target hole graph, a target outline graph and a target graph according to an exemplary embodiment. Figure 4 As shown, the left image is a Figure 3 The target hole image is obtained by chamfering the hole image in the intermediate image. The intermediate image is Figure 3 The target contour figure is obtained by chamfering the contour figure in the right image, and the target hole figure in the left image and the target contour figure in the middle image are spliced to obtain the target figure in the right image.
[0072] In an exemplary embodiment of the present disclosure, a hole graphic composed of an internal closed area and a contour graphic composed of an external contour in a to-be-processed graphic are obtained respectively, and chamfering is performed on the hole graphic and the contour graphic respectively to obtain a target hole graphic and a target contour graphic, and then based on the target hole graphic and the target contour graphic, a target graphic after chamfering is determined. This method can avoid the problem of abnormal chamfering at the connection between the hole graphic and the contour graphic by chamfering the hole graphic and the contour graphic separately, thereby improving the efficiency of layout design.
[0073] In an exemplary embodiment of the present disclosure, a chamfering method is provided. Figure 5 is a flow chart of a chamfering method according to an exemplary embodiment. Figure 5 As shown, the following steps are included:
[0074] Step S501, processing the graphics to be processed based on a preset algorithm to obtain a hole graphic, wherein the preset algorithm is used to identify a graphic composed of a closed area inside the input graphic.
[0075] The preset algorithm is called by calling the preset program interface. The preset algorithm is used to identify the graphics formed by the closed area inside the input graphics. The image to be processed is input into the algorithm, and a hollow graphic is output. The hollow graphic can be output directly, or all the position points that constitute the hollow graphic can be output, and then all the position points are connected to obtain the hollow graphic.
[0076] Step S502, determining whether the graphics to be processed include a hole graphics.
[0077] If it is determined that the graphics to be processed include a hole graphics, steps S503 to S505 are executed; if it is determined that the graphics to be processed do not include a hole graphics, step S506 is executed.
[0078] It is determined whether the graphics to be processed include a hole graphic through the output of a preset algorithm. If the output is empty or other indication information indicating that the graphics to be processed do not include a hole graphic is output, it is determined that the graphics to be processed do not include a hole graphic; if the output is not empty, it is determined that the graphics to be processed include a hole graphic.
[0079] Step S503, filling the empty graphics in the graphics to be processed to obtain the outline graphics.
[0080] Filling the hole graphics in the graphics to be processed means merging the area constituting the graphics to be processed and the area constituting the hole graphics. In some embodiments, an OR operation is performed on the hole graphics and the graphics to be processed to obtain a contour graphic. For example, the hole graphics and the graphics to be processed are input into a layout design tool, and the two are processed through the OR operation to obtain a contour graphic.
[0081] Step S504, chamfering the hole pattern to obtain a target hole pattern, and chamfering the contour pattern to obtain a target contour pattern.
[0082] The specific implementation of step S504 refers to step S203 and will not be described in detail here.
[0083] Step S505, eliminating the target hole graphics in the target outline graphics to obtain the target graphics.
[0084] Eliminating the target hole graphic in the target contour graphic means hollowing out the area constituting the target hole graphic in the target contour graphic. In some embodiments, a non-operation is performed on the target hole graphic and the target contour graphic to obtain the target graphic. For example, the target hole graphic and the target contour graphic are input into a layout design tool, and the two are processed by the non-operation therein to obtain the target graphic.
[0085] In some embodiments, removing a target hole pattern from a target contour pattern to obtain a target pattern comprises the following steps:
[0086] Based on the position information of the hole pattern in the to-be-processed pattern, determining the position information of the target hole pattern in the target contour pattern;
[0087] Based on the position information of the target hollow figure in the target contour figure, the target hollow figure is eliminated from the target contour figure to obtain the target figure.
[0088] When obtaining a hole graphic from a to-be-processed graphic, the position information of the hole graphic in the to-be-processed graphic is obtained at the same time, and the position information is used as the position information of the target hole graphic in the target contour graphic. Based on the position information, the target hole graphic is eliminated in the target contour graphic, which can ensure that the hole position in the obtained target graphic is the same as the hole position in the to-be-processed graphic. In one example, a coordinate system is established with the center point of the to-be-processed graphic as the origin, and the coordinates of multiple key points in the hole graphic are determined. A coordinate system is also established with the center point of the target contour graphic as the origin, and the coordinates of multiple key points in the hole graphic are used as the coordinates of corresponding key points in the target hole graphic to determine the position of the entire target hole graphic, and the target hole graphic is eliminated at the corresponding position to obtain the target graphic.
[0089] Step S506, chamfering the graphics to be processed to obtain a target graphics after chamfering.
[0090] Since there is no void in the graphics to be processed, there will be no abnormal chamfering problem, so the graphics to be processed are directly chamfered to obtain the target graphics after chamfering. In some implementations, the graphics to be processed are used as input graphics for layout design, and chamfering instructions are used to perform chamfering on the graphics to be processed to obtain the target graphics.
[0091] In some embodiments, the step S203 or step S504 in the above embodiment performs chamfering on the hole pattern to obtain the target hole pattern, further comprising the following steps:
[0092] If the hollow figure has corners, the hollow figure is chamfered to obtain the target hollow figure;
[0093] If the hollow figure does not have corners, the hollow figure is used as the target hollow figure.
[0094] By calling a preset corner recognition algorithm to identify the corners of the hole pattern, it is determined whether the hole pattern has corners. If the hole pattern does not have corners, there is no need to perform chamfering. In this case, the hole pattern is directly used as the target hole pattern; if the hole pattern has corners, the hole pattern is chamfered to obtain the target hole pattern. This embodiment can save chamfering processing time to a certain extent and improve layout design efficiency.
[0095] In an exemplary embodiment of the present disclosure, a chamfering processing device is provided. Figure 6 is a block diagram of a chamfering processing device according to an exemplary embodiment. Figure 6 As shown, the chamfering processing device includes:
[0096] The acquisition module 601 is configured to acquire a hole pattern of the to-be-processed pattern, where the hole pattern is a pattern formed by a closed area inside the to-be-processed pattern;
[0097] The first determining module 602 is configured to determine the contour graph of the to-be-processed graph based on the hole graph and the to-be-processed graph, where the contour graph is a graph formed by the outer contour of the to-be-processed graph;
[0098] The processing module 603 is configured to perform chamfering on the hole pattern to obtain a target hole pattern, and perform chamfering on the contour pattern to obtain a target contour pattern;
[0099] The second determination module 604 is configured to determine the target shape after chamfering based on the target cavity shape and the target contour shape.
[0100] In an exemplary embodiment, the first determining module 602 is further configured to:
[0101] Fill the empty graphics in the graphics to be processed to obtain the contour graphics.
[0102] In an exemplary embodiment, the second determining module 604 is further configured to:
[0103] Eliminate the target hole graphics in the target contour graphics to obtain the target graphics.
[0104] In an exemplary embodiment, the second determining module 604 is further configured to:
[0105] Based on the position information of the hole pattern in the to-be-processed pattern, determining the position information of the target hole pattern in the target contour pattern;
[0106] Based on the position information of the target hollow figure in the target contour figure, the target hollow figure is eliminated from the target contour figure to obtain the target figure.
[0107] In an exemplary embodiment, the acquisition module 601 is further configured to:
[0108] The image to be processed is processed based on a preset algorithm to obtain a hollow image, wherein the preset algorithm is used to identify an image formed by a closed area inside the input image.
[0109] In an exemplary embodiment, the first determining module 602 is further configured to:
[0110] If it is determined that the graphics to be processed include a hole graphics, a contour graphics is determined based on the hole graphics and the graphics to be processed;
[0111] If it is determined that the graphics to be processed do not include a hollow graphics, a chamfering process is performed on the graphics to be processed to obtain a target graphics after the chamfering process.
[0112] In an exemplary embodiment, the processing module 603 is further configured to:
[0113] If the hollow figure has corners, the hollow figure is chamfered to obtain the target hollow figure;
[0114] If the hollow figure does not have corners, the hollow figure is used as the target hollow figure.
[0115] Each module in the above-mentioned chamfering processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0116] In an exemplary embodiment, a computer device is provided, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, any of the above-mentioned chamfering processing methods is implemented.
[0117] In an exemplary embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any of the above-mentioned chamfering processing methods is implemented. The computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0118] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any of the above-mentioned chamfering processing methods is implemented.
[0119] refer to Figure 7, a block diagram of a computer device that can be used as the camera 2 or terminal 1 of the present disclosure will now be described, and the computer device includes a computing unit 101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 102 or a computer program loaded from a storage unit 108 to a random access memory (RAM) 103. In the RAM 103, various programs and data required for the operation of the computer device 100 can also be stored. The computing unit 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.
[0120] A plurality of components in the computer device 100 are connected to the I / O interface 105, including: an input unit 106, an output unit 107, a storage unit 108, and a communication unit 109. The input unit 106 may be any type of device capable of inputting information to the computer device 100, the input unit 106 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the computer device 100, and may include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 107 may be any type of device capable of presenting information, and may include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 108 may include but is not limited to a disk, an optical disk. The communication unit 109 allows the computer device 100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0121] The computing unit 101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 101 performs the various methods and processes described above, such as the chamfering processing method. For example, in some embodiments, the chamfering processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 108. In some embodiments, part or all of the computer program may be loaded and / or installed on the computer device 100 via the ROM 102 and / or the communication unit 109. When the computer program is loaded into the RAM 103 and executed by the computing unit 101, one or more steps of the chamfering processing method described above may be performed. Alternatively, in other embodiments, the computing unit 101 may be configured to perform the chamfering processing method in any other appropriate manner (e.g., by means of firmware).
[0122] The computer device 100 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned chamfering processing method.
[0123] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0124] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A chamfering method, characterized in that: The method comprises: Acquire a hole pattern of a to-be-processed pattern, wherein the hole pattern is a pattern formed by a closed area inside the to-be-processed pattern; Based on the hole graph and the to-be-processed graph, determining a contour graph of the to-be-processed graph, wherein the contour graph is a graph formed by the outer contour of the to-be-processed graph; Performing chamfering processing on the cavity figure to obtain a target cavity figure, and performing chamfering processing on the contour figure to obtain a target contour figure; Based on the target cavity figure and the target contour figure, a target figure after chamfering is determined.
2. The method according to claim 1, characterized in that The step of determining the contour graph of the to-be-processed graph based on the hole graph and the to-be-processed graph comprises: The hole graphics in the graphics to be processed are filled to obtain the contour graphics.
3. The method according to claim 1, characterized in that The step of determining the target graphic after chamfering based on the target hole graphic and the target contour graphic comprises: The target hole pattern is eliminated from the target contour pattern to obtain the target pattern.
4. The method according to claim 3, characterized in that The step of removing the target hole graphic from the target contour graphic to obtain the target graphic comprises: Determining the position information of the target hole pattern in the target contour pattern based on the position information of the hole pattern in the pattern to be processed; Based on the position information of the target hole pattern in the target contour pattern, the target hole pattern is eliminated from the target contour pattern to obtain the target pattern.
5. The method according to claim 1, characterized in that The step of obtaining a hole graphic of a graphic to be processed includes: The to-be-processed graphic is processed based on a preset algorithm to obtain the hole graphic, wherein the preset algorithm is used to identify a graphic formed by a closed area inside an input graphic.
6. The method according to claim 1, characterized in that The step of determining the contour graph of the to-be-processed graph based on the hole graph and the to-be-processed graph comprises: If it is determined that the to-be-processed graphic includes the hole graphic, determining the contour graphic based on the hole graphic and the to-be-processed graphic; If it is determined that the to-be-processed graphic does not include the hollow graphic, chamfering is performed on the to-be-processed graphic to obtain a target graphic after the chamfering.
7. The method according to claim 1, characterized in that The chamfering of the hollow figure to obtain a target hollow figure includes: If the hollow figure has corners, chamfer the hollow figure to obtain the target hollow figure; If the hole pattern has no edges or corners, the hole pattern is used as the target hole pattern.
8. A chamfering device, characterized in that: The device comprises: An acquisition module is configured to acquire a hole pattern of a to-be-processed pattern, wherein the hole pattern is a pattern formed by a closed area inside the to-be-processed pattern; A first determining module is configured to determine a contour figure of the figure to be processed based on the hole figure and the figure to be processed, wherein the contour figure is a figure formed by an outer contour of the figure to be processed; A processing module is configured to perform chamfering on the hole pattern to obtain a target hole pattern, and to perform chamfering on the contour pattern to obtain a target contour pattern; The second determining module is configured to determine a target shape after chamfering based on the target cavity shape and the target contour shape.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.