Design description drawing typesetting method and device, equipment and storage medium
By storing the data to be drawn in a structured manner and recording its coordinate interval information, in the layout of the design description drawings, viewport adjustment technology is used to solve the problem of insufficient space when the chart is close to the bottom of the drawing, and efficient layout and modification of the design description drawings are achieved.
Patent Information
- Application Number
- CN202510098578.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-23
AI Technical Summary
During the design description drawings, when the chart is located close to the bottom of the drawing, it is necessary to manually confirm whether the remaining space is sufficient. If the space is insufficient, a new column is needed to draw the chart, resulting in a long layout time for the design description and reducing the drawing efficiency of the design description drawings.
By storing the data to be drawn in a preset database, and drawing the data information in sequence according to the basic parameters of the drawing space, recording its coordinate interval information. Create multiple viewports in the layout space, and adjust the bottom coordinates of the viewport based on the basic parameters and coordinate interval information to determine the top coordinates of the next viewport until all data information is displayed in the viewport.
It realizes intelligent adjustment of the bottom coordinates of the viewport to ensure that the chart can be displayed properly on the drawing, with neat and beautiful layout, flexibly respond to the changes in the layout brought about by content modification, and improves the efficiency of drawing and modification of design description drawings.
Smart Images

Figure CN120030983A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of drawing typesetting, and more specifically, to a typesetting method, device, equipment and storage medium for design description drawings. Background Art
[0002] At present, 2D drawings are still the only legal deliverables in the engineering design phase. Most construction units also require the design unit to issue design instructions in the form of drawings, which together with the design drawings form a complete atlas for design delivery. However, during the design process, multiple rounds of design reviews and design changes usually have major changes to the drawings, including opinions on the adjustment of the design instructions. Due to the limited space of the designated drawing, sometimes a small change will lead to the entire design description being re-formatted, which takes much longer than the time to modify the design description.
[0003] In the traditional design description drawing process, designers are usually required to first complete the preparation of the design description content in Word or other editors, and then create a new single drawing in the CAD platform. Designers manually paste the text into CAD paragraph by paragraph, manually adjust the paragraph format of the text, and when it is necessary to insert a table or picture, the size and position of the chart need to be manually adjusted to ensure that there is appropriate space between the chart and the text to avoid excessive crowding.
[0004] However, when the chart is located close to the bottom of the drawing, it is necessary to manually confirm whether the remaining space can draw the entire chart. If there is insufficient space, it is necessary to draw the chart in another column to ensure a beautiful layout. This takes a lot of time in the layout of the design instructions, which greatly reduces the efficiency of drawing the design instruction drawings. Summary of the invention
[0005] In response to at least one defect or improvement need in the prior art, the present invention provides a method, device, equipment and storage medium for typeseting a design description drawing, which is used to solve the problem in the prior art that when the position of a chart is close to the bottom of the drawing, it is necessary to manually confirm whether the remaining space can draw the entire chart. If there is insufficient space, it is necessary to draw the chart in another column, which takes a lot of time in typeseting the design description and greatly reduces the efficiency of drawing the design description drawings.
[0006] To achieve the above object, according to a first aspect of the present invention, a typesetting method for a design description drawing is provided, comprising:
[0007] The input data information to be drawn is stored in a structured manner in a preset database;
[0008] Draw the data information to be drawn in sequence according to the basic parameters of the established drawing space, and record the coordinate interval information of all the data information to be drawn;
[0009] Several viewports are established in the layout space, and the bottom coordinates of the viewports are adjusted based on the basic parameters and coordinate interval information, and the top coordinates of the next viewport are determined until all the data information to be drawn is displayed in the established viewports, thereby obtaining the typeset design description drawings.
[0010] In a possible implementation, the data information to be drawn is drawn in sequence according to the basic parameters of the established drawing space, and the coordinate interval information of all the data information to be drawn is recorded, and the following further includes:
[0011] When the data information to be drawn is text data, the text data is drawn in a preset order according to the basic parameters of the established drawing space, and the coordinate interval information of each section of the text data after drawing is recorded;
[0012] When the data information to be drawn is chart data, the chart data is drawn according to the coordinate interval information of the previous data information to be drawn and the basic parameters of the drawing space, and the coordinate interval information of each chart data after drawing is recorded.
[0013] In a possible implementation, when the data information to be drawn is text data, the text data is drawn in a preset order according to the basic parameters of the established drawing space, and the coordinate interval information of each segment of the text data after drawing is recorded, further comprising:
[0014] Set the drawing parameters, column width, text height and line spacing in the drawing space, and use the origin as the drawing reference point;
[0015] Based on the drawing reference point, draw the text data segment by segment in the vertical direction according to the drawing parameters, column width, text height and line spacing;
[0016] The starting coordinate information of the first paragraph of text data is determined based on the drawing reference point, and the ending coordinate information of each paragraph of text data is determined according to the line spacing and the number of paragraphs of text data, and the coordinate interval information of each paragraph of text data is recorded.
[0017] In a possible implementation, when the data information to be drawn is chart data, the chart data is drawn according to the coordinate interval information of the previous data information to be drawn and the basic parameters of the drawing space, and the coordinate interval information of each chart data after drawing is recorded, further comprising:
[0018] Adjust the width of chart information that exceeds the column width to within the column width range;
[0019] Determine the insertion coordinate information of the chart information according to the termination coordinate information of the previous data information to be drawn;
[0020] Inserting chart information based on the insertion coordinate information, and retaining a preset gap height between the chart information and the preceding and following data information to be drawn;
[0021] After inserting all chart information, record the coordinate interval information of all chart data.
[0022] In a possible implementation, a plurality of viewports are established in the layout space, and the bottom coordinates of the viewports are adjusted based on the basic parameters and the coordinate interval information, and the top coordinates of the next viewport are determined until all the data information to be drawn is displayed in the established viewports, and the layout design description drawings are obtained, which also includes:
[0023] A drawing frame is established based on the drawing parameters, a plurality of viewports are established in the drawing frame, a first preset vertex of a first viewport is aligned with a drawing reference point, and a top coordinate of the first viewport is recorded;
[0024] Set the maximum viewport height, adjust the viewport bottom coordinates according to the viewport maximum height and coordinate interval information, and determine the next viewport top coordinates according to the adjusted viewport bottom coordinates;
[0025] When the number of viewports exceeds the threshold of the number of viewports that can be accommodated by the drawing frame, the drawing frame and the view are re-established until all the data information to be drawn is displayed in the established viewports, thereby obtaining a typeset design description drawing.
[0026] In a possible implementation, the maximum height of the viewport is set, and the viewport bottom coordinates are adjusted according to the maximum height of the viewport and the coordinate interval information, and further include:
[0027] When the viewport bottom coordinates are within the coordinate interval of the text information, adjust the viewport bottom coordinates to the coordinates at the end of the text line where it is located;
[0028] When the viewport bottom coordinates are in the front gap coordinate interval of the chart information or the coordinate interval of the chart information, adjust the viewport bottom coordinates to the front gap start coordinates of the current chart;
[0029] When the viewport bottom coordinates are in the back gap coordinate interval of the chart information, the viewport bottom coordinates are adjusted to the end coordinates of the current chart.
[0030] In a possible implementation, determining the next viewport top coordinate according to the adjusted viewport bottom coordinate further includes:
[0031] When the adjusted viewport bottom coordinates are within the coordinate interval of the text information, the next viewport top coordinates are the adjusted current viewport bottom coordinates;
[0032] When the adjusted viewport bottom coordinates are located in the front gap coordinate interval of the chart information or the coordinate interval of the chart information, the next viewport top coordinates are the starting coordinates of the current chart information;
[0033] When the adjusted viewport bottom coordinates are located in the back gap coordinate interval of the chart information, the next viewport top coordinates are the back gap end coordinates of the chart information.
[0034] According to a second aspect of the present invention, there is also provided a typesetting device for a design specification drawing, comprising:
[0035] An input storage module is configured to store the input data information to be drawn in a structured manner into a preset database;
[0036] A data drawing module, which is configured to draw the data information to be drawn in sequence according to the basic parameters of the established drawing space, and record the coordinate interval information of all the data information to be drawn;
[0037] The viewport adjustment module is configured to establish several viewports in the layout space, and adjust the bottom coordinates of the viewport based on the basic parameters and coordinate interval information, and determine the top coordinates of the next viewport until all the data information to be drawn is displayed in the established viewport, thereby obtaining the layout design description drawings.
[0038] According to the third aspect of the present invention, there is also provided a typesetting device for design description drawings, which includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of any one of the above-mentioned typeset methods for design description drawings.
[0039] According to a fourth aspect of the present invention, there is also provided a storage medium storing a computer program executable by an access authentication device, wherein when the computer program runs on the access authentication device, the access authentication device executes the steps of any one of the above-mentioned methods for typeset design description drawings.
[0040] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0041] The present invention provides a typesetting method for a design description drawing. By recording the coordinate interval information of the data information to be drawn, it is determined whether the space at the insertion position of the chart is sufficient. When it is detected that the chart position is close to the bottom of the drawing and the space is insufficient, the coordinates of the bottom of the viewport can be intelligently adjusted to ensure that all the data information to be drawn can be properly displayed on the drawing, and the layout is neat and beautiful. In addition, by establishing multiple viewports in the layout space and adjusting the viewport position according to the basic parameters and the coordinate interval information, the typesetting changes caused by the content modification can be flexibly responded to, and the integrity and consistency of the drawing content can be ensured. If it is necessary to adjust the typesetting design description drawing, the data information to be adjusted can be quickly drawn based on the typesetting drawing, and the typesetting can be automatically updated, without the need to re-do the cumbersome typesetting work, which greatly shortens the adjustment time and improves the work efficiency. At the same time, there is no need to manually confirm whether the remaining space can draw the entire chart, and the cumbersome process of manually modifying the design description drawing and adjusting the typesetting of the drawing is avoided, which reduces the workload required for manual modification and improves the drawing efficiency and modification efficiency of the design description drawing. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A schematic diagram of a flow chart of an embodiment of a typesetting method for a design description drawing provided by the present invention;
[0044] Figure 2 A schematic diagram of a flow chart of an embodiment of drawing text information provided by the present invention;
[0045] Figure 3 A schematic diagram of a flow chart of an embodiment of drawing chart information provided by the present invention;
[0046] Figure 4 The present invention provides Figure 1 A schematic flow chart of an embodiment of step S103;
[0047] Figure 5 A schematic diagram of a flow chart of an embodiment of adjusting the viewport bottom coordinates provided by the present invention;
[0048] Figure 6 A schematic diagram of a flow chart of an embodiment of determining the top coordinates of the next viewport provided by the present invention;
[0049] Figure 7 A schematic structural diagram of an embodiment of a typesetting device for design description drawings provided by the present invention;
[0050] Figure 8 A schematic diagram of the structure of a typesetting device for a design description drawing provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0052] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0053] The present invention provides a typesetting method, device, equipment and storage medium for design description drawings, which are described below respectively.
[0054] See also Figure 1 , Figure 1 A schematic flow chart of an embodiment of a typesetting method for a design description drawing provided by the present invention. In a specific embodiment of the present invention, a typesetting method for a design description drawing is disclosed, comprising:
[0055] S101, storing the input data information to be drawn in a structured manner in a preset database;
[0056] S102, drawing the data information to be drawn in sequence according to the basic parameters of the established drawing space, and recording the coordinate interval information of all the data information to be drawn;
[0057] S103, establishing several viewports in the layout space, and adjusting the bottom coordinates of the viewports and determining the top coordinates of the next viewport based on the basic parameters and the coordinate interval information until all the data information to be drawn is displayed in the established viewports, thereby obtaining the typeset design description drawings.
[0058] In the above embodiment, it is first necessary to complete the input of the design description text, pictures, tables and other contents in the design description input interface based on the CAD platform. It can be understood that the CAD platform generally refers to a computer-aided design platform, which uses computers and their graphics equipment to help designers perform design work and complete calculations, information storage and mapping. The data information to be drawn in the present invention can include text, tables, pictures and other information, which can be structured and stored in a database, and can be repeatedly read and modified by computer programs. The input content of the design description should be recognizable by the computer and can be parsed into basic graphics elements and drawn in the CAD platform. It should be noted that the design description can also be carried out using other document editing software such as Word, and supporting research and development document parsing functions so that the document content can be recognized by the computer.
[0059] Draw the text data in the data information to be drawn according to the basic parameters of the pre-established drawing space. The text data can include titles, paragraph text, annotations, etc. At each step of drawing, the starting coordinate information of each paragraph of text data needs to be automatically recorded to ensure the accurate positioning of the text on the drawing, which is convenient for the subsequent insertion and adjustment of content. It should be noted that the CAD platform has a drawing space, which can draw text, pictures, tables and other graphic elements.
[0060] The text layout can be automatically analyzed based on the starting coordinate information of the first text data. When it is necessary to insert chart data, the chart (such as graphs, tables, flow charts, etc.) in the data information to be drawn can be inserted into the drawing space to ensure the visual harmony and logical coherence between the chart and the text content. At the same time, the coordinate interval information of these chart data, including their position, size and relative relationship with other elements, is recorded to provide data support for subsequent layout adjustments.
[0061] In the layout space, several viewports (i.e., different display areas on the drawing) are established according to the design requirements to display different parts or different proportions of the design content. Based on the basic parameters and the coordinate interval information recorded in S102, the bottom coordinates of each viewport are automatically adjusted, and the top coordinates of the next viewport are dynamically determined to ensure that all the data information to be drawn can be displayed completely and orderly in the established viewport, which not only improves the typesetting efficiency, but also ensures the overall beauty of the drawing and the clear communication of information, and finally obtains the typesetting design description drawing.
[0062] If further adjustments are needed to the design description drawings after preliminary typeset, such as modifying text content, adjusting chart position or size, adding additional instructions, etc., you can operate through the interface or directly enter the data information to be adjusted. According to these adjustment instructions, the adjusted content is automatically recalculated and drawn to generate the target design description drawings, ensuring the flexibility of the design process and the customization requirements of the final drawings, thereby improving the professionalism of the design and customer satisfaction.
[0063] Compared with the prior art, the layout method of a design description drawing provided in this embodiment records the coordinate interval information of the data information to be drawn, determines whether the space at the insertion position of the chart is sufficient, and when it is detected that the chart position is close to the bottom of the drawing and the space is insufficient, the coordinates of the bottom of the viewport can be intelligently adjusted to ensure that all the data information to be drawn can be properly displayed on the drawing, and the layout is neat and beautiful. And by establishing multiple viewports in the layout space and adjusting the viewport position according to the basic parameters and the coordinate interval information, it is possible to flexibly respond to the layout changes caused by content modification, and ensure the integrity and consistency of the drawing content. If it is necessary to adjust the layout of the design description drawing, the data information to be adjusted can be quickly drawn based on the layout drawing, and the layout can be automatically updated, without the need to re-do the tedious layout work, which greatly shortens the adjustment time and improves the work efficiency. At the same time, there is no need to manually confirm whether the remaining space can draw the entire chart, and avoids the tedious process of manually modifying the design description drawing and adjusting the layout of the drawing, which reduces the workload required for manual modification and improves the efficiency of drawing and modifying the design description drawing.
[0064] In some embodiments of the present invention, the data information to be drawn is drawn in sequence according to the basic parameters of the established drawing space, and the coordinate interval information of all the data information to be drawn is recorded, and further includes:
[0065] When the data information to be drawn is text data, the text data is drawn in a preset order according to the basic parameters of the established drawing space, and the coordinate interval information of each section of the text data after drawing is recorded;
[0066] When the data information to be drawn is chart data, the chart data is drawn according to the coordinate interval information of the previous data information to be drawn and the basic parameters of the drawing space, and the coordinate interval information of each chart data after drawing is recorded.
[0067] See also Figure 2 , Figure 2 A flowchart of an embodiment of drawing text information provided by the present invention. In some embodiments of the present invention, when the data information to be drawn is text data, the text data is drawn in a preset order according to the basic parameters of the established drawing space, and the coordinate interval information of each segment of text data after drawing is recorded, and further includes:
[0068] S201, setting the drawing parameters, column width, character height and line spacing in the drawing space, and taking the origin as the drawing reference point;
[0069] S202, drawing text data segment by segment in the vertical direction according to the drawing parameters, column width, text height and line spacing based on the drawing reference point;
[0070] S203, determining the starting coordinate information of the first segment of text data based on the drawing reference point, and determining the starting coordinate information of each segment of text data according to the line spacing and the number of segments of text data.
[0071] In the above embodiment, the drawing sheet should be selected as A2 sheet (594mm*420mm) according to the business, the number of columns is set to two, the column width is set to 225mm, and the number of columns N in each drawing should be determined in advance according to business needs, so as to determine the appropriate column width. The display ratio of the viewport is 1:1, the rectangular viewport width is equal to the column width, and at the same time, the drawing width of the text content is equal to the viewport width, so that the text content is fully filled in the viewport range; the display ratio of the viewport can also adopt other ratios, and the corresponding drawing width should be equal to "viewport width / viewport ratio". The text height and line spacing can be set according to the specific situation. It only needs to set the text height and line spacing before drawing, and the present invention does not make further restrictions on this.
[0072] It should be noted that the drawing space in the present invention starts drawing with the origin (0, 0) as the reference point, and draws from top to bottom along the vertical direction. In addition, the coordinates mentioned in the present invention generally refer to the ordinate. In the embodiment of the present invention, the base point of the viewport can use any coordinates, and the vertical coordinate interval recorded in the subsequent steps should be accumulated starting from the vertical coordinate of the base point; the content of the design description can be drawn along other directions, and the coordinates recorded in the subsequent steps should be defined as the length accumulated along the drawing direction.
[0073] See also Figure 3 , Figure 3 A flow chart of an embodiment of drawing chart information provided by the present invention. In some embodiments of the present invention, when the data information to be drawn is chart data, the chart data is drawn according to the coordinate interval information of the previous data information to be drawn and the basic parameters of the drawing space, and the coordinate interval information of each chart data after drawing is recorded, and further includes:
[0074] S301, adjusting the width of the chart information exceeding the column width to within the column width range;
[0075] S302, determining the insertion coordinate information of the chart information according to the termination coordinate information of the previous data information to be drawn;
[0076] S303, inserting chart information based on the insertion coordinate information, and retaining a preset gap height between the chart information and the preceding and following data information to be drawn;
[0077] S304. After inserting all the chart information, record the coordinate interval information of all the chart data.
[0078] In the above embodiment, it is first checked whether the width of each chart information exceeds the maximum allowed width of the current column. For any chart that exceeds the limit, a scaling algorithm will be automatically applied to reduce the width of the chart proportionally until it fully fits the width limit of the column while maintaining the readability and clarity of the chart content as much as possible.
[0079] After determining the width that the chart can adapt to, the specific position coordinates where the chart should be inserted will be calculated based on the previous data information to be drawn. This process needs to consider the continuity of text typesetting to ensure that the original text flow will not be destroyed after the chart is inserted, while maintaining the overall visual balance of the page. It should be noted that the previous data information to be drawn can be text data or chart data, and the first data information to be drawn is generally text data rather than chart data.
[0080] Using the coordinate information calculated in the previous step, the chart information is accurately inserted into the drawing space. In order to avoid visual conflicts between the chart and adjacent text information, a preset gap height is automatically added between the chart and the previous and next text. This gap not only improves the readability of the page, but also reserves space for possible editing adjustments.
[0081] Each time a chart is drawn, the data of the chart needs to be determined. After all the chart information is inserted into the drawing space as required, all the inserted charts and text information will be traversed, and their coordinate range information will be recorded in detail, including key parameters such as starting coordinates, width, height, etc. This information will be saved in an easily retrievable data structure so that specific charts or text content can be quickly located during subsequent page editing, print output or data reference.
[0082] In a specific embodiment of the present invention, the chart width does not exceed 100% of the column width and is drawn according to the original width. When the chart width exceeds 100% of the column width, the chart is compressed according to 100% of the column width. When the chart is large and inconvenient to compress, the entire drawing can be set separately to draw the chart.
[0083] It should be noted that when recording the text coordinate interval for the first time, the text's starting vertical coordinate is the vertical coordinate of the drawing reference point, and the text's ending vertical coordinate is "starting vertical coordinate + number of rows * line spacing". When recording the text coordinates for the second time and thereafter, the text's starting vertical coordinate is the ending coordinate of the space after the previous chart, and the text's ending vertical coordinate is "starting vertical coordinate + number of rows * line spacing". In addition, when the text paragraph is drawn with equal line spacing, the text drawing height can be calculated by the number of rows. When other control methods are used, the calculation method of the text drawing height should be clarified.
[0084] The compression strategy of the chart can be adjusted, and the compression strategy of the chart is proposed according to the requirements of aesthetic typesetting. In this embodiment, the drawing process should record the vertical coordinate intervals of the gaps and the chart, the vertical coordinate interval of the gap before the chart, the starting coordinates are the ending coordinates of the previous paragraph of text, and the ending coordinates are "starting coordinates + gap height", the vertical coordinate interval of the chart, the starting coordinates are the ending coordinates of the gap before the chart, and the ending coordinates are "starting coordinates + chart drawing height", and the vertical coordinate interval of the gap after the chart, the starting coordinates are the ending coordinates of the chart, and the ending coordinates are "starting coordinates + gap height". It should be noted that when charts appear continuously, assuming that there is a text paragraph with a height of 0 between the charts, and other content besides the charts is inserted according to business needs, its distribution coordinate interval should also be clarified.
[0085] See also Figure 4 , Figure 4 The present invention provides Figure 1 In some embodiments of the present invention, a plurality of viewports are established in the layout space, and the bottom coordinates of the viewports are adjusted based on the basic parameters and the coordinate interval information, and the top coordinates of the next viewport are determined until all the data information to be drawn is displayed in the established viewports, and the layout design description drawings are obtained, which also includes:
[0086] S401, establishing a drawing frame based on drawing parameters, establishing a plurality of viewports in the drawing frame, aligning a first preset vertex of a first viewport with a drawing reference point, and recording the top coordinates of the first viewport;
[0087] S402, setting the maximum height of the viewport, adjusting the viewport bottom coordinate according to the viewport maximum height and the coordinate interval information, and determining the next viewport top coordinate according to the adjusted viewport bottom coordinate;
[0088] S403: When the number of viewports exceeds the threshold of the number of viewports that can be accommodated by the drawing frame, the drawing frame and the view are re-established until all the data information to be drawn is displayed in the established viewports, thereby obtaining a typeset design description drawing.
[0089] In the above embodiment, a drawing frame is drawn in the layout space. The drawing frame is the visual boundary of the design description drawing to ensure that the content is neat and orderly. Inside the drawing frame, several viewports are created according to the design requirements. The viewport is a window that displays the content of the drawing and can be scaled and positioned independently. A preset vertex (usually the upper left corner) of the first viewport is aligned with the drawing reference point (such as the upper left corner of the drawing frame) to maintain the consistency and accuracy of the layout. The top coordinates of the first viewport at this time are recorded as the reference for subsequent viewport adjustments.
[0090] According to the design requirements and the density of the content, setting the maximum height of each viewport helps control the information density within the viewport to avoid overcrowding or sparse content. According to the coordinate interval information of the data to be drawn, the bottom coordinates of the current viewport are dynamically adjusted to ensure that the viewport can fully contain a part of the data. At the same time, according to the adjusted bottom coordinates of the viewport, the top coordinates of the next viewport are calculated to ensure seamless connection between viewports and avoid information loss or overlap.
[0091] As the data is gradually filled, the number of viewports established in the current frame is monitored. When the number of viewports reaches or exceeds the threshold of the number of viewports that the frame can accommodate, it indicates that additional measures need to be taken. When the accommodation limit is reached, one or more new frames are recalculated and established based on the amount of remaining data to be drawn and the coordinate interval information. In the new frame, steps S401 and S402 are repeated to continue creating and adjusting viewports until all the data information to be drawn is reasonably allocated to each viewport. Finally, all frames and the viewports within them are integrated together to form a design description drawing with neat layout and complete information. Ensure that the transition between frames and viewports is natural and smooth, in line with design specifications and aesthetic requirements.
[0092] It should be noted that after the drawing size is determined, the viewport height will be restricted. If the drawing is A2, then when the viewport is arranged in the drawing, it is limited by the A2 drawing size and the viewport height has a maximum value of 370mm. Furthermore, the maximum viewport height is related to the blank height reserved above and below the viewport. The blank height is determined according to the requirements of aesthetic typesetting, and then the maximum viewport height is determined.
[0093] See also Figure 5 , Figure 5 A schematic diagram of a flow chart of an embodiment of adjusting the viewport bottom coordinates provided by the present invention. In some embodiments of the present invention, the maximum viewport height is set, and the viewport bottom coordinates are adjusted according to the viewport maximum height and coordinate interval information, and further includes:
[0094] S501, when the viewport bottom coordinate is within the coordinate interval of the text information, the viewport bottom coordinate is adjusted to the coordinate at the end of the text line where the viewport bottom coordinate is located;
[0095] S502, when the viewport bottom coordinates are located in the front gap coordinate interval of the chart information or the coordinate interval of the chart information, adjusting the viewport bottom coordinates to the front gap start coordinates of the current chart;
[0096] S503: When the viewport bottom coordinate is located in the back gap coordinate interval of the chart information, the viewport bottom coordinate is adjusted to the end coordinate of the current chart.
[0097] In the above embodiment, if the bottom coordinates of the viewport do fall within the text information area, in order to avoid truncation of text or excessive blank space in the viewport, the bottom coordinates of the viewport need to be adjusted to the coordinates at the end of the line of text, which means that the viewport will be expanded to include the entire paragraph or line of text to ensure the integrity and readability of the information.
[0098] If the viewport bottom coordinates are within the chart front gap, in order to maintain the integrity and visual neatness of the chart, the viewport bottom coordinates should be adjusted to the current chart front gap start coordinates, which can ensure that the chart is displayed from the top or near the top of the viewport to avoid unnecessary front gap division of the chart. If the viewport bottom coordinates are directly within the chart information area, in order to avoid discontinuous display of chart information, the entire chart needs to be displayed. Therefore, the viewport bottom coordinates are adjusted to the current chart front gap start coordinates, and the chart information is displayed in one viewport.
[0099] When the viewport bottom coordinates are located exactly in the back gap coordinate interval of the chart information, and this position is close to the end coordinates of the chart (that is, the viewport is almost "cut" to the end of the chart), in order to ensure the integrity of the chart information, the viewport bottom coordinates should be adjusted to the end coordinates of the current chart, and the viewport will be expanded to include the entire chart, even if the viewport may be slightly larger than the preset maximum height. At this time, you may need to re-evaluate and adjust the viewport maximum height setting, or consider making other adjustments in the layout to accommodate this slightly larger viewport.
[0100] See also Figure 6 , Figure 6 A schematic diagram of a flow chart of an embodiment of determining the next viewport top coordinate provided by the present invention. In some embodiments of the present invention, determining the next viewport top coordinate according to the adjusted viewport bottom coordinate further includes:
[0101] S601, when the adjusted viewport bottom coordinates are within the coordinate interval of the text information, the next viewport top coordinates are the adjusted current viewport bottom coordinates;
[0102] S602, when the adjusted viewport bottom coordinates are located in the front gap coordinate interval of the chart information or the coordinate interval of the chart information, the next viewport top coordinates are the starting coordinates of the current chart information;
[0103] S603: When the adjusted viewport bottom coordinates are located in the back gap coordinate interval of the chart information, the next viewport top coordinates are the back gap end coordinates of the chart information.
[0104] In the above embodiment, when the adjusted bottom coordinates of the current viewport happen to be within the coordinate interval of the text information, in order to maintain the continuity of the text information, the top coordinates of the next viewport should be directly set to the adjusted bottom coordinates of the current viewport, which can ensure that the text information will not be divided by the viewport and the reader can read smoothly.
[0105] When the adjusted bottom coordinates of the current viewport are located in the front gap coordinate interval of the chart information or the coordinate interval of the chart information, in order to maintain the integrity and clarity of the chart information, the top coordinates of the next viewport should be set to the starting coordinates of the current chart information. Even if the bottom coordinates of the current viewport are in the front gap of the chart, the gap will be skipped and the display will continue from the beginning of the chart. If the bottom coordinates of the current viewport are directly in the chart information, this rule also applies to ensure that the chart is not accidentally truncated.
[0106] Understandably, when working with chart information, it is important to distinguish between leading and trailing padding and understand their impact on viewport layout. Leading padding usually refers to the area in front of the chart that is used to guide the eye or provide additional space, while trailing padding may be used to separate charts or provide a visual buffer.
[0107] When the adjusted bottom coordinates of the current viewport are in the back gap coordinate interval of the chart information, in order to maintain the neatness of the layout and the coherence of the information, the top coordinates of the next viewport should be set to the end coordinates of the back gap of the chart information. The back gap of the chart will be skipped, and a new viewport will start from the next logical information point (which may be another chart, text paragraph or page separator).
[0108] In this embodiment, the content of a single drawing is divided into two columns, and each drawing can be arranged with two viewports. When the number of viewports exceeds two, a new drawing needs to be created; if the content of a single drawing is divided into N columns, when the number of viewports in the drawing exceeds N, a new drawing needs to be created.
[0109] In this embodiment, after the last viewport is created, all the design description contents in the drawing space are displayed in the viewport of the layout space, and the automatic typesetting and generation of the design description is completed. The initial value of the viewport bottom coordinate calculated according to the maximum viewport height, if the initial value of the viewport bottom coordinate is greater than the coordinate interval of any data to be drawn, the last viewport is created at this time; when the last viewport is created, the viewport bottom coordinate adopts the maximum value of the interval coordinate of the data to be drawn.
[0110] In this embodiment, under the requirements of the design review opinion or the external review opinion, the design description adjustment includes adding text, modifying text, adding charts, deleting charts, where charts include tables, pictures, and schematic diagrams, and the content is modified and entered in the design description input interface. The design description adjustment is not limited to input in the design input interface, and the design description content can also be automatically modified by the program, or the design description content can be adjusted by other means. It should be noted that the modified content of the design description should be recognized and stored by the computer.
[0111] In this embodiment, updating the design description drawing requires deleting all contents in the original drawing drawing space and layout space, and then repeating the above steps to draw, and automatically typeset to generate a new drawing again; it is understandable that the design description drawing can be updated in other ways, such as making local adjustments to the content changes.
[0112] In order to better implement the typesetting method of the design description drawing in the embodiment of the present invention, based on the typesetting method of the design description drawing, correspondingly, please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of an embodiment of a layout device for design description drawings provided by the present invention. The embodiment of the present invention provides a layout device 700 for design description drawings, including:
[0113] An input storage module 710 is configured to store the input data information to be drawn in a structured manner in a preset database;
[0114] A data drawing module 720, which is configured to draw the data information to be drawn in sequence according to the basic parameters of the established drawing space, and record the coordinate interval information of all the data information to be drawn;
[0115] The viewport adjustment module 730 is configured to establish several viewports in the layout space, and adjust the bottom coordinates of the viewport based on the basic parameters and coordinate interval information and determine the top coordinates of the next viewport until all the data information to be drawn is displayed in the established viewport, thereby obtaining the layout design description drawings.
[0116] It should be noted here that: the device 700 provided in the above embodiment can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above method embodiments, which will not be repeated here.
[0117] See also Figure 8 , Figure 8A schematic diagram of the structure of a layout device for design description drawings provided by an embodiment of the present invention. Based on the layout method for design description drawings, the present invention also provides a layout device for design description drawings. The layout device for design description drawings can be a computing device such as a mobile terminal, a desktop computer, a notebook, a palm computer, and a server. The layout device 800 for design description drawings includes a processor 810, a memory 820, and a display 830. Figure 8 Only some components of the typesetting device for design specification drawings are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0118] In some embodiments, the memory 820 may be an internal storage unit of the typesetting device 800 for design description drawings, such as a hard disk or memory of the typesetting device 800 for design description drawings. In other embodiments, the memory 820 may also be an external storage device of the typesetting device 800 for design description drawings, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the typesetting device 800 for design description drawings. Further, the memory 820 may also include both an internal storage unit and an external storage device of the typesetting device 800 for design description drawings. The memory 820 is used to store application software and various data installed in the typesetting device 800 for design description drawings, such as program codes of the typesetting device 800 for design description drawings. The memory 820 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a layout program 840 for design description drawings is stored in the memory 820 , and the layout program 840 for design description drawings can be executed by the processor 810 , thereby implementing the layout method for design description drawings of various embodiments of the present application.
[0119] In some embodiments, the processor 810 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 820, such as executing a typesetting method for design specification drawings.
[0120] In some embodiments, the display 830 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 830 is used to display information on the layout device 800 of the design specification drawing and to display a visual user interface. The components 810-830 of the layout device 800 of the design specification drawing communicate with each other via a system bus.
[0121] In one embodiment, when the processor 810 executes the design description drawing layout program 840 in the memory 820, the steps in the above design description drawing layout method are implemented.
[0122] This embodiment further provides a computer-readable storage medium on which a design description drawing layout program 840 is stored. When the design description drawing layout program 840 is executed by a processor, the following steps are implemented:
[0123] The input data information to be drawn is stored in a structured manner in a preset database;
[0124] Draw the data information to be drawn in sequence according to the basic parameters of the established drawing space, and record the coordinate interval information of all the data information to be drawn;
[0125] Several viewports are established in the layout space, and the bottom coordinates of the viewports are adjusted based on the basic parameters and coordinate interval information, and the top coordinates of the next viewport are determined until all the data information to be drawn is displayed in the established viewports, thereby obtaining the typeset design description drawings.
[0126] In summary, the layout method of a design description drawing provided by the present invention records the coordinate interval information of the data information to be drawn, determines whether the space at the insertion position of the chart is sufficient, and when it is detected that the chart position is close to the bottom of the drawing and the space is insufficient, the coordinates of the bottom of the viewport can be intelligently adjusted to ensure that all the data information to be drawn can be properly displayed on the drawing, and the layout is neat and beautiful. And by establishing multiple viewports in the layout space, and adjusting the viewport position according to the basic parameters and the coordinate interval information, it is possible to flexibly respond to the layout changes caused by content modification, and ensure the integrity and consistency of the drawing content. If it is necessary to adjust the layout of the design description drawing, the data information to be adjusted can be quickly drawn based on the layout drawing, and the layout can be automatically updated, without the need to re-do the cumbersome layout work, which greatly shortens the adjustment time and improves the work efficiency. At the same time, there is no need to manually confirm whether the remaining space can draw the entire chart, and avoids the cumbersome process of manually modifying the design description drawing and adjusting the layout of the drawing, reducing the workload required for manual modification, and improving the efficiency of drawing and modifying the design description drawing.
[0127] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0128] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0129] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0133] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0134] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0135] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A typesetting method for a design description drawing, characterized in that: include: The input data information to be drawn is stored in a structured manner in a preset database; Draw the data information to be drawn in sequence according to the basic parameters of the established drawing space, and record the coordinate interval information of all the data information to be drawn; A plurality of viewports are established in the layout space, and the bottom coordinates of the viewports are adjusted based on the basic parameters and the coordinate interval information, and the top coordinates of the next viewport are determined until all the data information to be drawn is displayed in the established viewports, thereby obtaining a typeset design description drawing.
2. The typesetting method of the design description drawing according to claim 1, characterized in that: The step of sequentially drawing the data information to be drawn according to the basic parameters of the established drawing space and recording the coordinate interval information of all the data information to be drawn also includes: When the data information to be drawn is text data, the text data is drawn in a preset order according to the basic parameters of the established drawing space, and the coordinate interval information of each section of the text data after drawing is recorded; When the data information to be drawn is chart data, the chart data is drawn according to the coordinate interval information of the previous data information to be drawn and the basic parameters of the drawing space, and the coordinate interval information of each chart data after drawing is recorded.
3. The typesetting method of design description drawings according to claim 2, characterized in that: When the data information to be drawn is text data, the text data is drawn in a preset order according to the basic parameters of the established drawing space, and the coordinate interval information of each section of the text data after drawing is recorded, and further includes: Setting the drawing parameters, column width, character height and line spacing in the drawing space, and taking the origin as the drawing reference point; Based on the drawing reference point, the text data is drawn section by section in the vertical direction according to the drawing parameters, column width, text height and line spacing; The starting coordinate information of the first paragraph of text data is determined based on the drawing reference point, and the ending coordinate information of each paragraph of text data is determined according to the line spacing and the number of paragraphs of text data, and the coordinate interval information of each paragraph of text data is recorded.
4. The typesetting method of design description drawings according to claim 3, characterized in that: When the data information to be drawn is chart data, the chart data is drawn according to the coordinate interval information of the previous data information to be drawn and the basic parameters of the drawing space, and the coordinate interval information of each chart data after drawing is recorded, and further includes: Adjusting the width of the chart information exceeding the column width to fall within the column width range; Determine the insertion coordinate information of the chart information according to the termination coordinate information of the previous data information to be drawn; Inserting the chart information based on the insertion coordinate information, and retaining a preset gap height between the chart information and the preceding and following data information to be drawn; After inserting all chart information, record the coordinate interval information of all chart data.
5. The typesetting method of design description drawings according to claim 4, characterized in that: The step of establishing a plurality of viewports in the layout space, adjusting the bottom coordinates of the viewports based on the basic parameters and the coordinate interval information, and determining the top coordinates of the next viewport until all the data information to be drawn is displayed in the established viewports, and obtaining a typeset design description drawing, further includes: Establishing a drawing frame based on the drawing frame parameters, establishing a plurality of viewports in the drawing frame, aligning a first preset vertex of a first viewport with the drawing reference point, and recording the top coordinates of the first viewport; Setting the maximum height of the viewport, adjusting the viewport bottom coordinate according to the viewport maximum height and the coordinate interval information, and determining the next viewport top coordinate according to the adjusted viewport bottom coordinate; When the number of viewports exceeds the threshold of the number of viewports that can be accommodated by the drawing frame, the drawing frame and the view are re-established until all the data information to be drawn is displayed in the established viewports, thereby obtaining a typeset design description drawing.
6. The typesetting method of design description drawings according to claim 5, characterized in that: The setting of the maximum viewport height and adjusting the viewport bottom coordinates according to the maximum viewport height and the coordinate interval information also include: When the viewport bottom coordinates are within the coordinate interval of the text information, adjust the viewport bottom coordinates to the coordinates at the end of the text line where it is located; When the viewport bottom coordinates are in the front gap coordinate interval of the chart information or the coordinate interval of the chart information, adjust the viewport bottom coordinates to the front gap start coordinates of the current chart; When the viewport bottom coordinates are in the back gap coordinate interval of the chart information, the viewport bottom coordinates are adjusted to the end coordinates of the current chart.
7. The typesetting method of design description drawings according to claim 5, characterized in that: The method of determining the next viewport top coordinate according to the adjusted viewport bottom coordinate also includes: When the adjusted viewport bottom coordinates are within the coordinate interval of the text information, the next viewport top coordinates are the adjusted current viewport bottom coordinates; When the adjusted viewport bottom coordinates are located in the front gap coordinate interval of the chart information or the coordinate interval of the chart information, the next viewport top coordinates are the starting coordinates of the current chart information; When the adjusted viewport bottom coordinates are located in the back gap coordinate interval of the chart information, the next viewport top coordinates are the back gap end coordinates of the chart information.
8. A layout device for design specification drawings, characterized in that: include: An input storage module is configured to store the input data information to be drawn in a structured manner into a preset database; A data drawing module, which is configured to draw the data information to be drawn in sequence according to the basic parameters of the established drawing space, and record the coordinate interval information of all the data information to be drawn; The viewport adjustment module is configured to establish a plurality of viewports in the layout space, and adjust the bottom coordinates of the viewport based on the basic parameters and the coordinate interval information, and determine the top coordinates of the next viewport until all the data information to be drawn is displayed in the established viewport, thereby obtaining a typeset design description drawing.
9. A layout device for design specification drawings, characterized in that: It includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the typesetting method of the design description drawing according to any one of claims 1 to 7.
10. A storage medium, characterized in that: It stores a computer program executable by an access authentication device. When the computer program runs on the access authentication device, the access authentication device executes the steps of the typesetting method of the design description drawing according to any one of claims 1 to 7.
Citation Information
Cited By
Building design description rapid drawing method and system, electronic equipment and readable medium
CN122286863A