CN115471584A - Method and device for drawing image in computer aided drawing - Google Patents
Method and device for drawing image in computer aided drawing Download PDFInfo
- Publication number
- CN115471584A CN115471584A CN202211084242.4A CN202211084242A CN115471584A CN 115471584 A CN115471584 A CN 115471584A CN 202211084242 A CN202211084242 A CN 202211084242A CN 115471584 A CN115471584 A CN 115471584A
- Authority
- CN
- China
- Prior art keywords
- arrayed
- segment
- line
- target
- standard
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides a method and a device for drawing an image in computer-aided drawing, which relate to the technical field of computer-aided drawing and comprise the steps of determining a target legend to be arrayed and a target array path; determining to-be-arrayed segments corresponding to the target array path and a datum line of each to-be-arrayed segment based on the standard segment; updating discrete points of the target legend based on the reference lines aiming at each reference line with radian; and filling a target legend in the to-be-arrayed section based on the updated discrete points. Therefore, the complicated step of manually shifting line segments one by one according to the arc shape can be omitted, only a small section of paving pattern standard segment needs to be prepared in advance, the central line or the circular line side line of the arc circular line is selected, one-key filling can be realized, and the butt joint and centripetal paving of the arc circular line stone materials is realized.
Description
Technical Field
The invention relates to the technical field of computer-aided drawing, in particular to a method and a device for drawing an image in computer-aided drawing.
Background
Computer drawing technology is an indispensable application technology means for each engineering designer in the modern times, and computer drawing refers to a technology for realizing graphic display, auxiliary drawing and design by applying drawing software and computer hardware. With the development of modern science and production technology, the drawn patterns become more and more complex, and higher requirements are put on the precision and speed of drawing, so that the manual drawing is dwarfed in the drawing precision and the drawing speed. The successive advent of computers and plotters and the development of related software technology enable the application of computer plotting to meet the requirements of high precision and high speed, and enable the modern plotting technology level to reach an unprecedented level.
At present, in the industry of domestic landscape architecture, drawing software commonly used by various large, medium and small enterprises or individual garden designers is CAD, and the most common CAD is Tianzheng building CAD and Zhongcheng building CAD. The two CAD software are oriented to the design industry, and comprise mechanical design, architectural design, indoor design, advertisement design and the like. Even if all the drawing functions are universal, the requirements of garden design can be basically met on the use level. However, in the face of the day-to-day landscape industry market, the existing functions of these mapping software gradually lose competitiveness in the mapping speed and quality of the design project, and for this reason, we begin to explore to improve our competitiveness through the secondary development of software.
On the CAD software platform, although the function of filling one-key patterns for circular roads in projects is provided, the function corresponds to a linear circular road or platform, and the filling of arc roads in the projects needs to use a single manual function expected to be carried by the user, draw lines and offset one by one according to the shape, length and width of the roads, and realize centripetal paving and butt joint of offset line segments. This simple pavement filling pattern can be filled manually, but is relatively complex and time consuming for the pavement pattern shown in fig. 1.
Disclosure of Invention
The invention aims to provide a method and a device for drawing an image in computer-aided drawing, which are used for relieving the technical problem of low design efficiency in the prior art.
In a first aspect, the present invention provides a method for drawing an image in computer aided drafting, comprising:
determining a target legend to be arrayed and a target array path, wherein the target array path has radian, and the target legend corresponds to a standard segment and discrete points;
determining a to-be-arrayed section corresponding to the target array path and a datum line of each to-be-arrayed section based on the standard section, wherein the datum line of the to-be-arrayed section corresponding to the array path with the radian also has the radian;
updating discrete points of the target legend based on the reference lines for each reference line with radian;
and filling the target legend in the to-be-arrayed segment based on the updated discrete points.
In an alternative embodiment, the standard segment includes a solid line, the method further comprising:
determining the discrete precision;
and dispersing the solid line into discrete points according to the dispersion precision.
In an alternative embodiment, the standard section comprises an outsourcing rectangle, the outsourcing rectangle having a length and a width corresponding to each other; the determining, based on the standard segment, a segment to be arrayed and a reference line of each segment to be arrayed, which correspond to the target array path, includes:
according to the width of the standard section, carrying out left-right deviation on the target array path to obtain a multi-section line;
and segmenting the multiple segments according to the length of the standard segment to obtain a segment to be arrayed, wherein an arc line with a small radius in the segment to be arrayed is a datum line of the array.
In an alternative embodiment, the updating of the discrete points of the target legend based on the reference lines, each of the reference lines having an arc, includes:
corresponding the standard section to a corresponding section to be arrayed according to the position of each section of reference line;
and recalculating the X, Y value to obtain the updated discrete point by taking the tangential direction of the datum line as the X-axis direction and the vertical direction as the Y-axis direction of the discrete point of the standard section.
In an optional embodiment, the populating the target legend in the to-be-arrayed segment based on the updated discrete points includes:
and connecting the updated discrete points by using a line to obtain an image after the array.
In an alternative embodiment, the method further comprises:
selecting the picture blocks of the picture;
and determining attribute information of the attribute block, and corresponding the attribute information with header information of a table to be generated.
In an alternative embodiment, the method further comprises:
generating a table to be generated based on the table class; the table to be generated comprises a region to be input and header information, and the header information is derived from a configuration file;
responding to the input operation aiming at the area to be input, and displaying a modification interface, wherein the modification interface is used for modifying the picture information corresponding to the small item;
and after the fact that the small article table is modified is determined, storing the table header information into a configuration file.
In a second aspect, the present invention provides an apparatus for drawing an image in computer-aided drafting, comprising:
the device comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for determining a target legend to be arrayed and a target array path, the target array path has radian, and the target legend corresponds to a standard segment and discrete points;
the second determining module is used for determining the to-be-arrayed segments corresponding to the target array path and the datum line of each to-be-arrayed segment based on the standard segment, wherein the datum line of the to-be-arrayed segment corresponding to the array path with the radian also has the radian;
the updating module is used for updating the discrete points of the target legend based on each datum line with radian;
and the drawing module is used for filling the target legend in the segment to be arrayed based on the updated discrete points.
In an alternative embodiment, the standard segment comprises a solid line, and the apparatus further comprises a discrete module for:
determining discrete precision;
and dispersing the solid line into discrete points according to the dispersion precision.
In an alternative embodiment, the standard section comprises an outsourcing rectangle, the outsourcing rectangle having a length and a width corresponding to each other; the second determining module is specifically configured to:
according to the width of the standard section, carrying out left-right deviation on the target array path to obtain a multi-section line;
and segmenting the multiple segments according to the length of the standard segment to obtain a segment to be arrayed, wherein an arc line with a small radius in the segment to be arrayed is a datum line of the array.
In an optional embodiment, the update module is specifically configured to:
corresponding the standard section to a corresponding section to be arrayed according to the position of each section of reference line;
and recalculating the X, Y value to obtain the updated discrete point by taking the tangential direction of the reference line as the X-axis direction and the vertical direction as the Y-axis direction of the discrete point of the standard section.
In an alternative embodiment, the rendering module is specifically configured to:
and connecting the updated discrete points by using a line to obtain an image after the array.
In an alternative embodiment, the system further comprises a widget module for:
selecting the picture blocks of the picture;
and determining attribute information of the attribute block, and corresponding the attribute information with header information of a table to be generated.
In an alternative embodiment, the widget module is further configured to:
generating a table to be generated based on the table class; the table to be generated comprises a region to be input and header information, and the header information is derived from a configuration file;
responding to the input operation aiming at the area to be input, and displaying a modification interface, wherein the modification interface is used for modifying the picture information corresponding to the small item;
and after the fact that the small article table is modified is determined, storing the table header information into a configuration file.
In a third aspect, the present invention provides an electronic device, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of the preceding embodiments when executing the program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method steps of any of the preceding embodiments.
The invention provides a method and a device for drawing an image in computer-aided drawing. Determining a target legend to be arrayed and a target array path; determining to-be-arrayed segments corresponding to the target array path and a datum line of each to-be-arrayed segment based on the standard segment; updating discrete points of the target legend for each reference line with radian based on the reference line; and filling a target legend in the to-be-arrayed section based on the updated discrete points. Therefore, the complicated step of manually shifting line segments one by one according to the arc shape can be omitted, only a small section of paving pattern standard segment needs to be prepared in advance, the central line or the circular line side line of the arc circular line is selected, one-key filling can be realized, and the butt joint and centripetal paving of the arc circular line stone materials is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is an example of computer aided drafting;
fig. 2 is a schematic flowchart of a method for drawing an image in computer-aided drawing according to an embodiment of the present disclosure;
FIG. 3 is another example of a computer-aided drawing provided by embodiments of the present application;
FIG. 4 is another example of a computer-aided drawing provided by embodiments of the present application;
FIG. 5 is another example of a computer-aided drawing provided by embodiments of the present application;
FIG. 6 is another example of a computer-aided drawing provided by embodiments of the present application;
FIG. 7 is another example of a computer-aided drawing provided by embodiments of the present application;
FIG. 8 is another example of a computer-aided drawing provided by embodiments of the present application;
FIG. 9 is another example of a computer-aided drawing provided by embodiments of the present application;
FIG. 10 is another example of a computer-aided drawing provided by embodiments of the present application;
fig. 11 is a schematic structural diagram of an apparatus for drawing an image in computer-aided drawing according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Fig. 2 is a schematic flow chart of a method for drawing an image in computer-aided drawing according to an embodiment of the present application. As shown in fig. 2, the method may include the steps of:
s210, determining a target legend to be arrayed and a target array path, wherein the target array path has radian, and the target legend corresponds to a standard section and discrete points.
The array is mainly used for creating object copies arranged in a specified manner, and in the embodiment of the application, the specified manner includes a manner of arranging according to a target array path.
The target graph is an object to be arrayed, and the target graph can be, for example, a mat, a fill, a primitive, or a part, etc.
The standard segment may be a pattern of a target legend, such as a paving pattern. The standard section of the pavement pattern can be manufactured in advance, and the width and the length of the circular road filled by the standard section of the pavement are not limited.
The target array path may be a full arc or a partial arc. Typically the center line of a road or the edges of two sides of a road.
The discrete points may be key points for the profile criteria segment. For example, the number of discrete points may be determined according to a discrete accuracy, which may be determined according to actual needs. For example, the discrete accuracy may be higher for a standard segment having a relatively complex structure, and the discrete accuracy may be lower for a standard segment having a simple structure, which is determined according to the kind and number of graphics included in the standard segment.
Wherein the standard segment may comprise a physical line. The discrete accuracy may be determined first; the solid line is then discretized into discrete points according to a discretization precision.
And S220, determining the to-be-arrayed section corresponding to the target array path and the reference line of each to-be-arrayed section based on the standard section, wherein the reference line of the to-be-arrayed section corresponding to the array path with the radian also has the radian.
A segment to be arrayed may refer to an area for placing a copy of an object. I.e. the target array path may be divided into a plurality of segments according to the standard segments.
The reference line may be used to indicate the deformation of the to-be-arrayed segment relative to the standard segment.
S230, updating the discrete points of the target legend based on the reference lines for each reference line having a radian.
The discrete points of the target legend can be updated based on the deformation recorded by the reference line relative to the standard segment, so as to obtain deformed discrete points (i.e. updated discrete points).
And S240, filling the target legend in the segment to be arrayed based on the updated discrete points.
And deforming the target legend based on the updated discrete points to obtain deformed object copies.
The standard section of the pavement pattern can be manufactured in advance, the width and the length of a round road which is filled by the standard section of the pavement are not limited, and then the path (generally, the center line of the road or the side lines on two sides of the road), the interval (if the road needs to be beaten by waves, namely, different stones are separated, the interval needs to be input) and the fitting precision (the fitting precision of the arc road) of the array are selected; after the array path, the distance and the fitting precision are determined, if the selected path is a road center line, the lofting step can be completed by generally pressing a space key as a default, the complicated step of manually shifting line segments one by one according to the arc shape can be omitted, only a small section of paving pattern standard segment needs to be prepared in advance, the center line or the circular path side line of the arc circular path is selected, and one-key filling can be performed, so that the opposite-seam centripetal paving of the arc circular path stone is realized.
In some embodiments, the standard segment comprises an outsourcing rectangle, the outsourcing rectangle having a length and a width corresponding thereto; the step S220 may include the following steps:
step 1), according to the width of a standard segment, carrying out left-right offset on a target array path to obtain a multi-segment line;
and 2) segmenting the multiple sections of lines according to the length of the standard section to obtain sections to be arrayed, wherein the arcs with small radius in the sections to be arrayed are the datum lines of the array. The left and right offset lines after being divided can be compared one by one for judgment, and if the arc lines exist, the arc line with the small radius is judged to be the datum line of the array. Accumulating the segmented reference lines of each section, wherein the total length is the total length of the array line; the total length/length of the outer rectangle yields the number of arrays of standard segments.
Based on this, the step S230 may specifically include the following steps:
step 3), corresponding the standard section to a corresponding section to be arrayed according to the position of each section of reference line;
and 4), recalculating the X, Y value to obtain the updated discrete point by taking the tangential direction of the datum line as the X-axis direction and the vertical direction as the Y-axis direction of the discrete point of the standard section.
Based on this, the step S240 may specifically include the following steps:
and 5) connecting the updated discrete points by using lines to obtain an image after the array.
As an example, a first setup interface may be provided in which standard segments may be set and the precision of the dispersion may be set. For example, as shown in fig. 3, the first setting interface may include a standard segment selection control, and clicking the reselection control may jump to the standard segment selection interface, as shown in fig. 4, the standard segment selection interface may be an image drawing interface, a drawn image may be selected on the image drawing interface as a standard segment, or the standard segment may be drawn on the drawing interface. For another example, the first setting interface may include a standard segment selection control, and the standard segment selection control may include a standard segment selection list, and alternative standard segments may be provided in the list and may be selected from the alternative standard segments. The first setting interface can be displayed after the super lofting control or the function is triggered in the drawing process. The function of triggering the super lofting can be triggered by a shortcut key or a shortcut command.
After the standard segment is determined, the discrete accuracy may also be set. The discrete precision may be the number of discrete points or the density of discrete points, etc.
In some embodiments, the discrete precision may also be set based on the standard segment. For example, a discrete precision setting control may be provided in the first setting interface, and a jump may be made to the discrete setting interface by clicking the discrete precision setting control, as shown in fig. 5, where the reference segment is a rectangle, the discrete setting interface may be an image drawing interface, a graph of a standard segment and initial discrete points corresponding to the standard segment may be displayed in the discrete setting interface, the number of discrete points may be increased or decreased in the interface, and the positions of the discrete points may also be moved. The increase or deletion of the number of discrete points may be performed with respect to one or more selected points, or increase the vicinity or middle of one or more selected points, or increase or delete the number of discrete points as a whole, for example, a numerical value of the number of discrete points may be input, and the corresponding number of discrete points may be automatically arranged on the standard segment based on the numerical value, for example, the discrete points may be uniformly arranged. For the movement of the position of the discrete point, the discrete point can be directly dragged, or the discrete point can be selected and the coordinate of the position of the discrete point is input. For the positions and the number of the discrete points, constraint conditions can be configured in advance, and the constraint conditions can include the maximum value and the minimum value of the number of the discrete points; the location of the discrete points must be on the graph, and so on. The position and the number of discrete points may be set based on a constraint condition.
After the standard segment is determined, an array path may also be selected. For example, an array path selection control may be provided in the first setting interface, a jump may be made to the array path selection interface by clicking the control, the array path selection interface may be a drawing interface of an image, a part of a drawn graph may be selected as an array path in the array path selection interface, or an array path may be drawn, where the array path may include a radian.
As shown in fig. 5, after the information is determined, the length and width of the standard segment outsourcing rectangle can be calculated; and (3) dispersing each entity line in the standard segment into discrete points according to the input discrete precision to obtain a discrete point set (comprising discrete points A, B, C, D, E and F) of the standard segment.
The path can be shifted left and right according to the width of the standard section according to the selected path, and the shifted left and right paths are converted into PL lines. And (3) dividing the left PL line and the right PL line according to end points, comparing the divided left deviation line and the right deviation line one by one, and if both the divided left deviation line and the divided right deviation line have arc lines, judging the arc line with a small radius as a datum line of the array. Accumulating the segmented reference lines of each section, wherein the total length is the total length of the array line; obtaining the array number of the standard sections by the total length/the length of the outer-wrapped rectangle;
as shown in fig. 6, the standard segments are mapped to corresponding positions according to the position of each segment reference line.
As shown in fig. 7, the tangent direction of the reference line of the discrete point of the standard segment is taken as the X-axis direction, and the vertical direction is taken as the Y-axis direction, and the X, Y value is recalculated to obtain a new discrete point; the effect after array is obtained by connecting the deformed discrete points with lines as shown in fig. 7.
In some embodiments, the standard section may include a standard pattern and a gap, the gap may be disposed on one side or both sides of the pattern, and the size of the gap may be determined according to a construction process and an aesthetic property of the pattern. The standard pattern may be a user-selected pattern that requires bulk fill or array replication.
As an example, as shown in fig. 8, the super lofting function solves the difficulty that the CAD software platform cannot perform one-key filling on a circular road with an arc-shaped line segment and realize centripetal paving, and the super lofting function can eliminate the tedious step of manually shifting the line segment one by one according to the arc shape, and only needs to prepare a small section of standard paving pattern segment in advance, select the center line or the circular road side line of the arc-shaped circular road, and then perform one-key filling, so as to realize the centripetal paving of the arc-shaped circular road stone material by means of the butt joint.
In some embodiments, the method may further include the following steps to facilitate the widget arrangement.
Step A), selecting the picture blocks of the picture;
and step B), determining attribute information of the attribute block, and corresponding the attribute information with header information of the table to be generated.
Specifically, still include:
step C), generating a table to be generated based on the table class; the table to be generated comprises an area to be input and table header information, and the table header information is from a configuration file;
step D), responding to the input operation aiming at the area to be input, and displaying a modification interface which is used for modifying the picture information corresponding to the small item;
and E), after the fact that the minor table is modified is confirmed, storing the table header information into a configuration file.
Specifically, the step of manually counting and making the list is solved by the functions of the small article layout drawing, only the appointed information parameterization attribute block is needed to be used, the points are distributed in the drawing in advance, the small article layout function is used, the landscape small articles can be counted in a one-key mode, and the list is generated according to the appointed template.
An example of the parameterized property block diagram for information features is shown in fig. 9.
As shown in fig. 10, the list template may be generated with one-touch statistics.
Fig. 11 is a schematic structural diagram of an apparatus for drawing an image in computer-aided drawing according to an embodiment of the present application. As shown in fig. 11, the apparatus includes:
a first determining module 1101, configured to determine a target legend to be arrayed and a target array path, where the target array path has radians and the target legend corresponds to a standard segment and a discrete point;
a second determining module 1102, configured to determine, based on the standard segment, to-be-arrayed segments corresponding to the target array path and a reference line of each to-be-arrayed segment, where the reference line of the to-be-arrayed segment corresponding to the array path with the radian also has the radian;
an updating module 1103, configured to update, for each reference line having a radian, a discrete point of the target legend based on the reference line;
and a drawing module 1104 for filling the target legend in the segment to be arrayed based on the updated discrete points.
In some embodiments, the standard segment comprises a physical line, the apparatus further comprising a discrete module to:
determining discrete precision;
and dispersing the solid line into discrete points according to the dispersion precision.
In some embodiments, the standard segment comprises an outsourcing rectangle, the outsourcing rectangle having a length and a width corresponding thereto; the second determining module 1102 is specifically configured to:
according to the width of the standard section, carrying out left-right deviation on the target array path to obtain a multi-section line;
and segmenting the multiple sections of lines according to the length of the standard section to obtain a section to be arrayed, wherein an arc line with a small radius in the section to be arrayed is a datum line of the array.
In some embodiments, the updating module 1103 is specifically configured to:
corresponding the standard section to a corresponding section to be arrayed according to the position of each section of reference line;
and recalculating the X, Y value to obtain the updated discrete point by taking the tangential direction of the datum line as the X-axis direction and the vertical direction as the Y-axis direction of the discrete point of the standard section.
In some embodiments, the rendering module 1104 is specifically configured to:
and connecting the updated discrete points by using a line to obtain an image after the array.
In some embodiments, a widget module is further included for:
selecting the picture blocks of the picture;
and determining attribute information of the attribute block, and corresponding the attribute information with header information of the table to be generated.
In some embodiments, the widget module is further to:
generating a table to be generated based on the table class; the table to be generated comprises a region to be input and table header information, and the table header information is derived from a configuration file;
responding to the input operation aiming at the area to be input, and displaying a modification interface which is used for modifying the picture information corresponding to the small item;
and after the fact that the small article table is modified is determined, storing the table header information into a configuration file.
The embodiment of the present application further provides an electronic device, as shown in fig. 12, including a processor 1210, a communication interface 1220, a memory 1230 and a communication bus 1240, where the processor 1210, the communication interface 1220 and the memory 1230 complete communication with each other through the communication bus 1240.
A memory 1230 for storing computer programs;
the processor 1210, when executing the programs stored in the memory 1230, performs the following steps:
determining a target legend and a target array path of the array to be arrayed, wherein the target array path has radian, and the target legend corresponds to a standard section and discrete points;
determining a to-be-arrayed section corresponding to the target array path and a datum line of each to-be-arrayed section based on the standard section, wherein the datum line of the to-be-arrayed section corresponding to the array path with the radian also has the radian;
updating discrete points of the target legend for each reference line with radian based on the reference line;
and filling the target legend in the to-be-arrayed section based on the updated discrete points.
The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also 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, discrete hardware components.
Since the implementation manner and the beneficial effects of the problem solving of each device of the electronic device in the foregoing embodiment can be implemented by referring to each step in the embodiment shown in fig. 2, detailed working processes and beneficial effects of the electronic device provided in the embodiment of the present application are not repeated herein.
In yet another embodiment provided herein, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the method of communicating vehicle diagnostic data of any of the above embodiments.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of communicating vehicle diagnostic data of any of the above embodiments.
As will be appreciated by one of skill in the art, the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
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 such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.
Claims (10)
1. A method for drawing an image in computer-aided drawing, comprising:
determining a target legend to be arrayed and a target array path, wherein the target array path has a radian, and the target legend corresponds to a standard segment and discrete points;
determining a to-be-arrayed section corresponding to the target array path and a datum line of each to-be-arrayed section based on the standard section, wherein the datum line of the to-be-arrayed section corresponding to the array path with the radian also has the radian;
updating discrete points of the target legend based on the reference lines for each reference line with radian;
and filling the target legend in the to-be-arrayed section based on the updated discrete points.
2. The method of claim 1, wherein the standard segment comprises a solid line, the method further comprising:
determining discrete precision;
and dispersing the solid line into discrete points according to the dispersion precision.
3. The method of claim 1, wherein the standard section comprises an outsourcing rectangle having a length and a width corresponding thereto; the determining, based on the standard segment, a segment to be arrayed and a reference line of each segment to be arrayed, which correspond to the target array path, includes:
according to the width of the standard section, carrying out left-right deviation on the target array path to obtain a multi-section line;
and segmenting the multiple segments according to the length of the standard segment to obtain a segment to be arrayed, wherein an arc line with a small radius in the segment to be arrayed is a datum line of the array.
4. A method according to claim 3, wherein said updating discrete points of the target legend based on the reference lines for each reference line having a radian measure comprises:
corresponding the standard section to a corresponding section to be arrayed according to the position of each section of reference line;
and recalculating the X, Y value to obtain the updated discrete point by taking the tangential direction of the datum line as the X-axis direction and the vertical direction as the Y-axis direction of the discrete point of the standard section.
5. The method according to claim 4, wherein the populating the target legend in the segment to be arrayed based on the updated discrete points comprises:
and connecting the updated discrete points by using a line to obtain an image after the array.
6. The method of claim 1, further comprising:
selecting the picture blocks of the picture;
and determining attribute information of the attribute block, and corresponding the attribute information with header information of a table to be generated.
7. The method of claim 6, further comprising:
generating a table to be generated based on the table class; the table to be generated comprises a region to be input and header information, and the header information is derived from a configuration file;
responding to the input operation aiming at the area to be input, and displaying a modification interface, wherein the modification interface is used for modifying the picture information corresponding to the small item;
and after the fact that the small article table is modified is determined, storing the table header information into a configuration file.
8. An apparatus for rendering an image in computer-aided drawing, comprising:
the device comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for determining a target legend to be arrayed and a target array path, the target array path has radian, and the target legend corresponds to a standard segment and discrete points;
the second determining module is used for determining the to-be-arrayed segments corresponding to the target array path and the datum line of each to-be-arrayed segment based on the standard segment, wherein the datum line of the to-be-arrayed segment corresponding to the array path with the radian also has the radian;
the updating module is used for updating the discrete points of the target legend based on each datum line with radian;
and the drawing module is used for filling the target legend in the segment to be arrayed based on the updated discrete points.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-7 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211084242.4A CN115471584A (en) | 2022-09-06 | 2022-09-06 | Method and device for drawing image in computer aided drawing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211084242.4A CN115471584A (en) | 2022-09-06 | 2022-09-06 | Method and device for drawing image in computer aided drawing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115471584A true CN115471584A (en) | 2022-12-13 |
Family
ID=84368560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211084242.4A Pending CN115471584A (en) | 2022-09-06 | 2022-09-06 | Method and device for drawing image in computer aided drawing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115471584A (en) |
-
2022
- 2022-09-06 CN CN202211084242.4A patent/CN115471584A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103500236B (en) | Design 3D model objects | |
CN103136790B (en) | Surface is created from multiple 3D curves | |
JP6721332B2 (en) | Generating a bounding box on a 3D modeled assembly | |
KR101955035B1 (en) | Method for designing a geometrical three-dimensional modeled object | |
US5265197A (en) | Geometric modeling apparatus | |
JP6721333B2 (en) | Selecting a perspective for a set of objects | |
KR101925640B1 (en) | Designing a three-dimensional modeled assembly of objects in a three-dimensional scene | |
CN118012967A (en) | Bridge geographic information data processing method and device | |
JP2011100456A (en) | Method and system for designing assembly of object in system of computer-aided design | |
CN101866379B (en) | Method, program and product edition system for visualizing objects displayed on a computer screen | |
US9245060B2 (en) | Selection of three-dimensional parametric shapes | |
US9483585B2 (en) | Designing a staggered pattern of objects in a computer-aided design system | |
CN115471584A (en) | Method and device for drawing image in computer aided drawing | |
KR102055952B1 (en) | Designing a circular staggered pattern of objects | |
CN113886936A (en) | Tunnel modeling method and device, electronic equipment and readable storage medium | |
JP2007128173A (en) | Area calculation method using cad |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |