An Automatic Dimensioning Method and Storage Medium for an X-shaped Wine Rack

By generating the smallest external rectangular enclosure box and plate marking line of the X-shaped wine grid, combined with deduplication processing and edge marking, the problem of low automatic dimension marking of X-shaped wine grid is solved, the stability and aesthetics of the marking are improved, and the direct connection between design and production is achieved.

CN114547736BActive Publication Date: 2025-06-10HANGZHOU QUNHE INFORMATION TECHNOLOGIES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210126075.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-10
Publication Date
2025-06-10
Estimated Expiration
2042-02-10

AI Technical Summary

Technical Problem

In the prior art, the automatic dimension marking of X-shaped wine grid lacks an effective method, resulting in low marking accuracy. Affected by the subjective tendency of the drawing staff, the marking effect is unstable, and the general marking pieces are not suitable for X-shaped wine grids, resulting in confusion in the marking effect.

Method used

By obtaining two sets of plates in the X-shaped wine grid that maintain a vertical relationship with each other, a minimum external rectangle is generated as the bounding box, an overall label line is generated based on the edges of the bounding box, and a plate label line is generated with the long edges of the plate. Combined with deduplication and edge labeling, automatic dimension labeling for the X-shaped wine grid is achieved.

Benefits of technology

It improves the stability and aesthetics of the automatic dimensioning of X-shaped wine grids, avoids the influence of the subjective tendencies of the drawings, makes the drawings more standardized, and realizes the direct connection between design and production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547736B_ABST
    Figure CN114547736B_ABST
Patent Text Reader

Abstract

The present invention discloses an automatic dimension marking method and a storage medium for an X-shaped wine grid, including: obtaining two sets of plate members in the X-shaped wine grid that are perpendicular to each other, and denoting the set of plate members with a rotation angle greater than 180° as the leftward plate member group, and the set of plate members with a rotation angle less than 180° as the rightward plate member group; generating the smallest circumscribed rectangle containing all the plate members as the bounding box, and generating overall marking lines with the sides of the bounding box; generating plate member marking lines corresponding to each plate member in the leftward plate member group with the long sides of the plate members, and performing duplicate removal processing on all the generated plate member marking lines; taking two plate members located in the middle position in the leftward plate member group, and generating a spacing marking line with the vertical spacing between the two plate members; determining whether there is a protruding edge in the wine grid, and if there is a protruding edge, generating an edge marking line for the protruding edge; otherwise, no edge marking is required. The present invention can improve the stability and aesthetics of marking on the basis of meeting production requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of home decoration design, and specifically relates to an automatic dimensioning method and storage medium for an X-shaped wine rack. Background Art

[0002] As we all know, the current digitalization trend in the home design industry is unstoppable, and it has become an industry consensus that design and production should be seamlessly connected. After completing the design, the designer usually generates drawings and submits them to the manufacturer for review. The accuracy of the drawings is an important basis for the auditor to pass or fail. If there are errors in the drawings or they do not meet the production requirements, the review will fail and the process will be repeated. In serious cases, it will cause problems in production, reduce the manufacturer's yield rate and increase the total production cost.

[0003] Dimensioning is a necessary process for generating a usable home decoration drawing, and automatic dimensioning can save a lot of draftsmen's time and improve drawing efficiency. At the same time, automatic dimensioning is often more stable and in line with industry standards, which can avoid the adverse effects of different subjective tendencies and mistakes of different draftsmen, and the drawing effect will be more unified, so that the production effect can be stable and expected.

[0004] X-shaped wine rack refers to a wine rack composed of two sets of mutually perpendicular panels. It is an important object in home decoration design and is increasingly loved by owners and home decoration designers. The X-shaped wine rack is very different in geometric form from other common cabinet elements such as drawer partitions. In the existing drawing output system, there is no automatic marking method for the X-shaped wine rack. If it is marked using the general marking method for the plate parts, the result can be imagined to be quite confusing, and it is highly likely that it will not meet the production requirements. Therefore, it is necessary to carry out targeted dimension marking for the shape of the X-shaped wine rack. Summary of the invention

[0005] One of the purposes of the present application is to provide an automatic dimensioning method for an X-shaped wine rack, which can improve the stability and aesthetics of the marking while meeting production needs.

[0006] In order to achieve the above purpose, the technical solution adopted by this application is:

[0007] An automatic dimensioning method for an X-shaped wine rack, the automatic dimensioning method for an X-shaped wine rack comprising:

[0008] Obtain two groups of plates in an X-shaped wine rack that maintain a perpendicular relationship with each other, and record the plates with a rotation angle greater than 180° as a left-facing plate group, and the plates with a rotation angle less than 180° as a right-facing plate group;

[0009] Generate the minimum circumscribed rectangle containing all panels as a bounding box, and use the edges of the bounding box to generate the overall annotation line;

[0010] Generate a plate marking line corresponding to each plate in the leftward plate group along the long side of the plate, and perform duplicate removal on all the generated plate marking lines;

[0011] Select two plates located in the middle position in the leftward plate group, and generate a spacing marking line based on the vertical spacing between the two plates;

[0012] Determine whether there is a protruding edge on the wine grid. If there is a protruding edge, generate an edge marking line for the protruding edge; otherwise, no edge marking is required.

[0013] The following also provides several optional methods, which are not additional limitations to the above overall solution, but only further supplements or optimizations. Without technical or logical contradictions, each optional method can be combined with the above overall solution alone, or multiple optional methods can be combined with each other.

[0014] Preferably, the generating of the overall marking line along the edges of the bounding box includes:

[0015] Perform marking along the left side and the lower side of the bounding box, and use the marking line after moving it a preset distance into the bounding box as the overall marking line.

[0016] Preferably, the performing of duplicate removal on all the generated plate marking lines includes:

[0017] Select the plate marking lines with the same length and the same direction among the plate marking lines;

[0018] Use the line parallel to the lower side of the bounding box as the x-axis and the line parallel to the left side of the bounding box as the y-axis, and retain the plate marking line with the largest x-axis value of the center point of the plate marking line among the selected plate marking lines to complete the duplicate removal.

[0019] Preferably, the generating of the spacing marking line based on the vertical spacing between the two plates includes:

[0020] Take the midpoint of the left side of the plate on the right side among the two plates;

[0021] Project the taken midpoint onto the right side of the plate on the left side among the two plates to obtain a projection point;

[0022] Generate a spacing marking line with the connection line between the midpoint and the projection point.

[0023] Preferably, the determining whether there is a protruding edge on the wine grid. If there is a protruding edge, generate an edge marking line for the protruding edge; otherwise, no edge marking is required includes:

[0024] (1) Select one of the left - hand plate group and the right - hand plate group as the selected plate group, and the other as the auxiliary plate group;

[0025] (2) Generate a tuple for each plate in the selected plate group, which includes its intersection points with the bounding box and the intersection lines;

[0026] (3) Select one tuple from all the tuples as the current tuple;

[0027] (4) Select one intersection point in the current tuple and the intersection line where the intersection point is located as the current intersection point and the current intersection line. Select the long sides of each plate in the auxiliary plate group that intersect with the current intersection line, and calculate the distances from each long side to the current intersection point. If the minimum distance is 0, there is no protruding edge at the position of the current intersection point, and edge annotation is not required. Then execute step (6); otherwise, execute the next step;

[0028] (5) If the minimum distance is not 0, then connect the intersection point of the long side corresponding to the minimum distance and the current intersection line with the current intersection point to generate an edge annotation line;

[0029] (6) Determine whether the current intersection point and the current intersection line are the last pair of intersection points and intersection lines in the current tuple. If they are not the last pair of intersection points and intersection lines, return to (4) and continue to execute; otherwise, execute the next step;

[0030] (7) Determine whether the current tuple is the last tuple. If it is not the last tuple, return to (3) and continue to execute; otherwise, execute the next step;

[0031] (8) Update the original selected plate group in the left - hand plate group and the right - hand plate group to the auxiliary plate group, update the original auxiliary plate group to the selected plate group, and re - execute (2);

[0032] (9) Remove duplicates from all the generated edge annotation lines to complete the edge annotation of the wine grid.

[0033] Preferably, the removing duplicates from all the generated edge annotation lines includes:

[0034] Use the line parallel to the lower side of the bounding box as the x - axis, and the line parallel to the left side of the bounding box as the y - axis;

[0035] Select the edge annotation lines with the same length among the edge annotation lines, and retain only one edge annotation line with the largest x - axis value and the smallest y - axis value of the center point of the edge annotation line among the selected edge annotation lines to complete the removal of duplicates.

[0036] An automatic dimension annotation method for an X - type wine grid provided by the present application can perform good automatic dimension annotation of the wine grid, improve the drawing efficiency of users, avoid the subjective tendency of draftsmen at the same time, make the drawings more standardized, and complete the direct connection between design and production.

[0037] Another object of the present application is to provide a computer-readable storage medium, which can improve the stability and aesthetics of labeling on the basis of meeting production requirements.

[0038] To achieve the above object, the technical solution adopted by the present application is as follows:

[0039] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the automatic dimensioning method of the X-shaped wine grid as described above.

[0040] The computer-readable storage medium provided by the present application can perform automatic dimensioning of the wine grid with good results after the computer program thereon runs, improve the drawing efficiency of users, and avoid the subjective tendency of draftsmen at the same time, making the drawings more standardized and completing the direct connection between design and production. Description of the Drawings

[0041] Figure 1 is a flowchart of the automatic dimensioning method of the X-shaped wine grid of the present application;

[0042] Figure 2 is a schematic diagram of an embodiment after the overall labeling of the wine grid of the present application;

[0043] Figure 3 is a schematic diagram of an embodiment after the labeling of the wine grid plate of the present application;

[0044] Figure 4 is a schematic diagram of an embodiment after the spacing labeling of the wine grid of the present application;

[0045] Figure 5 is a schematic diagram of an embodiment after the edge labeling of the wine grid of the present application;

[0046] Figure 6 is a schematic diagram of an embodiment after the labeling of the wine grid of the present application. Detailed Description of the Embodiments

[0047] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used in the description of the present application herein are only for the purpose of describing specific embodiments, and are not intended to limit this application.

[0049] To solve the problems in the prior art that the accuracy of wine grid labeling is low, the labeling effect is greatly affected by the subjective tendency of the draftsman, resulting in low stability of the labeling effect, and the general template parts are not applicable to the labeling of X-shaped wine grids, leading to chaotic labeling effects, this embodiment provides an automatic dimension labeling method for X-shaped wine grids.

[0050] As Figure 1 shown, the automatic dimension labeling method for X-shaped wine grids in this embodiment includes:

[0051] Step 1, data initialization: Obtain two sets of plate parts in the X-shaped wine grid that maintain a perpendicular relationship with each other. Denote the set of plate parts with a rotation angle greater than 180° as the leftward plate part group, and the set of plate parts with a rotation angle less than 180° as the rightward plate part group.

[0052] It can be understood that before wine grid labeling, there must be a model to be labeled, which can be two-dimensional or three-dimensional. If it is a three-dimensional parametric model, in order to facilitate labeling, the three-dimensional parametric model needs to be projected onto a two-dimensional plane. In this embodiment, the wine grid on the two-dimensional plane is obtained by projecting the three-dimensional parametric model along the depth direction of the wine grid cells.

[0053] Among them, the projection from three-dimensional to two-dimensional can be understood as a process in which three-dimensional geometric data is converted into two-dimensional geometric data through projection, which is a common geometric transformation. And this geometric transformation is not the focus of this application and can be implemented based on the prior art, so it will not be elaborated here.

[0054] After the model of the wine grid on the two-dimensional plane or the three-dimensional parametric model is projected onto the two-dimensional plane, two sets of plate parts that maintain a perpendicular relationship with each other can be obtained, and dimension labeling is performed based on these plate parts.

[0055] To facilitate the description of dividing the plate parts into the leftward plate part group and the rightward plate part group, the rotation angle in the division standard should be understood as the angle of counterclockwise rotation starting from the horizontal direction.

[0056] Step 2, overall wine grid labeling: Generate the smallest circumscribed rectangle containing all the plate parts as the bounding box, and generate overall labeling lines based on the sides of the bounding box.

[0057] The generated bounding box is the smallest size containing all the plate parts. When generating the overall labeling lines based on the sides of the bounding box, only the length and width of the bounding box need to be used for labeling. In this embodiment, the left side and the lower side of the bounding box are used for labeling, that is, the lengths of the left side and the lower side are used for dimension labeling. And to improve the aesthetics of the labeling, the labeling lines are moved a preset distance inward into the bounding box as the overall labeling lines.

[0058] Step 3: Labeling of wine grid plates: Generate plate labeling lines corresponding to each plate in the leftward plate group based on the long sides of the plates, and perform duplicate removal on all the generated plate labeling lines.

[0059] Since the thickness of the plate usually depends on the plate material selected in actual use, the thickness of the plate is not labeled in the plate labeling. That is, in this embodiment, only the length of the plate is labeled in the plate labeling.

[0060] To reasonably arrange the distribution of plate labeling positions, in this embodiment, the plate labeling is based on the leftward plate group. It is easy to understand that in other embodiments, the rightward plate group can also be selected as the basis.

