Method, device and equipment for adjusting positions of screen printing layer elements in PCB design and computer readable storage medium

By automatically judging and adjusting the positional relationship of silkscreen layer elements and using the target minimum bounding rectangle to determine the movement path, the problem of low efficiency and large error in adjusting the position of silkscreen layer elements in PCB design is solved, achieving more efficient and accurate position adjustment.

CN121543535APending Publication Date: 2026-02-17LCFC HEFEI ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511998976.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing technologies, the adjustment of the position of silkscreen layer elements in PCB design is inefficient and prone to large errors, making it difficult to guarantee the accuracy of the position.

Method used

By obtaining the positional relationship between silkscreen layer elements and other elements, the movement path is determined using the target minimum bounding rectangle, and the positions are made non-overlapping through automatic adjustment and rotation, avoiding manual adjustment and inspection.

Benefits of technology

It improves the efficiency and accuracy of adjusting the position of silkscreen elements, shortens the PCB design and production cycle, and reduces human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543535A_ABST
    Figure CN121543535A_ABST
Patent Text Reader

Abstract

The invention provides a position adjusting method, device and equipment for screen printing layer elements in PCB design and a storage medium. The method comprises the steps that a first element set and a second element set are obtained from PCB design, first elements are silk-screen layer elements of which the positions are to be adjusted, and second elements are elements except the first elements in the silk-screen layer elements of the PCB design and bare copper layer elements in the PCB design; and judging the position relationship between the first element and the second element, responding to the position relationship, judging that the position relationship is overlapped, performing position adjustment on the first element so as to enable the position of the first element not to be overlapped with the position of any second element in the second element set, and adding the first element after position adjustment into the second element set. The method and the device are used for quickly adjusting the positions of screen printing layer elements in the PCB design and improving the accuracy of the position adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of circuit board design, and more particularly to a method, apparatus, device, and computer-readable storage medium for adjusting the position of silkscreen layer elements in PCB design. Background Technology

[0002] In the design process of Printed Circuit Boards (PCBs), when the placement of silkscreen elements does not conform to production specifications, the usual practice is to manually adjust the positions of each non-compliant silkscreen element individually in the PCB design software, and then manually check whether the adjusted silkscreen element positions conform to production specifications. Relying on manual adjustment and checking is inefficient and prone to significant errors, making it difficult to guarantee the accuracy of the silkscreen element positions. Therefore, improving the efficiency and accuracy of silkscreen element position adjustment is a key technical problem to be solved. Summary of the Invention

[0003] This application provides a method, apparatus, device, and storage medium for adjusting the position of silkscreen layer elements in PCB design, so as to at least solve the above-mentioned technical problems existing in the prior art.

[0004] According to a first aspect of this application, a method for adjusting the position of silkscreen layer elements in a PCB design is provided, comprising: obtaining a first element set and a second element set from the PCB design, wherein the first element is a silkscreen layer element to be adjusted in position, and the second element is an element other than the first element in the silkscreen layer of the PCB design and a bare copper layer element in the PCB design; determining the positional relationship between the first element and the second element, and in response to the determination that the positional relationship is overlapping, adjusting the position of the first element so that the position of the first element does not overlap with the position of any second element in the second element set, and adding the adjusted first element to the second element set.

[0005] In one possible implementation, adjusting the position of the first element includes: determining the component corresponding to the first element in the PCB design, and obtaining the target minimum bounding rectangle of the component; determining the movement path of the first element based on the target minimum bounding rectangle, the path including multiple positions; determining the positional relationship between the first element and the second element at the current position; if the positional relationship at the current position is determined to be non-overlapping, completing the position adjustment of the first element and adding the first element at the current position to the set of the second element; if the positional relationship at the current position is determined to be overlapping, rotating the first element at least once according to a first preset angle, and determining the positional relationship between the first element and the second element for each rotation of the first element; if the positional relationship at the current angle is determined to be non-overlapping, completing the position adjustment of the first element and adding the first element at the current position to the set of the second element; if the positional relationship at the current position is determined to be overlapping after each rotation, restoring the first element to the initial angle, moving the first element to the next position, and determining the positional relationship.

[0006] In one possible implementation, determining the movement path of the first element based on the target minimum bounding rectangle includes: obtaining the center point of the first element; determining the perpendicular distance between the center point and the straight lines containing each side of the target minimum bounding rectangle, and determining the shortest distance among the perpendicular distances; expanding each side of the target minimum bounding rectangle by the shortest distance to obtain a target bounding rectangle, such that the center point is placed on the edge of the target bounding rectangle; and setting multiple positions at intervals on the target bounding rectangle, starting from the center point of the first element, to form the movement path of the first element.

[0007] In one possible implementation, if the positional relationship between the first element and the second element is determined to be overlapping at each position on the movement path, the method further includes: restoring the first element to the starting position of the movement path, rotating the first element at least once at each position according to a second preset angle starting from the starting position, and determining the positional relationship between the first element and the second element for each rotation of the first element, wherein the second preset angle is less than the first preset angle.

[0008] In one possible implementation, if the positional relationship between the first element and the second element at each position on the movement path is determined to be overlapping, the method further includes: expanding each side of the target bounding rectangle by a preset length to determine a new movement path.

