Methods and apparatus for drawing images in computer-aided drafting
Patent Information
- Application Number
- CN202211084242.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-09-06
AI Technical Summary
[0005]本发明的目的在于提供一种计算机辅助制图中图像的绘制方法及装置,以缓解了现有技术中存在的设计效率低的技术问题
Smart Images

Figure CN115471584B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided drafting technology, and in particular to a method and apparatus for drawing images in computer-aided drafting. Background Technology
[0002] Computer-aided drafting (CAD) technology is an indispensable application for every engineering designer in the modern era. CAD refers to the use of drafting software and computer hardware to achieve graphic display, assist in drawing, and design. With the development of modern science and production technology, the drawings are becoming increasingly complex, placing higher demands on both accuracy and speed, making manual drafting pale in comparison. The advent of computers and plotters, along with the development of related software technologies, has enabled CAD applications to not only meet the requirements of high precision and speed but also elevate modern drafting technology to an unprecedented level.
[0003] Currently, within the domestic landscape architecture industry, CAD software is widely used by landscape designers in large, medium, and small enterprises, as well as individual designers. The most commonly used are Tianzheng Architectural CAD and ZWCAD Architectural CAD. These two CAD software programs are geared towards a broad range of design industries, including mechanical design, architectural design, interior design, and advertising design. While their various drawing functions are generally applicable and can basically meet the needs of landscape design, the existing functions of these software programs are gradually losing competitiveness in terms of the speed and quality of drawing output for design projects in the face of the ever-changing landscape industry market. Therefore, we began exploring ways to enhance our competitiveness through secondary development of the software.
[0004] While CAD software platforms offer one-click pattern fill functions for garden paths in projects, these are only for straight paths or platforms. Filling curved paths in projects requires using ZW3D's built-in manual function, drawing lines one by one based on the path's shape, length, and width to achieve concentric paving and alignment of the offset lines. This simple paving fill style can be done manually, but for more complex designs... Figure 1 The more complex paving patterns shown have more steps and take a lot of time. Summary of the Invention
[0005] The purpose of this invention is to provide a method and apparatus for drawing images in computer-aided drafting, so as to alleviate the technical problem of low design efficiency in the prior art.
[0006] In a first aspect, the present invention provides a method for drawing images in computer-aided drafting, comprising:
[0007] Determine the target legend to be arrayed and the target array path. The target array path has radians, and the target legend corresponds to standard segments and discrete points.
[0008] Based on the standard segment, the target array path corresponding to the segment to be arrayed and the baseline of each segment to be arrayed are determined, wherein the baseline of the segment to be arrayed corresponding to the array path with curvature also has curvature.
[0009] For each baseline with curvature, the discrete points of the target legend are updated based on the baseline;
[0010] Based on the updated discrete points, the target legend is filled into the segment to be arrayed.
[0011] In an optional implementation, the standard segment includes a solid line, and the method further includes:
[0012] Determine the discrete precision;
[0013] The solid line is discretized into discrete points according to the discretization precision.
[0014] In an optional implementation, the standard segment includes an outer rectangle, which has a length and a width; determining the segment to be arrayed corresponding to the target array path and the baseline of each segment to be arrayed based on the standard segment includes:
[0015] Based on the width of the standard segment, the target array path is shifted left and right to obtain a multi-segment line;
[0016] The multi-segment line is divided according to the length of the standard segment to obtain the segment to be arrayed, wherein the arc with the smaller radius in the segment to be arrayed is the reference line of the array.
[0017] In an optional implementation, the needle updates discrete points of the target legend based on each radian baseline, including:
[0018] Align the standard segments with the corresponding segments to be arrayed according to the position of each baseline;
[0019] The discrete points of the standard segment are recalculated by taking the tangent direction of the baseline as the X-axis direction and the perpendicular direction as the Y-axis direction, and the X and Y values are recalculated to obtain the updated discrete points.
[0020] In an optional implementation, filling the target legend into the segment to be arrayed based on the updated discrete points includes:
[0021] Connect the updated discrete points with lines to obtain the arrayed image.
[0022] In an optional implementation, it further includes:
[0023] Select the blocks in the drawing;
[0024] Determine the attribute information of the attribute block and match the attribute information with the header information of the table to be generated.
[0025] In an optional implementation, it further includes:
[0026] A table to be generated is generated based on a table class; the table to be generated includes an input area and table header information, the table header information being derived from a configuration file;
[0027] In response to an input operation on the input area, a modification interface is displayed, which is used to modify the image information corresponding to the item.
[0028] After confirming that the modifications to the table of contents are complete, store the table header information in the configuration file.
[0029] In a second aspect, the present invention provides an image drawing apparatus for computer-aided drafting, comprising:
[0030] The first determining module is used to determine the target legend to be arrayed and the target array path. The target array path has radians, and the target legend corresponds to standard segments and discrete points.
[0031] The second determining module is used to determine the array segment to be arrayed and the baseline of each array segment to be arrayed based on the standard segment, wherein the baseline of the array segment to be arrayed corresponding to the array path with curvature also has curvature.
[0032] An update module is used to update the discrete points of the target legend based on the baseline for each baseline with curvature;
[0033] A drawing module is used to fill the target legend into the segment to be arrayed based on the updated discrete points.
[0034] In an optional implementation, the standard segment comprises a solid line, and the device further includes a discrete module for:
[0035] Determine the discrete precision;
[0036] The solid line is discretized into discrete points according to the discretization precision.
[0037] In an optional implementation, the standard segment includes an outer rectangle, which has a length and a width; the second determining module is specifically used for:
[0038] Based on the width of the standard segment, the target array path is shifted left and right to obtain a multi-segment line;
[0039] The multi-segment line is divided according to the length of the standard segment to obtain the segment to be arrayed, wherein the arc with the smaller radius in the segment to be arrayed is the reference line of the array.
[0040] In an optional implementation, the update module is specifically used for:
[0041] Align the standard segments with the corresponding segments to be arrayed according to the position of each baseline;
[0042] The discrete points of the standard segment are recalculated by taking the tangent direction of the baseline as the X-axis direction and the perpendicular direction as the Y-axis direction, and the X and Y values are recalculated to obtain the updated discrete points.
[0043] In an optional implementation, the drawing module is specifically used for:
[0044] Connect the updated discrete points with lines to obtain the arrayed image.
[0045] In an optional implementation, a component module is also included, used for:
[0046] Select the blocks in the drawing;
[0047] Determine the attribute information of the attribute block and match the attribute information with the header information of the table to be generated.
[0048] In an optional implementation, the component module is further used for:
[0049] A table to be generated is generated based on a table class; the table to be generated includes an input area and table header information, the table header information being derived from a configuration file;
[0050] In response to an input operation on the input area, a modification interface is displayed, which is used to modify the image information corresponding to the item.
[0051] After confirming that the modifications to the table of contents are complete, store the table header information in the configuration file.
[0052] Thirdly, the present invention provides an electronic device, the electronic device including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0053] Memory, used to store computer programs;
[0054] When a processor executes a program stored in memory, it implements the steps of the method described in any of the foregoing embodiments.
[0055] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the methods described in the foregoing embodiments.
[0056] This invention provides a method and apparatus for drawing images in computer-aided drafting. The method involves: determining the target legend to be arrayed and the target array path; determining the segment to be arrayed corresponding to the target array path and the baseline of each segment based on a standard segment; updating the discrete points of the target legend based on each baseline with curvature; and filling the target legend into the segment to be arrayed based on the updated discrete points. This eliminates the tedious step of manually offsetting line segments according to the arc shape. Only a small standard segment of the paving pattern needs to be prepared in advance, and the center line or edge line of the arc-shaped path needs to be selected for one-click filling, achieving concentric paving of the arc-shaped path stone. Attached Figure Description
[0057] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0058] Figure 1 For computer-aided manufacturing Figure 1 One example;
[0059] Figure 2 A schematic flowchart illustrating a method for drawing images in computer-aided drafting, provided in an embodiment of this application;
[0060] Figure 3 Another example of computer-aided drafting provided in the embodiments of this application;
[0061] Figure 4 Another example of computer-aided drafting provided in the embodiments of this application;
[0062] Figure 5 Another example of computer-aided drafting provided in the embodiments of this application;
[0063] Figure 6 Another example of computer-aided drafting provided in the embodiments of this application;
[0064] Figure 7 Another example of computer-aided drafting provided in the embodiments of this application;
[0065] Figure 8Another example of computer-aided drafting provided in the embodiments of this application;
[0066] Figure 9 Another example of computer-aided drafting provided in the embodiments of this application;
[0067] Figure 10 Another example of computer-aided drafting provided in the embodiments of this application;
[0068] Figure 11 A schematic diagram of an image drawing device provided in an embodiment of this application;
[0069] Figure 12 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0071] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0072] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0073] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0074] Figure 2 This is a schematic flowchart illustrating a method for drawing images in computer-aided drafting, as provided in an embodiment of this application. Figure 2 As shown, the method may include the following steps:
[0075] S210, determine the target legend to be arrayed and the target array path. The target array path has radians, and the target legend corresponds to standard segments and discrete points.
[0076] The array is mainly used to create object copies arranged in a specified manner. In this embodiment, the specified manner includes arranging them according to the target array path.
[0077] The target legend is the object to be arrayed. The target legend can be paving, filling, primitives, or components, etc.
[0078] This standard segment can be a style of the target legend, such as a paving pattern. Paving pattern standard segments can be created in advance, and the paving standard segments are based on the width of the garden path to be filled, with no limit on the length.
[0079] The target array path can be a full arc or a partial arc. It is generally the center line of a road or the edges of the road.
[0080] These discrete points can be key points used to summarize the standard segment. For example, the number of discrete points can be determined by the discretization precision, which can be determined according to actual needs. For example, for standard segments with more complex structures, the discretization precision can be higher, while for standard segments with simple structures, the discretization precision can be lower. The complexity or simplicity of the structure is determined based on the types and number of graphics included in the standard segment.
[0081] The standard segment can include solid lines. The discretization precision can be determined first; then the solid lines can be discretized into discrete points according to the discretization precision.
[0082] S220, Based on the standard segment, determine the array segment to be arrayed corresponding to the target array path and the baseline of each array segment to be arrayed, wherein the baseline of the array segment to be arrayed corresponding to the array path with curvature also has curvature.
[0083] The array segment can refer to the area used to place object copies. In other words, the target array path can be divided into multiple segments based on the standard segment.
[0084] This baseline can be used to indicate the deformation of the segment to be arrayed relative to a standard segment.
[0085] S230 updates the discrete points of the target legend based on each baseline with curvature.
[0086] Based on the deformation of the baseline relative to the standard segment, the discrete points of the baseline relative to the target legend can be updated to obtain the deformed discrete points (i.e., the updated discrete points).
[0087] S240, based on the updated discrete points, fill the target legend into the segment to be arrayed.
[0088] The target legend is deformed based on the updated discrete points to obtain a deformed copy of the object.
[0089] Standard paving sections can be pre-made. The standard paving section is based on the width of the garden path to be filled, and the length is not limited. Then, select the array path (usually the center line of the road or the edge lines on both sides of the road), spacing (if the road needs to be wavy, i.e., different stones are separated, the spacing needs to be entered), and fitting accuracy (fitting accuracy for curved roads). After determining the array path, spacing, and fitting accuracy, if the selected path is the center line of the road, you can usually press the space bar to complete the layout step. This can eliminate the tedious step of manually offsetting line segments one by one according to the curved shape. You only need to prepare a small standard paving section in advance, select the center line or edge line of the curved garden path, and you can fill it with one click to achieve the concentric laying of stones in the curved garden path.
[0090] In some embodiments, the standard segment includes an outer rectangle, which has a length and a width; step S220 above may include the following steps:
[0091] Step 1): Based on the width of the standard segment, offset the target array path left and right to obtain a multi-segment line;
[0092] Step 2) Divide the multi-segment line according to the length of the standard segment to obtain the array segment. Among them, the arc with the smaller radius in the array segment is the baseline of the array. The left and right offset lines after division can be compared one by one. If there is an arc in both, the arc with the smaller radius is determined as the baseline of the array. The baselines of each segment are added together, and the sum is the total length of the array line. The total length divided by the length of the outer rectangle gives the number of standard segments in the array.
[0093] Based on this, step S230 above may specifically include the following steps:
[0094] Step 3) Align the standard segments with the corresponding segments to be arrayed according to the position of each baseline;
[0095] Step 4) Take the tangent direction of the baseline as the X-axis direction and the perpendicular direction as the Y-axis direction of the discrete points of the standard segment, and recalculate the X and Y values to obtain the updated discrete points.
[0096] Based on this, step S240 above may specifically include the following steps:
[0097] Step 5) Connect the updated discrete points with lines to obtain the arrayed image.
[0098] As an example, a first settings interface can be provided, in which the standard segment and the precision of the discrete parameters can be set. For example, such as... Figure 3 As shown, the first settings interface may include a standard segment selection control. Clicking this control will jump to the standard segment selection interface, such as... Figure 4As shown, the standard segment selection interface can be an image drawing interface, where pre-drawn graphics can be selected as standard segments, or standard segments can be drawn directly from the drawing interface. For example, the first setting interface can include a standard segment selection control, which can include a standard segment selection list providing alternative standard segments for selection. This first setting interface can be displayed during the drawing process after triggering the super loft control or function. The super loft function can be triggered via a shortcut key or command.
[0099] After determining the standard segment, you can also set the discretization precision. This precision can be the number of discrete points or the density of discrete points, etc.
[0100] In some embodiments, the discrete precision can also be set based on a standard segment. For example, the first setting interface may provide a discrete precision setting control; clicking this control will take you to the discrete setting interface, such as... Figure 5 As shown, the reference segment is rectangular. The discrete settings interface can be used as an image drawing interface, displaying the graphic of the standard segment and the initial discrete points corresponding to it. This interface allows users to increase or decrease the number of discrete points, and also move their positions. Adding or deleting discrete points can be done by deleting one or more selected points, adding points near or in the middle of one or more selected points, or adding or deleting points as a whole. For example, users can input a numerical value for the number of discrete points, and the system will automatically arrange the corresponding number of discrete points on the standard segment, such as evenly distributing them. Moving the position of discrete points allows users to drag them directly, or select a discrete point and input its coordinates. Constraints can be pre-configured for the position and number of discrete points. These constraints can include a maximum and minimum number of discrete points, and the requirement that the discrete point be on the graphic, etc. Constraints can be applied when setting the position and number of discrete points.
[0101] After determining the standard segment, an array path can also be selected. For example, the first settings interface can provide an array path selection control. Clicking the control will take you to the array path selection interface, which can be an image drawing interface. In this interface, you can select a portion of a pre-drawn graphic as the array path, or draw an array path, which can include radians.
[0102] like Figure 5As shown, after determining the above information, the length and width of the outer rectangle of the standard segment can be calculated; each entity line in the standard segment is discretized into discrete points according to the input discretization precision to obtain the set of discrete points of the standard segment (including discrete points A, B, C, D, E and F).
[0103] Based on the selected path, the path can be offset left and right according to the width of the standard segment, and the offset left and right paths can be converted into PL lines. The left and right PL lines are divided according to their endpoints, and the divided left and right offset lines are compared one by one. If there are lines with arcs, the arc with the smaller radius is determined as the array baseline. The baselines of each segment are summed up, and the total length of the array lines is the total length. The total length divided by the length of the outer rectangle gives the number of standard segments in the array.
[0104] like Figure 6 As shown, the standard segments are aligned with the corresponding positions according to the position of each baseline.
[0105] like Figure 7 As shown, by taking the tangent direction of the baseline as the X-axis and the perpendicular direction as the Y-axis, the discrete points of the standard segment are recalculated to obtain new discrete points with X and Y values; for example... Figure 7 As shown, connecting the deformed discrete points with lines yields the array effect.
[0106] In some embodiments, the standard segment may include a standard graphic and gaps, the gaps being located on one or both sides of the graphic, and the size of the gaps being determined based on the construction process and the aesthetics of the drawing. The standard graphic may be a user-selected graphic that requires batch filling or array copying.
[0107] As an example, such as Figure 8 As shown, the Super Lofting function solves the problem that CAD software platforms cannot fill and achieve concentric paving of curved line segments in garden paths with one click. The Super Lofting function can eliminate the tedious steps of manually offsetting line segments one by one according to the curved shape. You only need to prepare a small standard section of paving style in advance, select the center line or edge line of the curved garden path, and you can fill it with one click to achieve concentric paving of the curved garden path stone joints.
[0108] In some embodiments, the method may further include the following steps to facilitate the arrangement of small structures.
[0109] Step A), select the blocks in the drawing;
[0110] Step B) Determine the attribute information of the attribute block and match the attribute information with the header information of the table to be generated.
[0111] Specifically, it also includes:
[0112] Step C), generate the table to be generated based on the table class; the table to be generated includes the input area and the header information, which comes from the configuration file;
[0113] Step D): In response to an input operation on the input area, the modification interface is displayed. The modification interface is used to modify the image information corresponding to the item.
[0114] Step E): After confirming that the modification of the item table is complete, store the table header information in the configuration file.
[0115] Specifically, the landscape feature layout function solves the problem of manually compiling and creating lists. You only need to use the specified information parameterized attribute blocks to pre-place points on the drawing, and then use the landscape feature layout function to count the landscape features with one click and generate a list according to the specified template.
[0116] Information feature parameterized attribute block diagram, for example Figure 9 As shown.
[0117] like Figure 10 As shown, a list template can be generated with a single click.
[0118] Figure 11 This is a schematic diagram of an image drawing device for computer-aided drafting, provided as an embodiment of this application. Figure 11 As shown, the device includes:
[0119] The first determining module 1101 is used to determine the target legend to be arrayed and the target array path. The target array path has radians, and the target legend corresponds to standard segments and discrete points.
[0120] The second determining module 1102 is used to determine the array segment to be arrayed and the baseline of each array segment to be arrayed based on the standard segment, wherein the baseline of the array segment to be arrayed corresponding to the array path with curvature also has curvature.
[0121] The update module 1103 is used to update the discrete points of the target legend based on the baseline for each baseline with curvature;
[0122] The drawing module 1104 is used to fill the target legend into the segment to be arrayed based on the updated discrete points.
[0123] In some embodiments, the standard segment includes a solid line, and the device further includes a discrete module for:
[0124] Determine the discrete precision;
[0125] The solid line is discretized into discrete points according to the discretization precision.
[0126] In some embodiments, the standard segment includes an outer rectangle, which has a length and a width; the second determining module 1102 is specifically used for:
[0127] Based on the width of the standard segment, the target array path is shifted left and right to obtain a multi-segment line;
[0128] The polyline is divided according to the length of the standard segment to obtain the array segment. Among them, the arc with the smaller radius in the array segment is the baseline of the array.
[0129] In some embodiments, the update module 1103 is specifically used for:
[0130] Align the standard segments with the corresponding segments to be arrayed according to the position of each baseline;
[0131] The discrete points of the standard segment are recalculated by taking the tangent direction of the baseline as the X-axis direction and the perpendicular direction as the Y-axis direction, and the X and Y values are recalculated to obtain the updated discrete points.
[0132] In some embodiments, the drawing module 1104 is specifically used for:
[0133] Connect the updated discrete points with lines to obtain the arrayed image.
[0134] In some embodiments, a component module is also included, for:
[0135] Select the blocks in the drawing;
[0136] Determine the attribute information of the attribute block and match the attribute information with the header information of the table to be generated.
[0137] In some embodiments, the skit module is also used for:
[0138] The table to be generated is generated based on a table class; the table to be generated includes an input area and header information, which is derived from a configuration file.
[0139] In response to input operations on the input area, the editing interface is displayed, which is used to modify the image information corresponding to the item.
[0140] After confirming that the modifications to the table of contents are complete, store the table header information in the configuration file.
[0141] This application also provides an electronic device, such as... Figure 12 As shown, it includes a processor 1210, a communication interface 1220, a memory 1230, and a communication bus 1240, wherein the processor 1210, the communication interface 1220, and the memory 1230 communicate with each other through the communication bus 1240.
[0142] Memory 1230 is used to store computer programs;
[0143] When processor 1210 executes a program stored in memory 1230, it performs the following steps:
[0144] Determine the target legend to be arrayed and the target array path. The target array path has radians, and the target legend corresponds to standard segments and discrete points.
[0145] Based on the standard segment, determine the array segment to be arrayed corresponding to the target array path and the baseline of each array segment to be arrayed. Among them, the baseline of the array segment to be arrayed corresponding to the array path with curvature also has curvature.
[0146] For each baseline with curvature, the discrete points of the target legend are updated based on the baseline;
[0147] Based on the updated discrete points, the target legend is filled into the segment to be arrayed.
[0148] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0149] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0150] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0151] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0152] The implementation methods and beneficial effects of the various components of the electronic device in the above embodiments for solving the problem can be found in [reference needed]. Figure 2 The steps in the illustrated embodiments are used to implement the electronic device. Therefore, the specific working process and beneficial effects of the electronic device provided in this application will not be repeated here.
[0153] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the vehicle diagnostic data communication methods described in the above embodiments.
[0154] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the vehicle diagnostic data communication methods in the above embodiments.
[0155] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0156] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0157] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0158] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0159] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.
[0160] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims in this application and their equivalents, then this application also intends to include these modifications and variations.
Claims
1. A method for drawing images in computer-aided drafting, characterized in that, include: Determine the target legend to be arrayed and the target array path. The target array path has radians, and the target legend corresponds to standard segments and discrete points. Based on the standard segment, the target array path corresponding to the segment to be arrayed and the baseline of each segment to be arrayed are determined, wherein the baseline of the segment to be arrayed corresponding to the array path with curvature also has curvature. For each baseline with curvature, the discrete points of the target legend are updated based on the baseline; Based on the updated discrete points, the target legend is filled into the segment to be arrayed; The standard segment includes an outer rectangle, which has a length and a width; determining the array segment corresponding to the target array path and the baseline of each array segment based on the standard segment includes: Based on the width of the standard segment, the target array path is shifted left and right to obtain a multi-segment line; The multi-segment line is divided according to the length of the standard segment to obtain the segment to be arrayed, wherein the arc with the smaller radius in the segment to be arrayed is the reference line of the array; The step of updating the discrete points of the target legend based on each baseline with curvature includes: Align the standard segments with the corresponding segments to be arrayed according to the position of each baseline; The discrete points of the standard segment are recalculated by taking the tangent direction of the baseline as the X-axis direction and the perpendicular direction as the Y-axis direction, and the X and Y values are recalculated to obtain the updated discrete points.
2. The method according to claim 1, characterized in that, The standard segment includes a solid line, and the method further includes: Determine the discrete precision; The solid line is discretized into discrete points according to the discretization precision.
3. The method according to claim 1, characterized in that, The step of filling the target legend into the segment to be arrayed based on the updated discrete points includes: Connect the updated discrete points with lines to obtain the arrayed image.
4. The method according to claim 1, characterized in that, Also includes: Select the blocks in the drawing; Determine the attribute information of the attribute block and match the attribute information with the header information of the table to be generated.
5. The method according to claim 4, characterized in that, Also includes: Generate the table to be generated based on the table class; The table to be generated includes an input area and header information, the header information being derived from a configuration file; In response to an input operation on the input area, a modification interface is displayed, which is used to modify the image information corresponding to the item. After confirming that the modifications to the table of contents are complete, store the table header information in the configuration file.
6. An image drawing apparatus for computer-aided drafting, characterized in that, include: The first determining module is used to determine the target legend to be arrayed and the target array path. The target array path has radians, and the target legend corresponds to standard segments and discrete points. The second determining module is used to determine the array segment to be arrayed and the baseline of each array segment to be arrayed based on the standard segment, wherein the baseline of the array segment to be arrayed corresponding to the array path with curvature also has curvature. An update module is used to update the discrete points of the target legend based on the baseline for each baseline with curvature; A drawing module is used to fill the target legend into the segment to be arrayed based on the updated discrete points; The standard segment includes an outer rectangle, which has a length and a width; the second determining module includes: Based on the width of the standard segment, the target array path is shifted left and right to obtain a multi-segment line; The multi-segment line is divided according to the length of the standard segment to obtain the segment to be arrayed, wherein the arc with the smaller radius in the segment to be arrayed is the reference line of the array; The update module includes: Align the standard segments with the corresponding segments to be arrayed according to the position of each baseline; The discrete points of the standard segment are recalculated by taking the tangent direction of the baseline as the X-axis direction and the perpendicular direction as the Y-axis direction, and the X and Y values are recalculated to obtain the updated discrete points.
7. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-5.
Citation Information
Patent Citations
Parameterized drawing method and device, terminal equipment and storage medium
CN107945246A
Method for drawing curve in graph and related equipment
CN114782582A