[0061] When generating the plate labeling lines belonging to the long sides of each plate, the generation can be performed only for one long side of the plate. However, to adapt to the situation where the long side and the wide side of the plate are not perpendicular, in this embodiment, the plate labeling lines are generated for both long sides of the plate respectively. Therefore, after generation, plate labeling lines with the same dimension data will be obtained, and duplicate removal needs to be performed on the plate labeling lines to avoid labeling confusion.

[0062] In one embodiment, the duplicate removal of the generated plate labeling lines includes:

[0063] Select the plate labeling lines with the same length and the same direction in the plate labeling lines;

[0064] Taking the line parallel to the lower side of the bounding box as the x-axis and the line parallel to the left side of the bounding box as the y-axis, retain the plate labeling line with the largest x-axis value of the center point of the plate labeling line among the selected plate labeling lines to complete the duplicate removal.

[0065] Duplicate removal is performed for each group of plate labeling lines with the same length and the same direction, and in the duplicate removal, this embodiment retains the plate labeling line with the largest x-axis value of the center point of the plate labeling line. Since in the two-dimensional plane, the horizontal direction is the x-axis and the vertical direction is the y-axis, and the origin is related to the projection plane, and the maximum value taken in this embodiment is not affected by the origin and the extension direction of the coordinate axes, the form of the coordinate axes is not displayed in this embodiment.

[0066] Step 4: Labeling of wine grid spacing: Take the two plates in the middle position in the leftward plate group, and generate a spacing labeling line based on the vertical spacing between the two plates.

[0067] The middle position in this embodiment should be understood as the two plates located in the middle under symmetry. If the number of plates in the plate group is odd, take the plate in the middle under symmetry and the plate on the left side of this plate as the two plates in the middle position.

[0068] When generating the spacing marking line, take the midpoint of the right side of the left plate among the two plates; project the taken midpoint onto the left side of the right plate among the two plates to obtain a projection point; generate the spacing marking line with the connection line between the midpoint and the projection point.

[0069] In this embodiment, the connection line between the midpoint and the projection point is used for dimension marking as the spacing marking line. Therefore, it can be understood that when generating the spacing marking line, the midpoint of the left side of the right plate among the two plates can also be taken; project the taken midpoint onto the right side of the left plate among the two plates to obtain a projection point; generate the spacing marking line with the connection line between the midpoint and the projection point.

[0070] Step 5: Edge marking of the wine grid: Determine whether there is a protruding edge on the wine grid. If there is a protruding edge, generate an edge marking line for the protruding edge; otherwise, no edge marking is required.

[0071] The edge marking of the wine grid in this embodiment specifically includes the following steps:

[0072] (1) Select one group from the leftward plate group and the rightward plate group as the selected plate group, and the other group as the auxiliary plate group.

[0073] (2) Generate a tuple containing the intersection points and intersection lines of each plate in the selected plate group with the bounding box. In this application, the length and width of the plate are perpendicular, so one long side of the obliquely placed plate has only one intersection point with the bounding box, and the intersection line is a line passing through the intersection point and parallel to the long side. Therefore, generally, there are two intersection lines and two intersection points in the tuple, and each intersection point corresponds to an intersection line.

[0074] (3) Select one tuple from all the tuples as the current tuple.

[0075] (4) Select one intersection point and the intersection line where the intersection point is located in the current tuple as the current intersection point and the current intersection line. Select the long sides of each plate in the auxiliary plate group that intersect with the current intersection line, and calculate the distance from each long side to the current intersection point. If the minimum distance is 0, there is no protruding edge at the position of the current intersection point, and no edge marking is required, and go to step (6); otherwise, go to the next step, which is step (5).

[0076] (5) If the minimum distance is not 0, generate an edge marking line with the connection line between the intersection point of the long side corresponding to the minimum distance and the current intersection line and the current intersection point.

[0077] (6) Determine whether the current intersection point and the current intersection line are the last pair of intersection points and intersection lines in the current tuple. If they are not the last pair of intersection points and intersection lines, return to (4) and continue to execute; otherwise, go to the next step, which is step (7).

[0078] (7) Determine whether the current tuple is the last tuple. If it is not the last tuple, return to (3) and continue execution; otherwise, proceed to the next step, which is step (8).

[0079] (8) Update the original selected panel group in the leftward panel group and the rightward panel group to the auxiliary panel group, update the original auxiliary panel group to the selected panel group, and re - execute (2).