[0009] In one possible implementation, determining the positional relationship between the first element and the second element includes: obtaining a first minimum bounding rectangle of the first element and a second minimum bounding rectangle of the second element; dividing the area into multiple regions based on all the second minimum bounding rectangles of the second elements, each region containing at least one second minimum bounding rectangle; obtaining a third minimum bounding rectangle of each region; determining whether the first minimum bounding rectangle overlaps with any of the third minimum bounding rectangles; if overlapping, determining whether the first minimum bounding rectangle overlaps with any of the second minimum bounding rectangles contained within the third minimum bounding rectangle; if overlapping, determining whether the first minimum bounding rectangle overlaps with the first element and the second element corresponding to the overlapping second minimum bounding rectangles; if overlapping, determining that the positional relationship between the first element and the second element is overlapping.

[0010] According to a second aspect of this application, a device for adjusting the position of silkscreen layer elements in a PCB design is provided, comprising: an acquisition module, configured to acquire a first element set and a second element set from the PCB design, wherein the first element is a silkscreen layer element to be adjusted in position, and the second element is an element other than the first element in the silkscreen layer of the PCB design and a bare copper layer element in the PCB design; and a processing module, configured to determine the positional relationship between the first element and the second element, and in response to the determination that the positional relationship is overlapping, adjust the position of the first element so that the position of the first element does not overlap with the position of any second element in the second element set, and add the position-adjusted first element to the second element set.

[0011] In one embodiment, the processing module includes: a first determining module, configured to determine the component corresponding to the first element in the PCB design and obtain the target minimum bounding rectangle of the component; a second determining module, configured to determine the movement path of the first element based on the target minimum bounding rectangle, the path including multiple positions; and a judging module, configured to judge the positional relationship between the first element and the second element at the current position; if the positional relationship at the current position is determined to be non-overlapping, the position adjustment of the first element is completed, and the first element at the current position is added to the set of the second element; if the positional relationship at the current position is determined to be overlapping, the first element is rotated at least once according to a first preset angle, and for each rotation of the first element, the positional relationship between the first element and the second element is judged; if the positional relationship at the current angle is determined to be non-overlapping, the position adjustment of the first element is completed, and the first element at the current position is added to the set of the second element; if the positional relationship at the current position is determined to be overlapping after each rotation, the first element is restored to the initial angle, and the first element is moved to the next position for judging the positional relationship.

[0012] According to a third aspect of this application, an electronic device is provided, comprising: At least one processor; and a memory communicatively connected to said at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in this application.

[0013] According to a fourth aspect of this application, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this application.

[0014] This application discloses a method, apparatus, device, and computer-readable storage medium for adjusting the position of silkscreen layer elements in PCB design. It determines the positional relationship between the silkscreen layer element to be adjusted and a second element, and automatically adjusts the position of silkscreen layer elements overlapping with the second element based on this relationship. During the adjustment process, manual adjustment and checking of the positional relationship between the first and second elements are unnecessary, avoiding the errors associated with manually adjusting each silkscreen layer element individually and the errors inherent in manual adjustments and checks. This improves the efficiency and accuracy of silkscreen layer element position adjustment, effectively shortens the PCB design and production cycle, and increases production efficiency.

[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0016] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.

[0017] Figure 1 This illustration shows a schematic diagram of the implementation process for adjusting the position of silkscreen layer elements in the PCB design of an embodiment of this application; Figure 2 This illustration shows a schematic diagram of the implementation process of position adjustment in an embodiment of this application; Figure 3 This paper illustrates a schematic diagram of the implementation process for determining the movement path according to an embodiment of this application. Figure 4 This illustration shows a schematic diagram of the implementation process for determining positional relationships according to an embodiment of this application; Figure 5 A schematic diagram of the structure of the silkscreen layer element position adjustment device in the PCB design of this application embodiment is shown. Detailed Implementation

[0018] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] Figure 1 This application illustrates a flowchart of the implementation process for adjusting the position of silkscreen layer elements in an example PCB design. The method includes: Operation S101: Obtain a first set of elements and a second set of elements from the PCB design. The first element is the silkscreen layer element whose position needs to be adjusted, and the second element is the silkscreen layer element of the PCB design excluding the first element and the bare copper layer element of the PCB design.

[0020] In this embodiment, PCB design refers to the process of transforming an abstract circuit schematic into a physically producible PCB layout. By drawing conductive lines, vias, etc., the pins of components such as resistors, capacitors, and chips are physically connected according to the schematic logic, forming a complete current path to ensure the basic realization of circuit functions. It is a core link in electronic engineering connecting circuit theory and physical products, requiring consideration of factors such as electrical performance, manufacturing processes, and cost control, and relying on specialized design software. In PCB design, the PCB is typically divided into a multi-layer structure, with each layer storing corresponding element information. For example, the silkscreen layer stores non-electrical graphic and textual data, i.e., silkscreen elements, which include component identification silkscreen, product identification, polarity markings, auxiliary graphics, and layer information, which are subsequently printed on the solder mask surface to assist in production assembly, maintenance, and identification. Component identification silkscreen is usually bound to the corresponding component and follows the component layout by default, used for component identification. The etched layer stores information about the copper foil elements in the PCB. During PCB manufacturing, the entire board is first covered with copper foil, and then the pattern of the etched layer determines which copper needs to be retained, while the unwanted copper is etched away. The etched layer is the core electrical layer, directly defining the conductive network of the PCB and serving as the carrier of circuit functions. The copper foil elements stored during design are all the copper foils that need to be retained. The solder mask layer covers the etched layer and stores information about the areas on the PCB that are not covered by ink, i.e., the range of exposed copper foil. The solder mask layer uses negative output, meaning that the areas drawn in the design are not coated with ink in actual production, while the undrawn areas are covered with ink. If a circle is drawn on the solder mask layer, the corresponding copper foil element in the etched layer will be exposed at the corresponding position on the circuit board. This copper foil element is the bare copper layer element. The bare copper layer is the area of ​​exposed copper foil achieved by opening windows in the solder mask layer in the PCB design. The bare copper layer elements are the etched layer elements present in the solder mask layer opening areas. These include elements such as pads, traces, vias, and test points within the solder mask layer opening areas.

[0021] In this embodiment, the electronic device can first perform a preliminary analysis of the overlapping positions of silkscreen layer elements in the PCB design. For example, this analysis can be performed using the functions provided by PCB design software, and this application does not limit this. If a silkscreen layer element has overlapping positions, for example, overlapping with one or more other silkscreen layer elements, and / or overlapping with one or more bare copper layer elements, then the silkscreen layer element needs to be repositioned and is designated as the first element. Silkscreen layer elements without overlapping positions can be designated as the second element. For bare copper layer elements, regardless of whether they have overlapping positions, they are all designated as the second element.

[0022] The following are some examples of situations where silkscreen layer elements overlap: For silkscreen layer element A, after analysis, it is found that its position coincides with that of silkscreen layer element B, so silkscreen layer element A is taken as the first element; (correspondingly, when analyzing silkscreen layer element B, it is also taken as the first element). For silkscreen layer element C, after analysis, it coincides with the positions of silkscreen layer element D and bare copper layer element E respectively. Therefore, silkscreen layer element C is regarded as the first element (correspondingly, when analyzing silkscreen layer element D, it is also regarded as the first element). After analysis, it is found that the silkscreen layer element E coincides with the position of the bare copper layer element F. Therefore, silkscreen layer element D is taken as the first element.

[0023] After preliminary analysis, the first set of elements and the second set of elements can be obtained.

[0024] In operation S102, the positional relationship between the first element and the second element is determined. In response to the determination that the positional relationship is overlapping, the position of the first element is adjusted so that the position of the first element does not overlap with the position of any second element in the set of second elements. The first element with the adjusted position is then added to the set of second elements.

[0025] In this embodiment, the electronic device determines the positional relationship between the first element and the second element. If the position of the first element does not overlap with the position of the second element, it is added to the second element set as the second element. If the positions of the first element and at least one second element in the second element set overlap, the position of the first element is adjusted so that the adjusted first element does not overlap with the second element in the second element set, and the adjusted first element is added to the second element set.

[0026] In operation S101, although the first element has been initially determined to have overlapping positions, it is still necessary to determine the positional relationship between the first and second elements before making any position adjustments. This is because there may be cases where silkscreen layer elements are identified as the first element due to mutual overlap. Determining the positional relationship before making adjustments avoids unnecessary adjustments to the first element, improving the efficiency of the adjustment process. For example, during the initial analysis, silkscreen layer elements A and B are identified as the first element due to mutual overlap. First, the positional relationship between first element A and second element B is determined. Since first element A and second element B do not overlap, first element A can be directly added to the set of second elements to become second element A without any position adjustment. Then, the positional relationship between first element B and second element B is determined. Since first element B overlaps with second element A, the position of first element B is adjusted. In other words, not all first elements require position adjustments. By determining the positional relationship before adjusting the first element, the electronic device avoids unnecessary adjustments. Furthermore, two positional relationship judgments can improve the accuracy of the positional relationship judgment for the first element, avoiding unnecessary positional adjustments caused by misjudgments in the previous positional relationship.

[0027] In this embodiment, the electronic device adds the first element that has completed position adjustment to the second element set as the second element. This is used to determine the positional relationship before the first element is subsequently adjusted, so as to avoid the first element from overlapping with the first element that has previously completed position adjustment.

[0028] In this embodiment, the electronic device determines the positional relationship between the silkscreen layer element to be adjusted and the second element, and automatically adjusts the position of the silkscreen layer elements that overlap with the second element based on this relationship. During the adjustment process, manual adjustment and checking of the positional relationship between the first and second elements are unnecessary, avoiding the errors caused by manually adjusting each silkscreen layer element individually and by manual adjustments and checks. This improves the efficiency and accuracy of silkscreen layer element position adjustment, effectively shortens the PCB design and production cycle, and increases production efficiency.

[0029] The following is combined Figure 2 The process of adjusting the position of the first element is illustrated, including: In operation S201, determine the component corresponding to the first element in the PCB design and obtain the target minimum bounding rectangle of the component.

[0030] In this embodiment, the first element is a silkscreen layer element that corresponds one-to-one with the component. The first element is placed near the component to identify it. The first element typically has a starting position, which can be the position of the target minimum bounding rectangle adjacent to the corresponding component. The target minimum bounding rectangle is the physical boundary of the component. For example, the first element is placed adjacent to the upper right of the component, and the distance between the boundary of the first element and the physical boundary of the component is 0 mil.

[0031] In this embodiment, the starting position can also be a set position. Usually, according to different PCB manufacturing requirements, the distance between the boundary of the first element and the physical boundary of the component is set to a specific position that is the minimum distance between the two when placed on the PCB. For example, the first element is set at the upper right of the component, and the distance between the boundary of the first element and the physical boundary of the component is 2mil. In the manufacturing requirements of this PCB, the distance between the first element and the physical boundary of the component when placed on the PCB must not be less than 2mil.

[0032] Operation S202: Based on the target minimum bounding rectangle, determine the movement path of the first element, the path including multiple positions.

