A graphics drawing method and electronic device
By analyzing the drawn line graphics, automatically matching and adjusting the plane line graphics, the problem of teachers frequently switching line types is solved, and the efficiency and user experience of graphic drawing are improved.
Patent Information
- Application Number
- CN202110990228.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-08-26
AI Technical Summary
In an educational environment, when teachers draw graphically through electronic devices, they need to frequently switch solid and dotted lines, resulting in inconvenient operation and wasted teaching time.
By analyzing the drawn line figures, determining the matching three-dimensional model, and selecting the appropriate planar line figures from it, automatically adjusting the line types and proportions, avoiding line types switching, and achieving automatic completion of graphic drawing.
Improves user experience, shortens drawing time, simplifies the teaching process, and reduces operational complexity.
Smart Images

Figure CN113689523B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of education, and in particular to a graphics drawing method and an electronic device. Background Art
[0002] In an educational environment, when a teacher is teaching students, if he wants to draw graphics through electronic devices, the teacher needs to directly choose whether to draw with solid lines or dotted lines during the drawing process. What is drawn with solid lines is directly solid lines, and what is drawn with dotted lines is directly dotted lines. This means that when drawing graphics, it is necessary to switch between solid lines and dotted lines multiple times to complete the drawing of three-dimensional graphics. However, switching between solid lines and dotted lines multiple times brings inconvenience to user operation. Summary of the invention
[0003] In view of this, the present application provides a graphics drawing method and an electronic device, and the specific scheme thereof is as follows:
[0004] A graphics drawing method, comprising:
[0005] In the process of drawing the line graph, obtaining the lines of the drawn line graph;
[0006] Determining a first three-dimensional model matching the drawn lines based on the drawn lines of the line graphic;
[0007] Determining that the first three-dimensional model corresponds to at least one plane line graphic, wherein the plane line graphic includes at least two different types of lines, and different plane line graphics have different combinations of line types;
[0008] A first plane line graphic is determined from the at least one plane line graphic, the line graphic is drawn based on the first plane line graphic, and a combination of line types of the drawn line graphic matches a combination of line types of the first plane line graphic.
[0009] Furthermore, drawing the line graphic based on the first plane line graphic includes:
[0010] The proportion of the first plane line graphic is adjusted based on the lines of the drawn line graphic, and the first plane line graphic after the proportion is adjusted is output as the drawn line graphic.
[0011] Furthermore, drawing the line graphic based on the first plane line graphic includes:
[0012] Determine the position of each line in the first plane line pattern and the type of the line at each position;
[0013] The type of the lines of the drawn line graphic is adjusted based on the position of each line and the type of the line at each position, so that the lines of the drawn line graphic match the line types of the lines of the first plane line graphic at the corresponding positions.
[0014] Furthermore, it also includes:
[0015] If the drawn line graphic is not a complete line graphic corresponding to the first plane line graphic, a line group to be supplemented in the line graphic is determined based on the line positions and line types in the first plane line graphic, and the line group to be supplemented is drawn.
[0016] Further, the determining of the first planar line pattern from the at least one planar line pattern comprises:
[0017] selecting a first planar line pattern from among the at least one planar line pattern based on a user's operation;
[0018] or,
[0019] A first planar line graphic among the at least one planar line graphic is selected based on the graphic input intention.
[0020] Further, the selecting, based on the user's operation, a first planar line graphic from the at least one planar line graphic comprises:
[0021] Based on a user's selection operation on one of the at least one planar line graphics, determining the selected planar line graphics as a first planar line graphics;
[0022] or,
[0023] Based on the user's adjustment operation on the type of at least one line in the drawn line graphics, a plane line graphic matching the line graphic after the adjustment operation is selected from the at least one plane line graphics and determined as the first plane line graphic.
[0024] Furthermore, the determining, based on the drawn lines of the line graphic, a first three-dimensional model matching the drawn lines includes:
[0025] Determining at least one three-dimensional model based on the drawn lines of the line graphic;
[0026] A first three-dimensional model matching the drawn line is determined from the at least one three-dimensional model based on a user's operation.
[0027] Furthermore, the determining, based on the user's operation, a first three-dimensional model matching the drawn line from the at least one three-dimensional model comprises:
[0028] Obtaining a line drawn by a user to supplement the drawn line graphic;
[0029] Based on the analysis of the line graphics after the supplementary drawing, a first three-dimensional model matching the line graphics after the supplementary drawing is determined from the at least one three-dimensional model.
[0030] An electronic device, comprising:
[0031] A processor is used for obtaining the lines of the drawn line graphics during the drawing process of the line graphics; determining a first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics; determining at least one plane line graphics corresponding to the first three-dimensional model, the plane line graphics including at least two different types of lines, and different plane line graphics have different combinations of line types; determining a first plane line graphics from the at least one plane line graphics, drawing the line graphics based on the first plane line graphics, and matching the combination of line types of the drawn line graphics with the combination of line types of the first plane line graphics;
[0032] The memory is used to store the program for the processor to execute the above processing process.
[0033] Further, the processor draws the line graphic based on the first plane line graphic, including:
[0034] The processor adjusts the scale of the first plane line graphic based on the lines of the drawn line graphic, and outputs the first plane line graphic after the scale adjustment as the drawn line graphic.
[0035] It can be seen from the above technical scheme that the graphics drawing method and electronic device disclosed in the present application obtain the lines of the drawn line graphics during the line graphics drawing process, determine the first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics, determine at least one plane line graphics corresponding to the first three-dimensional model, the plane line graphics include at least two different types of lines, and the combination of line types in different plane line graphics is different; determine the first plane line graphics from at least one plane line graphics, draw the line graphics based on the first plane line graphics, and match the combination of line types of the drawn line graphics with the combination of line types of the first plane line graphics. In the present scheme, during the line graphics drawing process, based on the line analysis of the drawn line graphics, determine at least one plane line graphics matching it, and select one from them, so as to complete the drawing of the line graphics based on the selected first plane line graphics, so that the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics, so that there is no need to switch the line types during the drawing process, and the adjustment of the line types of the drawn line graphics can be completed directly based on the selected first plane line graphics, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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.
[0037] Figure 1 A flowchart of a graphics drawing method disclosed in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of a line in a drawn line graph disclosed in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of a line in a drawn line graph disclosed in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of a plane line graphic corresponding to a three-dimensional model disclosed in an embodiment of the present application;
[0041] Figure 5 A schematic diagram of another type of planar line graphic corresponding to a three-dimensional model disclosed in an embodiment of the present application;
[0042] Figure 6 A flowchart of a graphics drawing method disclosed in an embodiment of the present application;
[0043] Figure 7 A flowchart of a graphics drawing method disclosed in an embodiment of the present application;
[0044] Figure 8 A schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] The present application discloses a method for drawing a graph, and its flow chart is as follows: Figure 1 As shown, including:
[0047] Step S11, in the process of drawing the line graph, obtaining the lines of the drawn line graph;
[0048] Step S12, determining a first three-dimensional model matching the drawn lines based on the lines of the drawn line graphic;
[0049] Step S13, determining that the first three-dimensional model corresponds to at least one plane line graphic, the plane line graphic including at least two different types of lines, and different plane line graphics have different combinations of line types;
[0050] Step S14: determine a first plane line graphic from at least one plane line graphic, draw a line graphic based on the first plane line graphic, and match the combination of line types of the drawn line graphic with the combination of line types of the first plane line graphic.
[0051] In an educational environment, when teachers are teaching students, if they want to use electronic devices to draw line graphics, the different viewing angles of the three-dimensional graphics corresponding to the line graphics will lead to different positions of dotted lines and solid lines in the line graphics, where dotted lines are invisible lines in the three-dimensional graphics at the current viewing angle, and solid lines are visible lines in the three-dimensional graphics at the current viewing angle. Therefore, when drawing line graphics through electronic devices, since each three-dimensional graphic includes both visible and invisible lines, it is necessary to switch the line type multiple times during the teaching process to complete the drawing of the line graphics, which causes inconvenience to the user and wastes teaching time.
[0052] In order to solve this problem, in this solution, during the process of drawing line graphics, the electronic device will directly output several plane line graphics that the user may want to draw based on the analysis of the lines of the line graphics that have been drawn, and then directly output the completed line image based on the user's operation, without the need to switch the line type, thereby avoiding the problem of multiple switching of line types during the drawing process, which causes inconvenience in operation.
[0053] During the drawing of line graphics, the electronic device will detect the currently drawn lines in real time. If the drawn lines are few and the processor of the electronic device cannot analyze the three-dimensional model corresponding to the line graphics to be drawn by the user based on the current lines, the electronic device will continue to detect. As the number of drawn lines increases, the probability that the processor can analyze the three-dimensional model corresponding to the line graphics to be drawn based on the currently drawn lines will increase.
[0054] Alternatively, the lines of the line graphic are all drawn, but the types of the drawn lines are not differentiated, that is, one line type is uniformly used to draw the line graphic, and after the lines are drawn, all the drawn lines are analyzed to determine a three-dimensional model that matches all the lines.
[0055] Determining the first three-dimensional model that matches the drawn lines based on the lines of the drawn line graphic can be as follows: based on the lines of the drawn line graphic, searching from a database whether there are lines of a three-dimensional model that match the currently drawn lines; if so, determining it as the first three-dimensional model; if not, or if there are more three-dimensional models determined from the database that match the currently drawn lines, continuing to monitor the user's drawing, so that when the number of lines of the drawn line graphic increases, the matching three-dimensional model can be analyzed.
[0056] For example, when drawing line graphics through electronic equipment, the drawn lines are Figure 2 As shown, the processor is based on Figure 2 If the lines shown in FIG. 1 are not analyzed and the three-dimensional model that matches the line image that the user needs to draw cannot be clearly identified, the user's drawing will continue to be monitored; when the drawn lines are as shown in FIG. Figure 3 As shown, based on Figure 3 By analyzing the above, it can be directly determined that the three-dimensional model corresponding to the line graphic to be drawn is a cuboid, and the cuboid is determined as the first three-dimensional model.
[0057] After the processor analyzes the first three-dimensional model that matches the drawn lines based on the currently drawn lines, since the three-dimensional model corresponds to different plane line graphics based on different viewing angles, the plane line graphics use different types of line combinations to represent the visible lines and / or invisible lines of the plane line graphics corresponding to the three-dimensional model.
[0058] For example: for the triangular pyramid A-BCD, it can correspond to different plane line graphics, such as Figure 4 As shown, at a certain viewing angle, the BD line is a dotted line, which is an invisible line, and the other lines are solid lines, which are visible lines; Figure 5 As shown, at a certain viewing angle, AB, BC, and BD are all dotted lines, which are invisible lines, and other lines, such as AC, CD, and AD are all solid lines, which are visible lines; of course, for the triangular pyramid A-BCD, other line type combinations can also be included, which will not be repeated here.
[0059] Different line type combinations correspond to different plane line graphics. A first plane line graphic is determined from at least one plane line graphic and is used as a line graphic that matches the lines of a currently drawn line graphic. The drawn line graphic is automatically output based on the first plane line graphic. There is no need for the user to continue to draw manually on the electronic device, nor is there any need for the user to manually adjust the line type of the already drawn lines. A line graphic that matches the line type combination in the first plane line graphic can be automatically output according to the first plane line graphic, so that the time for teachers to draw line graphics during the teaching process is shortened and the drawing method is simpler.
[0060] The graphics drawing method disclosed in this embodiment, in the process of drawing line graphics, obtains the lines of the drawn line graphics, determines the first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics, determines at least one plane line graphics corresponding to the first three-dimensional model, the plane line graphics include at least two different types of lines, and the combination of line types in different plane line graphics is different; determines the first plane line graphics from at least one plane line graphics, draws the line graphics based on the first plane line graphics, and the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics. In the process of drawing line graphics, this scheme determines at least one plane line graphics matching it based on the line analysis of the drawn line graphics, and selects one from them, so as to complete the drawing of the line graphics based on the selected first plane line graphics, so that the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics, so that there is no need to switch the line types during the drawing process, and the adjustment of the line types of the drawn line graphics can be completed directly based on the selected first plane line graphics, thereby improving the user experience and shortening the drawing time.
[0061] This embodiment discloses a method for drawing a graph, and its flow chart is as follows: Figure 6 As shown, including:
[0062] Step S61, in the process of drawing the line graph, obtaining the lines of the drawn line graph;
[0063] Step S62, determining a first three-dimensional model matching the drawn lines based on the lines of the drawn line graphic;
[0064] Step S63: determining that the first three-dimensional model corresponds to at least one plane line graphic, the plane line graphic including at least two different types of lines, and different plane line graphics have different combinations of line types;
[0065] Step S64: determine a first plane line graphic from at least one plane line graphic, adjust the scale of the first plane line graphic based on the lines of the drawn line graphic, and output the first plane line graphic after the scale adjustment as a drawn line graphic.
[0066] Drawing a line graphic based on the first plane line graphic, specifically, can be: the processor of the electronic device can automatically adjust the proportion of the first plane line graphic according to the size of the lines of the drawn line graphic, so that the size of the first plane line graphic is adapted to the size of the drawn line graphic, and output the first plane line graphic after the size adjustment as the drawn line graphic, that is, replace the drawn line graphic with the first plane line graphic after the size adjustment, so as to directly realize the drawing completion and output of the graphics including different types of lines.
[0067] As long as the first plane line graphic is determined, it indicates that the line type combination in the first plane line graphic is the same as the line type combination in the drawn line graphic. Then, when the sizes of the first plane line graphic and the line graphic are the same, the first plane line graphic can be directly output as the completed line graphic, without the user continuing to draw the line graphic in the drawing process. At the same time, there is no need to adjust the line type in the line graphic in the drawing process, because the first plane line graphic includes at least two different types of lines, that is, the first plane line graphic is a graphic with a determined viewing angle and virtual and real lines.
[0068] In addition, the line graphics drawn based on the first plane line graphics can also be:
[0069] Determine the position of each line in the first plane line graphic and the type of the line at each position; adjust the type of the line of the drawn line graphic based on the position of each line and the type of the line at each position, so that the lines of the drawn line graphic match the line types of the lines of the first plane line graphic at the corresponding positions.
[0070] After determining the first plane line graphic that matches the drawn line graphic, the drawn line graphic is not adjusted directly based on the first plane line graphic. Instead, the line graphic can continue to be drawn through the electronic device until the lines of the line graphic are drawn, and then the types of the lines in the drawn line graphic are adjusted through the line type combination in the first plane line graphic.
[0071] Determine the line type at each position in the first plane line graphic. After the lines of the line graphic are drawn, adjust the lines of the drawn line graphic according to the line type at each position in the first plane line graphic, thereby automatically adjusting the line type in the drawn line graphic without the user manually switching between dotted lines and solid lines.
[0072] For example, if during the drawing process, the default line type is a solid line, and the line at the first position in the first plane line graphic is a dotted line, then the line at the first position in the drawn line graphic is adjusted to a dotted line; if the line at the second position in the first plane line graphic is a solid line, then the line type at the first position in the drawn line graphic remains unchanged as a solid line.
[0073] Furthermore, if the drawn line graphic is not a complete line graphic corresponding to the first plane line graphic, a line group to be supplemented in the line graphic is determined based on the line positions and line types in the first plane line graphic, and the line group to be supplemented is drawn.
[0074] When the drawn line graph is not a complete line graph that can correspond to the three-dimensional model, it means that some lines in the drawn line graph have not been drawn. Therefore, after determining the first plane line graph corresponding to the drawn line graph, based on the line position and line type of the first plane line graph, the undrawn lines in the undrawn line graph are automatically drawn, without the need for manual drawing by the user, so as to improve the drawing speed and accuracy of the graph, save the drawing time of the graph, and improve the teaching efficiency.
[0075] The graphics drawing method disclosed in this embodiment, in the process of drawing line graphics, obtains the lines of the drawn line graphics, determines the first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics, determines at least one plane line graphics corresponding to the first three-dimensional model, the plane line graphics include at least two different types of lines, and the combination of line types in different plane line graphics is different; determines the first plane line graphics from at least one plane line graphics, draws the line graphics based on the first plane line graphics, and the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics. In the process of drawing line graphics, this scheme determines at least one plane line graphics matching it based on the line analysis of the drawn line graphics, and selects one from them, so as to complete the drawing of the line graphics based on the selected first plane line graphics, so that the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics, so that there is no need to switch the line types during the drawing process, and the adjustment of the line types of the drawn line graphics can be completed directly based on the selected first plane line graphics, thereby improving the user experience.
[0076] This embodiment discloses a method for drawing a graph, and its flow chart is as follows: Figure 7 As shown, including:
[0077] Step S71, in the process of drawing the line graph, obtaining the lines of the drawn line graph;
[0078] Step S72, determining at least one three-dimensional model based on the lines of the drawn line graphic;
[0079] Step S73: determining a first three-dimensional model matching the drawn line from at least one three-dimensional model based on the user's operation;
[0080] Step S74: determining that the first three-dimensional model corresponds to at least one plane line graphic, the plane line graphic including at least two different types of lines, and different plane line graphics have different combinations of line types;
[0081] Step S75: determine a first plane line graphic from at least one plane line graphic, draw a line graphic based on the first plane line graphic, and match the combination of line types of the drawn line graphic with the combination of line types of the first plane line graphic.
[0082] After analyzing the drawn lines, at least one stereoscopic model corresponding to the drawn lines can be determined, and the first stereoscopic model can be determined from the at least one stereoscopic model based on the user's operation.
[0083] Specifically, the method may include: obtaining lines supplemented by the user to the drawn line graphics, and determining a first three-dimensional model matching the supplemented line graphics from at least one three-dimensional model based on analysis of the supplemented line graphics.
[0084] Based on the lines that the user continues to draw on the line graphic through the electronic device, the processor of the electronic device continues to analyze the current line graphic to determine the three-dimensional model corresponding to the current line graphic. As more lines are drawn, the three-dimensional models that can be determined to correspond to the line graphic will gradually decrease.
[0085] Alternatively, it may be: at least one three-dimensional model can be determined based on the lines of the drawn line graphics, and the user performs a selection operation on at least one three-dimensional model to determine the first three-dimensional model. In this way, there is no need to continue waiting for the user to draw the line graphics, and the first three-dimensional model can be determined directly based on the user's selection operation.
[0086] Further, after the first three-dimensional model is determined, the first three-dimensional model will have more than one plane line graphics corresponding to it, and the first plane line graphics are determined from the more than one plane line graphics, wherein the first plane line graphics can be determined in the following manner:
[0087] A first planar line graphic among at least one planar line graphic is selected based on a user's operation; or a first planar line graphic among at least one planar line graphic is selected based on a graphic input intention.
[0088] Among them, the graphic input intention can be: the original intention of the user to draw a line graphic, such as: the user draws the line graphic based on the question requirements, then the graphic input intention is to analyze the question requirements, determine the question meaning, and thus determine the first plane line image corresponding to the line graphic that the user wants to draw; or, obtain the sound information before drawing the graphic line through the microphone, analyze the sound information, and determine the semantics of the user or other people in the environment before drawing the graphic line, so as to determine the graphic line that the user himself wants to draw, or the graphic line that other people require the user to draw.
[0089] In addition, selecting the first plane line graphic from at least one plane line graphic based on the user's operation may include: determining the selected plane line graphic as the first plane line graphic based on the user's selection operation on one plane line graphic from at least one plane line graphic;
[0090] When there are multiple plane line graphics corresponding to the first three-dimensional model, the multiple plane line graphics are displayed, and the user selects the multiple plane line graphics displayed. The user performs a selection operation to select one of the plane line graphics, and the selected plane line graphic is determined as the first plane line graphic. The user directly selects, which avoids the analysis of user behavior and improves the accuracy of determining the first plane line graphic.
[0091] Alternatively, based on the user's operation, a first plane line graphic from at least one plane line graphic is selected, and it can also be: based on the user's adjustment operation on the type of at least one line in the drawn line graphics, a plane line graphic that matches the line graphic after the adjustment operation is selected from at least one plane line graphic and determined as the first plane line graphic.
[0092] When there are multiple plane line graphics corresponding to the first three-dimensional model, it is not possible to directly determine that one of them is the first plane line graphic. In this case, the user can perform an adjustment operation on one or more of the line graphics drawn by the user to adjust the line type of the one or more lines selected by the user so that the line type of the one or more lines adjusted by the user is consistent with the line graphics to be drawn by the user. In this case, based on the line graphics after the adjustment of part of the line type, the line graphics can be compared with the multiple plane line graphics to determine whether there is a match with the line graphics after the adjustment of part of the line type in the multiple plane line graphics. If there is, it is determined as the first plane line graphic, and the line graphics drawn are automatically completed based on the first plane line graphic;
[0093] If it is determined that there are two or more plane line graphics that match the line graphics after the line type is adjusted among the multiple plane line graphics, it is necessary to continue to adjust the drawn line graphics. The adjustment at this time may be to continue to adjust the line types of the already drawn line graphics, or to continue to draw the line graphics and continue to adjust the line types based on the lines that continue to be drawn, until it is finally determined that there is only one plane line graphic among the multiple plane line graphics that matches the line graphic after the line type is adjusted, and it is determined as the first plane line graphic;
[0094] If it is determined that there is no plane line graphic matching the line graphic after the line type of part of the line is adjusted among the multiple plane line graphics, it is necessary to return to the previous steps for checking to determine whether an abnormality occurs in the previous steps, such as returning to step S73, re-determining the first three-dimensional model, and determining whether the first three-dimensional model determined previously is wrong. If the first three-dimensional model is wrong, re-determine the first three-dimensional model, and re-execute the subsequent steps from step S74;
[0095] Alternatively, the process may return to step S74 to determine whether at least one plane line graphic determined based on the first three-dimensional model is incorrect or missing. If there are no problems during the execution of steps S73 and S74, a prompt message needs to be output to prompt the user to check whether the line type of the line being adjusted is incorrect, so as to ensure the normal output of the first plane line graphic.
[0096] The graphics drawing method disclosed in this embodiment, in the process of drawing line graphics, obtains the lines of the drawn line graphics, determines the first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics, determines at least one plane line graphics corresponding to the first three-dimensional model, the plane line graphics include at least two different types of lines, and the combination of line types in different plane line graphics is different; determines the first plane line graphics from at least one plane line graphics, draws the line graphics based on the first plane line graphics, and the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics. In the process of drawing line graphics, this scheme determines at least one plane line graphics matching it based on the line analysis of the drawn line graphics, and selects one from them, so as to complete the drawing of the line graphics based on the selected first plane line graphics, so that the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics, so that there is no need to switch the line types during the drawing process, and the adjustment of the line types of the drawn line graphics can be completed directly based on the selected first plane line graphics, thereby improving the user experience.
[0097] This embodiment discloses an electronic device, and its structural diagram is as follows: Figure 8 As shown, including:
[0098] Processor 81 and memory 82.
[0099] The processor 81 is used to obtain the lines of the drawn line graphics during the line graphics drawing process; determine the first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics; determine at least one plane line graphics corresponding to the first three-dimensional model, the plane line graphics include at least two different types of lines, and the combination of line types in different plane line graphics is different; determine the first plane line graphics from at least one plane line graphics, draw the line graphics based on the first plane line graphics, and the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics;
[0100] The memory 82 is used to store the program for the processor to execute the above-mentioned processing process.
[0101] Further, the processor draws a line graphic based on the first plane line graphic, including:
[0102] The processor adjusts the scale of the first plane line graphic based on the lines of the drawn line graphic, and outputs the first plane line graphic after the scale adjustment as the drawn line graphic.
[0103] Further, the processor draws a line graphic based on the first plane line graphic, including:
[0104] The processor determines the position of each line in the first planar line pattern and the type of line at each position;
[0105] The type of the lines of the drawn line graphic is adjusted based on the position of each line and the type of the line at each position, so that the lines of the drawn line graphic match the line types of the lines of the first plane line graphic at the corresponding positions.
[0106] Further, the processor determines a first planar line pattern from at least one planar line pattern, including:
[0107] The processor selects a first planar line pattern from among at least one planar line pattern based on a user operation;
[0108] or,
[0109] The processor selects a first planar line pattern of at least one planar line pattern based on the graphic input intention.
[0110] Further, the processor selects a first planar line graphic from at least one planar line graphic based on the user's operation, including:
[0111] The processor determines the selected plane line pattern as a first plane line pattern based on a user's selection operation on one of the at least one plane line patterns;
[0112] or,
[0113] The processor selects a plane line graphic that matches the line graphic after the adjustment operation from at least one plane line graphic based on the user's adjustment operation on the type of at least one line in the drawn line graphic, and determines it as the first plane line graphic.
[0114] Further, the processor determines a first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics, including:
[0115] The processor determines at least one stereoscopic model based on the lines of the drawn line graphic; and determines a first stereoscopic model matching the drawn lines from the at least one stereoscopic model based on the user's operation.
[0116] The electronic device disclosed in this embodiment is implemented based on the graphics drawing method disclosed in the above embodiments, which will not be described in detail here.
[0117] The electronic device disclosed in this embodiment obtains the lines of the drawn line graphics during the drawing process of the line graphics, determines the first stereoscopic model matching the drawn lines based on the lines of the drawn line graphics, determines at least one plane line graphics corresponding to the first stereoscopic model, and the plane line graphics include at least two different types of lines, and the combination of line types in different plane line graphics is different; determines the first plane line graphics from at least one plane line graphics, draws the line graphics based on the first plane line graphics, and the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics. In the drawing process of the line graphics of this scheme, based on the line analysis of the drawn line graphics, at least one plane line graphics matching therewith is determined, and one is selected from them, so as to complete the drawing of the line graphics based on the selected first plane line graphics, so that the combination of line types of the drawn line graphics matches the combination of line types of the first plane line graphics, so that there is no need to switch the line types during the drawing process, and the adjustment of the line types of the drawn line graphics can be completed directly based on the selected first plane line graphics, thereby improving the user experience.
[0118] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0119] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0120] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0121] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A graphics drawing method, comprising: In the process of drawing a line graphic using an electronic device, obtaining lines of the drawn line graphic; Determining a first three-dimensional model matching the drawn lines based on the drawn lines of the line graphic; Determine a plurality of plane line graphics corresponding to the first three-dimensional model, wherein the plane line graphics include at least two different types of lines, and different plane line graphics have different combinations of line types; A first plane line graphic is determined from the plurality of plane line graphics, the line graphic is drawn based on the first plane line graphic, and a combination of line types of the drawn line graphic matches a combination of line types of the first plane line graphic.
2. The method according to claim 1, wherein: The step of drawing the line graphic based on the first plane line graphic includes: The proportion of the first plane line graphic is adjusted based on the lines of the drawn line graphic, and the first plane line graphic after the proportion is adjusted is output as the drawn line graphic.
3. The method according to claim 1, wherein: The step of drawing the line graphic based on the first plane line graphic includes: Determine the position of each line in the first plane line pattern and the type of the line at each position; The type of the lines of the drawn line graphic is adjusted based on the position of each line and the type of the line at each position, so that the lines of the drawn line graphic match the line types of the lines of the first plane line graphic at the corresponding positions.
4. The method according to claim 3, wherein: Also includes: If the drawn line graphic is not a complete line graphic corresponding to the first plane line graphic, a line group to be supplemented in the line graphic is determined based on the line positions and line types in the first plane line graphic, and the line group to be supplemented is drawn.
5. The method according to claim 1, wherein: The step of determining a first planar line pattern from the plurality of planar line patterns comprises: selecting a first planar line graphic from among the plurality of planar line graphics based on a user operation; or, A first planar line graphic among the plurality of planar line graphics is selected based on the graphic input intention.
6. The method according to claim 5, wherein: The selecting the first plane line graphic from the plurality of plane line graphics based on the user's operation includes: Based on a user's selection operation on one of the plurality of plane line graphics, determining the selected plane line graphic as a first plane line graphic; or, Based on the user's adjustment operation on the type of at least one line in the drawn line graphics, a plane line graphic matching the line graphic after the adjustment operation is selected from the multiple plane line graphics and determined as the first plane line graphic.
7. The method according to claim 1, wherein: The determining, based on the drawn lines of the line graphic, a first three-dimensional model matching the drawn lines comprises: Determining at least one three-dimensional model based on the drawn lines of the line graphic; A first three-dimensional model matching the drawn line is determined from the at least one three-dimensional model based on a user's operation.
8. The method according to claim 7, wherein: The determining, based on the user's operation, a first three-dimensional model matching the drawn line from the at least one three-dimensional model comprises: Obtaining a line drawn by a user to supplement the drawn line graphic; Based on the analysis of the line graphics after the supplementary drawing, a first three-dimensional model matching the line graphics after the supplementary drawing is determined from the at least one three-dimensional model.
9. An electronic device, comprising: A processor, configured to obtain lines of the drawn line graphic during the process of drawing the line graphic using the electronic device; Determine a first three-dimensional model matching the drawn lines based on the lines of the drawn line graphics; determine a plurality of plane line graphics corresponding to the first three-dimensional model, the plane line graphics including at least two different types of lines, and different plane line graphics have different combinations of line types; determine a first plane line graphic from the plurality of plane line graphics, draw the line graphic based on the first plane line graphic, and the combination of line types of the drawn line graphic matches the combination of line types of the first plane line graphic; The memory is used to store the program for the processor to execute the above processing process.
10. The device according to claim 9, wherein: The processor draws the line graphic based on the first plane line graphic, including: The processor adjusts the scale of the first plane line graphic based on the lines of the drawn line graphic, and outputs the first plane line graphic after the scale adjustment as the drawn line graphic.