[0080] (9) Remove duplicates from all the generated edge marking lines to complete the edge marking of the wine grid.

[0081] Before the duplicate removal process, edge marking lines are generated on all four sides of the bounding box, and there are many marking lines with the same length among them. Therefore, duplicate removal is required. To reasonably arrange each marking line, in this embodiment, the duplicate removal process for the edge marking lines is as follows:

[0082] Select the edge marking lines with the same length among the edge marking lines, and retain the one with the largest x - axis value and the smallest y - axis value of the center point of the edge marking line among the selected edge marking lines to complete the duplicate removal process.

[0083] That is, when removing duplicates from the edge marking lines, first select the line with the largest x - axis value. If there are multiple lines with the same x - axis value, then select the line with the smallest y - axis value to complete the duplicate removal process.

[0084] This application reasonably distributes the positions of each marking line and performs marking in a unified form, avoiding chaotic marking effects. Moreover, the provided automatic marking can avoid the influence of the drafter's subjective tendency to improve the accuracy and stability of marking.

[0085] To further elaborate on the technical solution of this application, in combination with Figures 2 to 6 A specific example is provided as follows:

[0086] 1. Input the three - dimensional parametric model M of the X - type wine grid, project it onto a two - dimensional plane to form two - dimensional geometric data G.

[0087] Mark the panel group in the two - dimensional geometric data G with a rotation angle greater than 180 degrees as LPG, and mark the panel group with a rotation angle less than 180 degrees as RPG to complete data initialization. All panels in the panel group are rectangles.

[0088] 2. Generate a minimum bounding rectangle denoted as the two - dimensional bounding box B based on all the points of the panels in the two - dimensional geometric data G. The width of the obtained bounding box B is 622 and the height is 480. Accordingly, generate marking lines at the lower left, and for aesthetics, displace the marking lines 20 millimeters towards the center of the bounding box for arrangement as the final overall marking lines to complete the overall marking of the wine grid, as Figure 2 shown.

[0089] 3. Select the panel group LPG as the object for panel annotation. For each panel LP, annotate the two long sides of its rectangle, and then remove duplicates. If the lengths of the annotation lines are the same, preferentially select the annotation line with the larger x-axis value of its midpoint, obtaining the four annotations 173, 371, 569, and 667 in the appendix to complete the annotation of the wine grid panels. Figure 3

[0090] 4. Take the two middle panels of the panel group LPG from left to right and denote them as LPM1 and LPM2 respectively. Take the midpoint LPM2_MP of the left side of LPM2 and project it onto the right side of LPM1 to form the projection point LPPP. Connect the two points of the midpoint LPM2_MP and the projection point LPPP, which is the result of the spacing annotation, such as the annotation line with a length of 90 in the figure. Figure 4

[0091] 5. Edge annotation of the wine grid: (The wine grid may or may not have edge protrusions)

[0092] a. Take the bounding box B generated in step 2 and generate a tuple Pair<IP, IL> of the intersection points and intersection lines between it and all selected direction panel groups (currently selected as the leftward LPG).

[0093] b. For each tuple Pair, take all the long sides in the panel group in the other direction (rightward is RPG) that have intersection points with the intersection line IL, and then sort them according to their distances to the intersection point IP, and take the long side with the minimum distance. If the minimum distance is 0, it means that the wine grid panels just fall on the edge and no edge annotation is required.

[0094] c. If the result in b exists, connect the intersection point IP with the intersection point ILIP of the long side generated in b and the intersection line, which is the edge annotation line.

[0095] d. From a, b, and c, the edge annotations of all leftward panel groups can be obtained. By changing the input leftward LPG to rightward RPG, the edge annotations of the rightward panel group RPG can be obtained.

[0096] e. Remove duplicates from the edge annotation lines according to the length, preferentially select the annotation with the larger x-axis value of the midpoint. If the x-axis values of the midpoints are the same, then make a choice according to the smaller y-axis value. Such as obtaining the two annotation lines 32 and 33 in the figure. Complete the final wine grid annotation to obtain the annotation diagram as shown. Figure 5 Figure 6

[0097] It should be understood that although Figure 1 ​​​​The steps in the flowchart are shown in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least some of the steps in Figure 1 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in rotation with at least some of the sub-steps or stages of other steps or other steps.