[0033] In this embodiment, the electronic device controls the first element to move around the component. Based on the physical boundary of the component, i.e. the target minimum bounding rectangle, the movement path of the first element is determined. The movement path consists of multiple possible positions of the first element when adjusting its position. The first element moves according to each position on the movement path until the most suitable position is found (i.e., the first element does not overlap with any of the second elements at this position).

[0034] Operation S203: Determine the positional relationship between the first element and the second element at the current position. If the positional relationship at the current position is determined to be non-overlapping, execute operation S205; if the positional relationship at the current position is determined to be overlapping, execute operation S204.

[0035] In this embodiment, the movement path includes multiple positions. The electronic device controls the first element to adjust its position according to the movement path. If the positions of the first element and the second element at the current position do not overlap, the position adjustment of the first element is completed and the first element is added to the set of the second element. If the first element and the second element at the current position overlap, the position adjustment of the first element continues.

[0036] Operation S204: Rotate the first element at least once according to the first preset angle. For the first element after each rotation, determine the positional relationship between the first element and the second element. If the positional relationship at the current angle is determined to be non-overlapping, execute operation S205; if the positional relationship at the current position is determined to be overlapping after each rotation, execute operation S206.

[0037] In this embodiment, adjusting the position of the first element at the current position by the electronic device may include rotating the first element at least once by a first preset angle. For example, the first preset angle is 90 degrees, and it is set that the element can be rotated three times at the current position. After rotating the first element by 90 degrees each time, the positional relationship between the first element and the second element is determined.

[0038] Operation S205 completes the position adjustment of the first element, adding the first element at the current position to the second element set.

[0039] In this embodiment, if the rotated first element and the second element do not overlap, the position adjustment of the first element is completed, and the electronic device adds the first element at the current position to the set of the second elements. For example, if the first preset angle is 90 degrees, and the current position can be rotated three times, after rotating the first element by 90 degrees, if the first element and the second element do not overlap, the position adjustment of the first element is completed, and the electronic device adds the first element at the current position to the set of the second elements.

[0040] In operation S206, after restoring the first element to its initial angle, the first element is moved to the next position to determine the positional relationship.

[0041] In this embodiment, if the position of the first element at the current position overlaps with the second element after each rotation, the electronic device restores the first element to its initial angle and moves it to the next position on the movement path to determine the positional relationship. For example, if the first preset angle is 90 degrees and the device is set to rotate three times from the current position, and the first element overlaps with the second element after rotation, the electronic device rotates the first element another 90 degrees and continues to determine the positional relationship between the first and second elements. If the first element at the current position is rotated 90 degrees three times and the positional relationship is determined to be overlapping, the first element is restored to its initial angle and moved to the next position on the movement path to determine the positional relationship.

[0042] In some cases, after an electronic device rotates the first element multiple times, the first element may become inverted. If the first element is in the form of a character, its boundary shape is usually irregular and asymmetrical. After inverting it, the boundary shape used to determine its positional relationship with the second element changes. Therefore, it is possible that the original first element and the second element overlap at their current positions, while the inverted first element and the second element do not overlap. For example, if the first element is R5, in its original position, the second element overlaps above the 5 in the first element. After rotating it 90 degrees twice, the first element R5 is inverted. The original position of the 5 is now the inverted R. The second element, which originally overlapped above the 5 in the first element, may not overlap above the inverted R.

[0043] When manually dragging silkscreen elements to adjust their position, errors may occur due to limitations in precision (not reaching small units of movement) or visual blur, causing the elements to not be dragged to their correct positions. This embodiment determines the movement path of the first element based on the smallest circumscribed rectangle of the component, enabling the first element to automatically move along this path and rotate at least once by a first preset angle. Thus, the electronic device automatically adjusts its position via a set path, eliminating the need for manual adjustment and visual verification. This improves the accuracy of the first element's position adjustment and allows for adjustments in small units, ensuring the first element is placed in as many locations as possible around the component.

[0044] The following is combined Figure 3 The process of determining the movement path of the first element is illustrated, including: Operation S301: Obtain the center point of the first element.

[0045] In this embodiment, the electronic device obtains the center point of the first element and adjusts the position of the first element by moving the center point of the first element.

[0046] Operation S302: Determine the perpendicular distance between the center point and the straight lines containing each side of the target minimum bounding rectangle, and determine the shortest distance among the perpendicular distances.

[0047] In this embodiment, the first element is placed near the component to identify it. The electronic device determines the side of the first element closest to the target minimum bounding rectangle by determining the shortest vertical distance among the straight lines containing the center point and each side of the target minimum bounding rectangle, and thus determines the position of the first element relative to the component.

[0048] Operation S303 involves expanding each side of the target minimum bounding rectangle by the shortest distance to obtain the target bounding rectangle, so that the center point is placed on the side of the target bounding rectangle.

[0049] In this embodiment, the electronic device expands the target minimum bounding rectangle by the shortest distance based on the position of the center point of the first element relative to the component, thus obtaining a target bounding rectangle. The center point is positioned on the corresponding side of the target bounding rectangle. For example, if the center point is closest to the left side of the target minimum bounding rectangle corresponding to the component, it will fall on the left side of the target bounding rectangle. The center point moves within the target bounding rectangle to adjust the position of the first element.

[0050] In operation S304, multiple positions are set at intervals on the outer rectangle of the target, starting from the center point of the first element, to form a movement path for the first element.

[0051] In this embodiment, the electronic device takes the center point of the first element as the starting position and sets multiple positions at intervals on the target outer rectangle to form a movement path for the first element. The center point moves based on the multiple positions on the movement path determined by the target outer rectangle to adjust the position of the first element.

