Method for generating fetal position assemblage distribution diagram
By automatically generating fetal position distribution diagrams using Python functions, the problem of high workload and error-proneness in existing technologies is solved, and efficient and accurate fetal position distribution diagram drawing is achieved.
Patent Information
- Application Number
- CN202410957106.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-12
AI Technical Summary
Existing methods are labor-intensive and error-prone when drawing fetal position distribution diagrams, resulting in low efficiency.
Python functions are used to automatically generate fetal position diagrams, straddle diagrams, and assemblages. An algorithm is written to automatically move each assemblage diagram to the corresponding fetal position, reducing manual operation.
It reduces workload, saves time, lowers labor intensity, and improves the accuracy and efficiency of drawing.
Smart Images

Figure CN118942639A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of assembly diagram and fetal position diagram drawing, and in particular to a method for generating a fetal position assembly distribution diagram. Background Art
[0002] There are usually multiple positions in the assembly production bay, and different batches of assemblies will be scheduled for each position. Due to the rapid update of assembly production, there are many types of assemblies in the bay, and the distribution is relatively messy. In order to clearly know the assemblies that need to be produced in each position within a certain period of time, it is necessary to draw a distribution map of the position assemblies in the bay, which is not only convenient for the operation manager to arrange production tasks, but also conducive to arranging and coordinating workers and materials.
[0003] The main method currently used in this work is: first, draw a span fetal position map according to the size of each fetal position in the span, then manually check the assembly map to determine the assembly size, hand-draw a rectangular frame map according to the length and width of each assembly in the Excel table, get a picture representing the assembly, fill in the assembly name on the picture, and finally drag the assembly map to each fetal position to get the span fetal position assembly distribution map. However, this method is not only labor-intensive, but also prone to manual errors. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the related art, an object of the present invention is to provide a method for generating a fetal position assembly distribution map, so as to solve the problems of large workload and easy error in the existing method.
[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for generating a fetal position assembly distribution map, the steps of which include: generating and saving each fetal position map based on the statistical size of each fetal position; generating a span map based on the size of the span; reading each saved fetal position map into the span map to obtain a span fetal position map and saving it locally; generating and saving each group map based on each group size; importing the span fetal position map and each group map into the same table, and moving each group map to the corresponding fetal position in the span fetal position map based on the production plan.
[0006] Optionally, the statistical dimensions of each fetal position include the length and width of each fetal position, the dimensions of the span include the length and width of the span, and the dimensions of each group include the length and width of each group.
[0007] Optionally, the steps of generating and saving each fetal position map are: generating a rectangular frame map representing each fetal position based on the length and width of each fetal position; marking information corresponding to each fetal position in each rectangular frame map to form each fetal position map; and saving each fetal position map locally.
[0008] Optionally, the fetal position information includes fetal position number, fetal position type and fetal position size information.
[0009] Optionally, the step of reading the saved fetal position maps into the span-to-span map to obtain the span-to-span fetal position map is: importing each fetal position map into the span-to-span map; based on the position of each fetal position in the span and the interval distance between each fetal position, distributing each fetal position map on the span-to-span map to obtain the span-to-span fetal position map.
[0010] Optionally, the step of generating and saving each group image based on the size of each group includes: generating a rectangular frame image representing each group based on the length and width of each group; marking information corresponding to each group in each rectangular frame image to form each group image; and saving each group image locally.
[0011] Optionally, the assembly information includes the name and weight of the assembly.
[0012] Optionally, the step of marking the information corresponding to each assembly in each rectangular frame diagram is: setting the upper limit, lower limit and traversal step of the font size of the assembly information; initializing the font size of the assembly information to the lower limit value; obtaining the length of the font and comparing it with the length of the rectangular frame diagram; if the length of the font is less than the length of the rectangular frame diagram, increasing the font size of the assembly information based on the traversal step, and repeating the previous step until the length of the font is greater than the length of the rectangular frame diagram; arranging all font sizes that satisfy the requirement that the font length is less than the length of the rectangular frame diagram from large to small, and selecting one of the font sizes based on the clarity requirement.
[0013] Optionally, after importing the span-to-span fetal position diagram and each set of standing diagrams into the same table, the size of the span-to-span fetal position diagram is first adjusted to restore its actual size, and then each set of standing diagrams is moved to a corresponding fetal position in the span-to-span fetal position diagram based on the production plan.
[0014] As described above, the method for generating a fetal position assembly distribution map of the present invention has the following beneficial effects: since the span and fetal position size generally remain unchanged, the present invention only needs to generate a span fetal position map once, which can be used for a long time afterwards. The assembly map only needs to count the assembly name, size, weight and other information in advance, present it in a table form, and then use the written algorithm to generate all assembly maps with one click. By adopting this method, the workload of operators can be reduced, drawing time can be saved, and it is not easy to make mistakes. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Shown is a schematic diagram of a fetal position diagram in an embodiment of the present invention.
[0016] Figure 2 Shown is a schematic diagram of a span-to-span fetal position diagram in an embodiment of the present invention.
[0017] Figure 3 Shown is a schematic diagram of a cross-group diagram in an embodiment of the present invention.
[0018] Figure 4Shown is a schematic diagram of a fetal position assembly distribution diagram in an embodiment of the present invention.
[0019] Component number description
[0020] 10 Fetal Position Diagram
[0021] 20 span diagram
[0022] 30 Group drawing DETAILED DESCRIPTION
[0023] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.
[0024] For example, when describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional view showing the device structure will not be partially enlarged according to the general scale, and the schematic view is only an example, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional space dimensions of length, width and depth should be included.
[0025] For ease of description, spatial relational terms such as "under", "below", "below", "below", "above", "on", etc. may be used herein to describe the relationship of one element or feature shown in the drawings to other elements or features. It will be understood that these spatial relational terms are intended to include other directions of the device in use or operation in addition to the directions depicted in the drawings. In addition, when a layer is referred to as being "between" two layers, it can be the only layer between the two layers, or there can be one or more intervening layers. As used herein, "between..." means including the end point values.
[0026] In the context of the present application, a structure in which a first feature is described as being "above" a second feature may include embodiments in which the first and second features are formed in direct contact, and may also include embodiments in which additional features are formed between the first and second features, such that the first and second features may not be in direct contact.
[0027] It should be noted that the illustrations provided in this embodiment are only used to illustrate the basic concept of the present invention in a schematic manner, and therefore the illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0028] like Figures 1 to 3As shown, this embodiment provides a method for generating a fetal position assembly distribution diagram, the steps of which include:
[0029] Based on the statistical dimensions of each fetal position, generate and save each fetal position diagram 10;
[0030] Based on the size of the span, a span diagram 20 is generated;
[0031] Read each stored fetal position diagram 10 into the span diagram 20 to obtain a span fetal position diagram and save it locally;
[0032] Based on each assembly size, generate and save each assembly drawing 30;
[0033] The span-to-span fetal position diagram and each set of images 30 are imported into the same table, and each set of images 30 is moved to the corresponding fetal position in the span-to-span fetal position diagram based on the production plan.
[0034] Specifically, this embodiment generates a fetal position assembly distribution diagram by using a function in Python, and first automatically generates each fetal position diagram 10 and the span diagram 20 through the function, and then reads each fetal position diagram 10 into the span diagram 20 to form a span fetal position diagram, and then generates each assembly diagram 30 through the function, and finally only needs to manually move each assembly diagram 30 to the corresponding position in the same software table. After adopting the above method, in the process of making a fetal position assembly distribution diagram, the steps of making a fetal position diagram 10, a span diagram 20, a span fetal position diagram and an assembly diagram 30 are all realized by the function, and there is no need for manual drawing, which not only saves working time and reduces labor intensity, but also avoids human errors and ensures the accuracy of drawing.
[0035] The statistical dimensions of each fetal position include the length and width of each fetal position, the dimensions of the span include the length and width of the span, and the dimensions of each group include the length and width of each group.
[0036] The steps of generating and saving each fetal position diagram 10 are:
[0037] Generate a rectangular box diagram representing each fetal position based on the length and width of each fetal position;
[0038] Mark the information corresponding to each fetal position in each rectangular frame to form each fetal position diagram 10;
[0039] Each fetal position diagram 10 is saved locally.
[0040] Specifically, according to the length and width of each fetal position, a rectangular frame diagram corresponding to each fetal position is generated through the function plt.figure(). To distinguish different fetal positions, the fetal position information is marked in the corresponding rectangular frame diagram through the function plt.text(), and a complete fetal position diagram 10 is formed. Finally, the function plt.savefig() is used to save each fetal position diagram 10 to the local computer. The size and position of the font can be defined in the three functions.
[0041] The fetal position information includes the fetal position number, fetal position type and fetal position size information. Among them, the fetal position number can be marked starting from 1 according to the number of fetal positions. The fetal position type refers to the placement of different types of tire frames on the fetal position. Different tire frames are used to support different types of assemblies. The tire frame types include flexible tire frames, angle steel tire frames and template tire frames. The tire frame size information refers to the length and width of the tire frame, which is expressed in the form of length × width. By marking the fetal position size information, the operator can intuitively understand the fetal position information and distribute the assembly to the appropriate fetal position.
[0042] The steps of reading each stored fetal position diagram 10 into the span diagram 20 to obtain the span fetal position diagram are as follows:
[0043] Import each fetal position diagram 10 into the span diagram 20;
[0044] Based on the position of each fetal position in the span and the interval distance between each fetal position, each fetal position diagram 10 is distributed on the span diagram 20 to obtain a span fetal position diagram.
[0045] Specifically, the span diagram 20 is first generated by the function Image.new() according to the length and width of the span, and the color of the span diagram 20 can be defined according to the specific situation for distinction. Then, the function Image.open() is used to read the fetal position diagrams 10 stored locally into the span diagram 20, and the function figure.paste() is used to paste each fetal position diagram 10 on the span diagram 20, so as to obtain the span fetal position distribution diagram. Finally, the span fetal position distribution diagram is saved locally by the function figure.save(). Among them, the position of each fetal position diagram 10 is represented in the form of coordinates according to the position of each fetal position in the span and the interval distance between each fetal position, and then the function figure.paste() is used to arrange each fetal position diagram 10 in the correct position.
[0046] Based on each assembly size, the steps of generating and saving each assembly diagram 30 include:
[0047] Generate a rectangular frame diagram representing each group based on the length and width of each group;
[0048] Mark the information corresponding to each group in each rectangular frame to form each group diagram 30;
[0049] Each set of images 30 is saved locally.
[0050] Specifically, according to the length and width of each assembly, a rectangular frame diagram representing each assembly is generated by the function plt.figure(), and then the information of each assembly is written on the corresponding rectangular frame diagram by the function plt.text() to form each assembly diagram 30. Finally, the function plt.savefig() is used to save each assembly diagram 30 to the local computer. The assembly information includes the name and weight of the assembly.
[0051] Since the assembly name is long, you need to select a suitable font size when writing the assembly name in the rectangular frame to avoid the problem that the font exceeds the rectangular frame or the font is too small to cause unclearness. To select a suitable font size, the specific operations are as follows:
[0052] Set the upper and lower limits and traversal step length of the font size of the assembly information;
[0053] Initialize the font size of the assembly information to the lower limit;
[0054] Get the length of the font and compare it with the length of the rectangle;
[0055] If the length of the font is less than the length of the rectangular frame diagram, increase the font size of the assembly information font based on the traversal step length, and repeat the previous step until the length of the font is greater than the length of the rectangular frame diagram;
[0056] Arrange all font sizes that meet the requirement that the length of the font is less than the length of the rectangular frame from large to small, and select one of the font sizes based on the clarity requirement.
[0057] Specifically, the upper limit of the font size can be set to 70, the lower limit can be set to 20, and the traversal step length can be set to 2. It can be understood that the lower limit, upper limit and traversal step length of the font size can be determined according to the situation. Initialize the font size, that is, set the initial size of the font to 20. Then obtain the length of the font under the font size, and compare the font length with the length of the rectangular frame diagram. If the font length is less than the length of the rectangular frame diagram, perform the next round of calculation, that is, increase the font size again and compare again. If the font length is greater than the length of the rectangular frame diagram, stop the calculation, and arrange all the font sizes that meet the use requirements from large to small. In order to meet the clarity requirements, the font size should be as large as possible, and at the same time, a certain distance should be left between the font and the boundary of the rectangular frame diagram. In this embodiment, the font size is set to the eighth font size.
[0058] like Figure 4 As shown, after the span-to-span fetal position diagram and each set of images 30 are imported into the same table, the size of the span-to-span fetal position diagram is first adjusted to restore its actual size, and then based on the production plan, each set of images 30 is moved to the corresponding fetal position in the span-to-span fetal position diagram.
[0059] Specifically, the created span-to-span fetal position diagram and each assembly diagram 30 are manually imported into an EXCEL table. At this time, since the span-to-span fetal position distribution diagram is large in size, it will be compressed when imported, and it is necessary to use the size adjustment function in the table to restore it to its actual size. The assembly diagram 30 is generally small in size and is generally not compressed. In order to facilitate the subsequent import of a new assembly diagram 30, the size of the assembly diagram 30 can be kept unchanged, that is, the assembly diagram 30 is not scaled.
[0060] If the span fetal position distribution diagram and all the group diagrams 30 cannot be fully presented, the Excel table can be reduced so that all the pictures are presented in one view for easy observation.
[0061] According to the production plan, each assembly diagram 30 is manually moved to a corresponding fetal position, thereby forming a span-fetal position assembly distribution diagram.
[0062] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A method for generating a fetal position assembly distribution diagram, characterized in that: The steps of the method for generating the fetal position assembly distribution diagram include: Generate and save each fetal position diagram based on the statistical dimensions of each fetal position; Generate a span diagram based on the span size; Read each saved fetal position map into the span map to obtain a span fetal position map and save it locally; Generate and save each assembly drawing based on each assembly size; Import the span-to-span fetal position diagram and each group of vertical diagrams into the same table, and move each group of vertical diagrams to the corresponding fetal position in the span-to-span fetal position diagram based on the production plan.
2. The method for generating a fetal position assembly distribution diagram according to claim 1, characterized in that: The statistical dimensions of each fetal position include the length and width of each fetal position, the dimensions of the span include the length and width of the span, and the dimensions of each group include the length and width of each group.
3. The method for generating a fetal position assembly distribution diagram according to claim 2, characterized in that: The steps of generating and preserving each fetal position diagram are as follows: Generate a rectangular box diagram representing each fetal position based on the length and width of each fetal position; Marking information corresponding to each fetal position in each rectangular frame to form each fetal position diagram; Save each fetal position diagram locally.
4. The method for generating a fetal position assembly distribution diagram according to claim 3, characterized in that: The fetal position information includes fetal position number, fetal position type and fetal position size information.
5. The method for generating a fetal position assembly distribution diagram according to claim 1, characterized in that: The step of reading each stored fetal position map into the span map to obtain the span fetal position map is: Import each fetal position map into the span map; Based on the position of each fetal position in the span and the interval distance between each fetal position, each fetal position map is distributed on the span map to obtain the span fetal position map.
6. The method for generating a fetal position assembly distribution diagram according to claim 2, characterized in that: The step of generating and saving each assembly diagram based on each assembly size includes: Generate a rectangular frame diagram representing each group based on the length and width of each group; Marking the information corresponding to each group in each rectangular frame diagram to form each group diagram; Save each group of images locally.
7. The method for generating a fetal position assembly distribution diagram according to claim 6, characterized in that: The assembly information includes the name and weight of the assembly.
8. The method for generating a fetal position assembly distribution diagram according to claim 6, characterized in that: The steps of marking the information corresponding to each group in each rectangular frame diagram are: Set the upper and lower limits and traversal step length of the font size of the assembly information; Initialize the font size of the assembly information to the lower limit; Get the length of the font and compare it with the length of the rectangle; If the length of the font is less than the length of the rectangular frame diagram, increase the font size of the assembly information font based on the traversal step length, and repeat the previous step until the length of the font is greater than the length of the rectangular frame diagram; Arrange all font sizes that meet the requirement that the length of the font is less than the length of the rectangular frame from large to small, and select one of the font sizes based on the clarity requirement.
9. The method for generating a fetal position assembly distribution diagram according to claim 1, characterized in that: After the span-to-span fetal position diagram and each set of vertical diagrams are imported into the same table, the size of the span-to-span fetal position diagram is first adjusted to restore its actual size, and then each set of vertical diagrams is moved to the corresponding fetal position in the span-to-span fetal position diagram based on the production plan.