[0098] Those of ordinary skill in the art can understand that all or part of the processes in the above-described method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the method embodiments as described above. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0099] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0100] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. An automatic dimensioning method for an X-shaped wine grid, characterized in that, the automatic dimensioning method for the X-shaped wine grid includes: Obtain two sets of plate members in the X-shaped wine grid that maintain a perpendicular relationship with each other. Denote the set of plate members with a rotation angle greater than 180° as the leftward plate member group, and the set of plate members with a rotation angle less than 180° as the rightward plate member group; Generate the smallest circumscribed rectangle containing all the plate members as the bounding box, and generate the overall dimension line based on the sides of the bounding box; Generate the plate member dimension lines corresponding to each plate member in the leftward plate member group based on the long sides of the plate members, and perform duplicate removal on all the generated plate member dimension lines; Select two plate members in the middle position of the leftward plate member group, and generate the spacing dimension line based on the vertical spacing between the two plate members; Determine whether there is a protruding edge in the wine grid. If there is a protruding edge, generate the edge dimension line for the protruding edge; otherwise, no edge dimensioning is required, including: (1) Select one of the leftward plate member group and the rightward plate member group as the selected plate member group, and the other as the auxiliary plate member group; (2) For each plate member in the selected plate member group, generate a tuple containing the intersection points and intersection lines of the plate member and the bounding box. The long side and the short side of the plate member are perpendicular, and one long side of the inclined plate member has only one intersection point with the bounding box. The intersection line is a line passing through the intersection point and parallel to the long side; (3) Select one tuple from all the tuples as the current tuple; (4) Select one intersection point in the current tuple and the intersection line where the intersection point is located as the current intersection point and the current intersection line. Select the long sides of each plate member in the auxiliary plate member group that intersect with the current intersection line, and calculate the distance from each long side to the current intersection point. If the minimum distance is 0, there is no protruding edge at the position of the current intersection point, and no edge dimensioning is required, and go to step (6); otherwise, go to the next step; (5) If the minimum distance is not 0, connect the intersection point of the long side corresponding to the minimum distance and the current intersection line and the current intersection point to generate the edge dimension line; (6) Determine whether the current intersection point and the current intersection line are the last pair of intersection points and intersection lines in the current tuple. If they are not the last pair of intersection points and intersection lines, return to step (4) to continue execution; otherwise, go to the next step; (7) Determine whether the current tuple is the last tuple. If it is not the last tuple, return to step (3) to continue execution; otherwise, go to the next step; (8) Update the original selected plate member group in the leftward plate member group and the rightward plate member group to the auxiliary plate member group, update the original auxiliary plate member group to the selected plate member group, and re-execute step (2); (9) Perform duplicate removal on all the generated edge dimension lines to complete the edge dimensioning of the wine grid.

2. The automatic dimensioning method for the X-shaped wine grid according to claim 1, characterized in that, the generation of the overall dimension line based on the sides of the bounding box includes: Perform dimensioning on the left side and the lower side of the bounding box, and use the dimension line after moving it a preset distance into the bounding box as the overall dimension line.

3. The automatic dimensioning method for the X-shaped wine grid according to claim 1, characterized in that, the duplicate removal of all the generated plate member dimension lines includes: Select the plate member dimension lines with the same length and the same direction among the plate member dimension lines; Taking the line parallel to the lower side of the bounding box as the x-axis and the line parallel to the left side of the bounding box as the y-axis, among the selected panel marking lines, retain the panel marking line with the largest x-axis value at the center point of the panel marking line, and complete the duplicate removal process.

4. The automatic dimension marking method for the X-shaped wine grid according to claim 1, characterized in that the generating of the spacing marking line based on the vertical spacing between two panels includes: taking the midpoint of the left side of the panel on the right among the two panels; projecting the taken midpoint onto the right side of the panel on the left among the two panels to obtain a projection point; generating a spacing marking line with the connection line between the midpoint and the projection point.

5. The automatic dimension marking method for the X-shaped wine grid according to claim 1, characterized in that the duplicate removal process for all the generated edge marking lines includes: taking the line parallel to the lower side of the bounding box as the x-axis and the line parallel to the left side of the bounding box as the y-axis; selecting the edge marking lines with the same length among the edge marking lines, and retaining the edge marking line with the largest x-axis value and the smallest y-axis value at the center point of the edge marking lines among the selected edge marking lines, and completing the duplicate removal process.

6. A computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Automatic labeling and typesetting method for decoration drawings

    CN110598195A

  • Plate recognition method and device, storage medium and computer equipment

    CN111539081A

  • Rectangular workpiece size measurement method, device and equipment and storage medium

    CN112419398A