[0052] In this embodiment, the electronic device obtains the center point of the first element and adjusts the position of the first element by moving the center point. The movement path of the first element is determined based on its center point and the minimum bounding rectangle of the target component. This ensures that the position of the first element is associated with the corresponding component, guaranteeing that the first element is always near the component. The position adjustment of the first element can be finely controlled by setting intervals. Adjusting the position of the first element based on the set path avoids errors caused by manual adjustment.

[0053] In an optional embodiment, if the positional relationship between the first element and the second element is determined to be overlapping at each position on the movement path, the method further includes: restoring the first element to the starting position of the movement path, rotating the first element at least once at each position according to a second preset angle starting from the starting position, and determining the positional relationship between the first element and the second element for each rotation of the first element, wherein the second preset angle is less than the first preset angle.

[0054] In this embodiment, if the positions of the first element and the second element cannot be guaranteed to be non-overlapping at any position on the movement path, the first element is reset to the starting position, and the electronic device readjusts the position of the first element on the movement path. This position adjustment uses a second preset angle for rotation, which is smaller than the first preset angle. For example, the first preset angle is 90 degrees, and the second preset angle is 30 degrees. It should be noted that the number of rotations based on the first preset angle and the second preset angle can be different. For example, when rotating based on the first preset angle of 90 degrees, it is set that the current position can be rotated three times; when rotating based on the second preset angle of 30 degrees, it is set that the current position can be rotated eleven times.

[0055] This embodiment refines the position adjustment of the first element by rotating it at a smaller angle, using a smaller angle to find the position of the first element that does not overlap with the position of the second element. The electronic device first uses a first preset angle for position adjustment to ensure that the silkscreen layer elements are placed more aesthetically in the PCB design and that there are not too many placement angles. Only when using the first preset angle, if it is still not possible to guarantee that the positions of the first element and the second element do not overlap on the movement path, will a second preset angle smaller than the first preset angle be used.

[0056] In an optional embodiment, if the positional relationship between the first element and the second element at each position on the movement path is determined to be overlapping, the method further includes: expanding each side of the target bounding rectangle by a preset length to determine a new movement path.

[0057] In this embodiment, the electronic device can expand each side of the target outer rectangle by a preset length to form a new movement path, allowing the first element to adjust its position based on the new movement path and find a position for the first element that does not overlap with the position of the second element. The electronic device can set the maximum number of times each side of the target outer rectangle can be expanded, or set the maximum possible expansion length, depending on the actual situation. When the number of expansions reaches the maximum possible number or the expansion reaches the set maximum possible expansion length, the expansion of the target outer rectangle stops. This avoids excessive expansion affecting other elements or exceeding the board outline elements in the PCB design while ensuring the readability of the silkscreen layer elements.

[0058] In this embodiment, the electronic device expands the movement path of the first element by extending each side of the target outer rectangle by a preset length. In this way, the position of the first element can be expanded to adjust its position, and the position of the first element that does not overlap with the position of the second element can be found in more positions. It can also ensure that the first element is always located near the corresponding component.

[0059] The following is combined Figure 4 The process of determining the positional relationship between the first element and the second element is illustrated, including: Operation S401: Obtain the first minimum bounding rectangle of the first element and the second minimum bounding rectangle of the second element.

[0060] In this embodiment, the electronic device obtains the minimum bounding rectangle of the first element and the second element. The position of the minimum bounding rectangle can be used to initially obtain the boundary position information of the first element and the second element, which can be used to determine the positional relationship between the first element and the second element in the subsequent process.

[0061] Operation S402: Based on the second minimum bounding rectangle of all the second elements, the region is divided to obtain multiple regions, each region containing at least one second minimum bounding rectangle.

[0062] In this embodiment, the electronic device divides the second minimum bounding rectangle of the second element according to its region, assigning adjacent second minimum bounding rectangles to the same region, with each region containing at least one second minimum bounding rectangle. This region division operation can be performed directly based on rules set for the second minimum bounding rectangles, or it can be automated using an algorithm. For example, an R-Tree can be used for automatic region division. The position information of all second minimum bounding rectangles is inserted into the R-Tree, which automatically assigns adjacent second minimum bounding rectangles to the same node, resulting in multiple nodes. Each node defines a minimum bounding rectangle representing the spatial range it encompasses, effectively dividing all second minimum bounding rectangles into regions. Based on the R-Tree, rapid indexing of spatial data can be achieved.

[0063] Electronic devices divide the scattered second elements on the PCB design page into multiple regions. Subsequently, by determining the positional relationship between the first element and these regions, potential second elements that might overlap with the first element can be initially filtered out. Therefore, electronic devices do not need to sequentially determine the positional relationship between the first element and every single second element to determine if they overlap. By focusing on the positional relationship between the first element and the regions, a large number of second elements that cannot possibly overlap with the first element can be quickly filtered out, significantly reducing computational load, improving the efficiency of positional relationship determination, and saving computing power.

[0064] In operation S403, obtain the third minimum bounding rectangle of each region, and determine whether the first minimum bounding rectangle overlaps with any of the third minimum bounding rectangles. If they overlap, execute operation S404; if they do not overlap, determine that the positional relationship between the first element and the second element is non-overlapping.

[0065] In this embodiment, the electronic device obtains the third minimum bounding rectangle of each region to represent the boundary of each region. First, it is determined whether the first minimum bounding rectangle overlaps with the third minimum bounding rectangle. If the first minimum bounding rectangle does not overlap with any of the third minimum bounding rectangles, it means that the first minimum bounding rectangle does not overlap with any of the second minimum bounding rectangles within the third minimum bounding rectangles, and therefore the first element and the second element do not overlap.

[0066] In operation S404, determine whether the first minimum bounding rectangle overlaps with any of the second minimum bounding rectangles contained within the third minimum bounding rectangle. If they overlap, proceed to operation S405; if they do not overlap, determine that the positional relationship between the first element and the second element is non-overlapping.

[0067] In this embodiment, if the first minimum outer rectangle overlaps with the third minimum outer rectangle, and the electronic device further determines that the first minimum outer rectangle only overlaps with the third minimum outer rectangle and not with the second minimum outer rectangle inside it, then it means that the first minimum outer rectangle does not overlap with any of the second minimum outer rectangles inside the third minimum outer rectangle, and the first element and the second element do not overlap.

[0068] Operation S405: Determine whether the first element and the second element corresponding to the first minimum bounding rectangle overlap with the overlapping second minimum bounding rectangle; if they overlap, determine that the positional relationship between the first element and the second element is overlapping; if they do not overlap, determine that the positional relationship between the first element and the second element is not overlapping.

[0069] In this embodiment, if the first minimum bounding rectangle overlaps with the third minimum bounding rectangle, and the electronic device further determines that a second minimum bounding rectangle overlaps with the first minimum bounding rectangle within the third minimum bounding rectangle, then it further determines whether the second element corresponding to the second minimum bounding rectangle overlaps with the first element corresponding to the first minimum bounding rectangle. If they overlap, the positional relationship between the first element and the second element is determined to be overlapping. When rectangles overlap, it is also necessary to determine whether the first element and the second element graphics within the rectangles themselves overlap. This is because judging the positional relationship between the first element and the second element solely based on the rectangles may result in cases where the rectangles overlap but the first element and the second element do not actually overlap.

[0070] The aforementioned electronic device can use geometric methods to calculate the intersection of the second element corresponding to the second minimum bounding rectangle and the first element corresponding to the first minimum bounding rectangle, determining whether the images of the first and second elements overlap. For example, the electronic device decomposes the first and second elements into their smallest geometric units, such as line segments, arcs, and endpoints, and extracts their coordinate information. It then uses geometric methods such as point-line relationships and line-plane intersection judgments to calculate the intersection. For instance, if the first element is R1 and the second element is a circular pad, the device calculates whether the shortest distance from the line segments and arcs obtained from decomposing R and 1 to the center of the circle is greater than the radius of the circular pad. If the shortest distance is less than or equal to the radius, then they intersect. If the electronic device uses geometric methods to calculate the intersection and determines that the first and second elements intersect, then their positional relationship is considered overlapping; otherwise, their positional relationship is considered non-overlapping.

[0071] In this embodiment, the electronic device divides the second elements scattered across the PCB design page into multiple regions. Subsequently, by judging the positional relationship between the first element and the region, and the positional relationship between the first element and the second elements within that region, it can initially filter out second elements that might overlap with the first element, thus eliminating the need to perform positional judgments on each second element individually. For example, if there are 1000 second elements on the PCB design page, the electronic device, by judging the positional relationship between the first element and the region, filters out that the first element overlaps with region A. Second elements in other regions cannot overlap with the first element. By judging whether the positional relationship between the first element and the second elements in region A overlaps, it filters out 100 second elements that might overlap with the first element. Only these 100 second elements need further detailed positional relationship judgments. Furthermore, in this embodiment, by judging whether the positional relationship between rectangles overlaps, it directly excludes second elements that cannot overlap, quickly filtering out second elements that might overlap with the first element. Detailed positional relationship judgments are only performed on the first element itself and the second elements that might overlap with it. Not only is the filtering process highly efficient, but it also consumes less computational power and saves the computational burden of subsequent determinations of the positional relationship between the first and second elements. Thus, this embodiment significantly reduces computational load and improves the efficiency of positional relationship determination by dividing the scattered second elements into regions and performing preliminary filtering based on rectangular frames, while also saving computational power. The process of determining the positional relationship between the first and second elements described above achieves positional relationship determination without human intervention, effectively solving the problems of low efficiency and low accuracy associated with manual inspection.

[0072] In an optional embodiment, before determining the positional relationship between the first element and the second element in operation S102, or after determining in operation S102 that the position of the first element does not overlap with the position of any second element in the set of second elements, and before adding the position-adjusted first element to the set of second elements, the method includes: determining whether the first element is located inside a board frame element in the PCB design; if it is located inside the board frame element, determining the positional relationship between the first element and the second element, or adding the position-adjusted first element to the set of second elements; if the first element is partially or entirely located outside the board frame element, adjusting the position of the first element. The board frame is typically a closed polygon structure, and the complete geometric data of the board frame element can be extracted from the PCB design file. The electronic device determines the boundary range of the board frame element using the coordinates of all its vertices. The boundary range is a closed polygon formed by sequentially connecting the coordinates of all the vertices of the board frame element. For example, if the boundary of the board frame element is a rectangle, the electronic device determines the boundary range of the board frame element using the coordinates of the four vertices of the rectangle. The boundary range is a rectangle formed by sequentially connecting the coordinates of the four vertices. Subsequently, the electronic device can determine whether the first element is located inside the board frame element using geometric Boolean operations, or by checking whether all four vertices of the first minimum bounding rectangle of the first element are within the boundary range of the board frame element. Alternatively, it can combine both methods: first, check if all four vertices of the first minimum bounding rectangle are within the boundary range of the board frame element; if so, the first element is located inside the board frame element. If any vertices of the first minimum bounding rectangle are outside or on the boundary range of the board frame element, then geometric Boolean operations are used to determine whether the first element is located inside the board frame element. This ensures that the first element does not exceed the board frame element in the PCB design, thus guaranteeing that the first element is located on the PCB.

[0073] In an optional embodiment, to achieve efficient position adjustment of silkscreen elements in PCB design, the electronic device can perform position adjustment of the first element in parallel, that is, perform position adjustment of multiple first elements simultaneously. For example, the electronic device divides the PCB into multiple spatial regions and uses multi-threading to adjust the position of the first elements. Each thread is responsible for adjusting the position of the first element within a region, wherein the region division can be dynamically adjusted according to component density or layout complexity. The above operations S101-S102 can be executed in parallel for the region corresponding to each thread. To avoid overlapping of the boundary silkscreen elements of threads in adjacent regions, the electronic device extends a certain distance outside the boundary of each region as a safety buffer, thereby avoiding the overlap of first elements adjusted by other threads due to independent operation of threads. This buffer can be used to check whether there are first elements that have been adjusted by other threads, thus avoiding overlap with first elements that have been adjusted by other threads. After all threads have completed their position adjustments, the electronic device can use the tools provided in the design software to check the position of the silkscreen layer elements that have undergone multi-threaded position adjustments. For example, it can enable silkscreen design rule checks in the design software or use plugins and scripts to check for overlapping silkscreen layer elements. If there is an overlap, the silkscreen layer element is identified as the silkscreen layer element to be adjusted, i.e., the first element, and the above operations S101-S102 are executed again to perform the position adjustment.

[0074] After all threads have completed their position adjustments, the electronic device can also identify all silkscreen layer elements in the PCB design as the first element, execute the above operations S401-S403, determine the positional relationship between the first element and the second element, and execute the above operations S101-S102 again for the first element whose position overlaps with the second element.

[0075] If the electronic device uses local R-Trees in each thread to determine the positional relationship between the first and second elements, after the above operations S101-S102 are executed in parallel by multiple threads, the local R-Trees corresponding to each thread are merged into a global R-Tree, which is used to execute the above operations S101-S102 again in the global context.

[0076] When an electronic device uses multiple threads to adjust the position of the first element, each thread can automatically generate detailed logs for easy traceability. Log content may include thread number, responsible area, number of first elements, arrangement time, and position adjustment information. The position adjustment information includes at least the number of adjustments, rotation angle, and final coordinates. The electronic device can also generate a visualization of the position adjustment for later analysis and optimization.

[0077] Figure 5This application shows a schematic diagram of a device for adjusting the position of silkscreen layer elements in an example PCB design. The device 500 includes: The acquisition module 501 is used to acquire a first set of elements and a second set of elements from the PCB design. The first element is the silkscreen layer element to be positioned and adjusted, and the second element is the silkscreen layer element of the PCB design excluding the first element and the bare copper layer element of the PCB design.

[0078] Processing module 502 is used to determine the positional relationship between the first element and the second element, and in response to the determination that the positional relationship is overlapping, to adjust the position of the first element so that the position of the first element does not overlap with the position of any second element in the set of second elements, and to add the first element with the adjusted position to the set of second elements.

[0079] The processing module 502 includes: The first determining module is used to determine the component corresponding to the first element in the PCB design and obtain the target minimum bounding rectangle of the component. The second determining module is used to determine the movement path of the first element based on the minimum bounding rectangle of the target, wherein the path includes multiple positions; The judgment module is used to determine the positional relationship between the first element and the second element at the current position. If the positional relationship at the current position is determined to be non-overlapping, the position of the first element is adjusted, and the first element at the current position is added to the set of the second elements. If the positional relationship at the current position is determined to be overlapping, the first element is rotated at least once according to a first preset angle. For the first element after each rotation, the positional relationship between the first element and the second element is determined. If the positional relationship at the current angle is determined to be non-overlapping, the position of the first element is adjusted, and the first element at the current position is added to the set of the second elements. If the positional relationship at the current position is determined to be overlapping after each rotation, the first element is restored to the initial angle, and then the first element is moved to the next position to determine the positional relationship.

[0080] The second determining module is further configured to: obtain the center point of the first element; determine the perpendicular distance between the center point and the straight lines containing each side of the target minimum bounding rectangle, and determine the shortest distance among the perpendicular distances; expand each side of the target minimum bounding rectangle by the shortest distance to obtain the target bounding rectangle, so that the center point is placed on the side of the target bounding rectangle; and on the target bounding rectangle, set multiple positions at intervals starting from the center point of the first element to form the movement path of the first element.

[0081] If the positional relationship between the first element and the second element is determined to be overlapping at each position on the movement path, the processing module 502 is further configured to restore the first element to the starting position of the movement path, starting from the starting position, rotate the first element at least once at each position according to the second preset angle, and determine the positional relationship between the first element and the second element for each rotation of the first element, wherein the second preset angle is less than the first preset angle.

[0082] The processing module 502 is further configured to obtain the first minimum bounding rectangle of the first element and the second minimum bounding rectangle of the second element; divide the region according to all the second minimum bounding rectangles of the second elements to obtain multiple regions, each region containing at least one second minimum bounding rectangle; obtain the third minimum bounding rectangle of each region; determine whether the first minimum bounding rectangle overlaps with any of the third minimum bounding rectangles; if they overlap, determine whether the first minimum bounding rectangle overlaps with any of the second minimum bounding rectangles contained within the third minimum bounding rectangle; if they overlap, determine whether the first minimum bounding rectangle overlaps with the first element and the second element corresponding to the overlapping second minimum bounding rectangles; if they overlap, determine that the positional relationship between the first element and the second element is overlapping.

[0083] This application also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the solid-state drive data reading method described in this application.

[0084] Embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of this application described in the "Exemplary Methods" section above.

[0085] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0086] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0087] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.

[0088] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0089] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0090] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

[0091] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0092] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0093] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for adjusting the position of a silk screen layer element in a PCB design, characterized in that, The method comprises: obtaining a first element set and a second element set from a PCB design, the first element being a silk screen layer element to be position adjusted, the second element being an element other than the first element in the silk screen layer elements of the PCB design and a bare copper layer element in the PCB design; determining the positional relationship between the first element and the second element, and in response to the positional relationship being determined as overlapping, position adjusting the first element so that the position of the first element does not overlap with the position of any one of the second elements, and adding the position adjusted first element to the second element set.

2. The method of claim 1, wherein, The position adjusting of the first element comprises: determining the corresponding component of the first element in the PCB design, and obtaining a target minimum circumscribed rectangle frame of the component; determining a moving path of the first element according to the target minimum circumscribed rectangle frame, the path comprising a plurality of positions; determining the positional relationship between the first element and the second element at the current position, and if the positional relationship at the current position is determined as not overlapping, completing the position adjustment of the first element and adding the first element at the current position to the second element set; if the positional relationship at the current position is determined as overlapping, rotating the first element at least once according to a first preset angle, determining the positional relationship between the first element and the second element for each rotated first element, and if the positional relationship at the current angle is determined as not overlapping, completing the position adjustment of the first element and adding the first element at the current position to the second element set; if the positional relationship at each rotated position of the current position is determined as overlapping, restoring the first element to the initial angle and moving the first element to the next position for the determination of the positional relationship.

3. The method of claim 2, wherein, The determination of the moving path of the first element according to the target minimum circumscribed rectangle frame comprises: obtaining the center point of the first element; determining the perpendicular distance between the center point and the straight line of each side of the target minimum circumscribed rectangle frame, and determining the shortest distance in the perpendicular distance; extending each side of the target minimum circumscribed rectangle frame by the shortest distance to obtain a target circumscribed rectangle frame, so that the center point is located on the side of the target circumscribed rectangle frame; setting a plurality of positions on the target circumscribed rectangle frame with the center point of the first element as the starting position to form the moving path of the first element.

4. The method of claim 3, wherein, if the positional relationship between the first element and the second element at each position on the moving path is determined as overlapping, the method further comprises: restoring the first element to the starting position of the moving path, rotating the first element at least once at each position according to a second preset angle from the starting position, determining the positional relationship between the first element and the second element for each rotated first element, and the second preset angle is smaller than the first preset angle.

5. The method of claim 4, wherein, If the position relationship between the first element and the second element at each position on the movement path is determined to be overlapped, the method further comprises: expanding each side of the target outer rectangular frame by a preset length to determine a new movement path.

6. The method according to any one of claims 1 to 5, characterized in that, The judgment of the position relationship between the first element and the second element comprises: obtaining a first minimum outer rectangular frame of the first element and a second minimum outer rectangular frame of the second element; performing region division according to the second minimum outer rectangular frames of all the second elements to obtain a plurality of regions, wherein each region contains at least one second minimum outer rectangular frame; obtaining a third minimum outer rectangular frame of each region, and judging whether the first minimum outer rectangular frame overlaps any third minimum outer rectangular frame; if overlapping, judging whether the first minimum outer rectangular frame overlaps any second minimum outer rectangular frame contained in the third minimum outer rectangular frame; if overlapping, judging whether the first element and the second element corresponding to the overlapping second minimum outer rectangular frame are overlapped; if overlapping, determining that the position relationship between the first element and the second element is overlapped.

7. A device for adjusting the position of a silk screen layer element in a PCB design, characterized in that, The device comprises: an obtaining module configured to obtain a first element set and a second element set from a PCB design, wherein the first element is a silk screen layer element to be adjusted in position, the second element is an element other than the first element in the silk screen layer elements of the PCB design and a bare copper layer element in the PCB design; a processing module configured to judge the position relationship between the first element and the second element, and in response to the position relationship being determined to be overlapped, adjust the position of the first element so that the position of the first element is not overlapped with the position of any second element in the second element set, and add the first element after the position adjustment to the second element set.

8. The apparatus of claim 7, wherein, The processing module comprises: a first determining module configured to determine a corresponding component of the first element in the PCB design, and obtain a target minimum outer rectangular frame of the component; a second determining module configured to determine a movement path of the first element according to the target minimum outer rectangular frame, wherein the path includes a plurality of positions; a judging module configured to judge the position relationship between the first element and the second element at a current position, if the position relationship at the current position is determined to be not overlapped, complete the position adjustment of the first element, and add the first element at the current position to the second element set; if the position relationship at the current position is determined to be overlapped, rotate the first element by a first preset angle at least once, judge the position relationship between the first element and the second element for the first element after each rotation, if the position relationship at a current angle is determined to be not overlapped, complete the position adjustment of the first element, and add the first element at the current position to the second element set; if the position relationship at each position after each rotation is determined to be overlapped, restore the first element to an initial angle, move the first element to a next position, and judge the position relationship.

9. An electronic device, comprising: It comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

10. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.