CN113297401B - Half data structure generation method, data processing method, device and equipment - Google Patents

Half data structure generation method, data processing method, device and equipment Download PDF

Info

Publication number
CN113297401B
CN113297401B CN202010820153.6A CN202010820153A CN113297401B CN 113297401 B CN113297401 B CN 113297401B CN 202010820153 A CN202010820153 A CN 202010820153A CN 113297401 B CN113297401 B CN 113297401B
Authority
CN
China
Prior art keywords
design
arc
determining
region
data structure
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.)
Active
Application number
CN202010820153.6A
Other languages
Chinese (zh)
Other versions
CN113297401A (en
Inventor
龚楷楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meiping Meiwu Shanghai Technology Co ltd
Original Assignee
Meiping Meiwu Shanghai Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Meiping Meiwu Shanghai Technology Co ltd filed Critical Meiping Meiwu Shanghai Technology Co ltd
Priority to CN202010820153.6A priority Critical patent/CN113297401B/en
Publication of CN113297401A publication Critical patent/CN113297401A/en
Application granted granted Critical
Publication of CN113297401B publication Critical patent/CN113297401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5854Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using shape and object relationship
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment provides a method for generating a half data structure, a data processing method, a device and equipment, wherein the method comprises the following steps: acquiring a two-dimensional design drawing; identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs and circles; determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc; storing the design elements according to the intersection point and the direction information to generate a half data structure, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles. According to the embodiment, the half data structure is generated through the intersection point between any two design elements and the direction information corresponding to the design elements, so that the quality and the efficiency of generating the half data structure are effectively ensured, and the data can be accurately and effectively identified.

Description

Half data structure generation method, data processing method, device and equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method, a device, and an apparatus for generating a half data structure.
Background
In the prior art, aiming at a two-dimensional sketch in application scenes such as home decoration design, a circle and an arc need to be identified so that a designer can design based on a circular area or an arc area, for example: the round area can be subjected to color design, pattern design, decoration material design and the like. One implementation way of identifying the circle or the arc is as follows: the circle and the arc are identified by adopting a discretization method, however, the identification result of the circle and the arc by adopting the method is often a zigzag discretization curve, namely, a smooth circle or arc area of the line cannot be obtained, so that when a designer designs based on the identified circle or arc, the expected effect cannot be achieved. Another implementation is: the circles are expressed by continuous circular arcs, specifically, for a complete circle, two circular arcs are used for simulating the circle, so that the accuracy of identifying the circle is easy to be reduced. For example, a user draws a complete circle, and due to the lack of an algorithm for identifying or constructing the circle, two semicircles are obtained, and if other graphic cutting operations are input to the circle, the number of circular arcs is increased, so that the accuracy and the reliability for identifying the circle are seriously affected.
Disclosure of Invention
The embodiment of the application provides a generation method, a data processing method, a device and equipment of a half data structure, which are used for ensuring and improving the accuracy and reliability of identification processing of data and meeting the design requirements of different users.
In a first aspect, an embodiment of the present application provides a method for generating a half data structure, including:
acquiring a two-dimensional design drawing;
identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs and circles;
determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc;
storing the design element according to the intersection point and the direction information to generate the half data structure, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
In a second aspect, an embodiment of the present application provides a device for generating a half data structure, including:
the first acquisition module is used for acquiring a two-dimensional design drawing;
The first recognition module is used for recognizing design elements included in the two-dimensional design drawing, and the design elements comprise at least one of the following: straight lines, circular arcs and circles;
a first determining module, configured to determine an intersection point formed between any two design elements, and direction information corresponding to the design elements, where the direction information includes at least one of: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc;
the first generation module is used for storing the design elements according to the intersection points and the direction information to generate the half data structure, and the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; the memory is configured to store one or more computer instructions, where the one or more computer instructions when executed by the processor implement a method for generating a half data structure as described in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program, where the computer program makes a computer execute a method for generating a half data structure as described in the first aspect.
In a fifth aspect, an embodiment of the present invention provides a data processing method, including:
acquiring a two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs and circles;
identifying at least one region edge corresponding to a first design element based on the half-edge data structure and region information corresponding to the circle, the first design element including at least one of: straight lines and circular arcs;
determining at least one first closed region by using the first design element and the corresponding at least one region edge; determining the area information corresponding to the circular area as a second closed area;
and determining a target closed area corresponding to the two-dimensional design drawing based on the first closed area and the second closed area so as to perform design filling operation on the target closed area.
In a sixth aspect, an embodiment of the present invention provides a data processing apparatus, including:
the second acquisition module is used for acquiring a two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs and circles;
A second identifying module, configured to identify, based on the half-edge data structure, at least one region edge corresponding to a first design element and region information corresponding to the circle, where the first design element includes at least one of: straight lines and circular arcs;
a second determining module, configured to determine at least one first enclosed area by using the first design element and the corresponding at least one area edge; determining the area information corresponding to the circular area as a second closed area;
and the first processing module is used for determining a target closed area corresponding to the two-dimensional design drawing based on the first closed area and the second closed area so as to perform design filling operation on the target closed area.
In a seventh aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the data processing method shown in the fifth aspect.
In an eighth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program, which when executed by a computer, implements the data processing method shown in the fifth aspect.
In a ninth aspect, an embodiment of the present application provides a data processing method, including:
acquiring a design operation corresponding to the two-dimensional design drawing;
determining a data set of design elements based on the design operation and the two-dimensional design graph, the design elements including at least one of: a first design element corresponding to the two-dimensional design drawing and a second design element corresponding to the design operation;
determining a half data structure corresponding to the data set, the half data structure corresponding to at least one of: straight lines, circular arcs and circles;
and determining target design data according to the half data structure, wherein the target design data comprises at least one closed area corresponding to the design operation.
In a tenth aspect, embodiments of the present application provide a data processing apparatus, including:
the third acquisition module is used for acquiring design operation corresponding to the two-dimensional design drawing;
a third determination module for determining a data set based on the design operation and the two-dimensional design drawing;
the third determining module is further configured to determine a half data structure corresponding to the data set, where the half data structure corresponds to at least one of: straight lines, circular arcs and circles corresponding to the data sets;
And the third processing module is used for determining target design data according to the half data structure, wherein the target design data comprises at least one closed area corresponding to the design operation.
In an eleventh aspect, embodiments of the present application provide an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the data processing method shown in the ninth aspect.
In a twelfth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program that causes a computer to implement the data processing method shown in the ninth aspect described above when executed.
According to the generating method, the data processing method, the device and the equipment of the half data structure, the two-dimensional design diagram is obtained, the design elements included in the two-dimensional design diagram are identified, the intersection point formed between any two design elements and the direction information corresponding to the design elements are determined, then the design elements can be stored according to the intersection point and the direction information, and therefore the accuracy and the reliability of generating the half data structure are effectively guaranteed, analysis processing of the half data structure is facilitated, and the practicability of the method is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for generating a half data structure according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of determining a data set corresponding to the two-dimensional design drawing based on the design operation according to the embodiment of the present application;
FIG. 5 is a schematic flow chart of processing the two-dimensional design drawing set based on the design structural element to obtain a data set corresponding to the two-dimensional design drawing according to the embodiment of the present application;
FIG. 5a is a schematic diagram I of obtaining a data set corresponding to the two-dimensional design drawing according to an embodiment of the present application;
FIG. 5b is a schematic diagram II of obtaining a data set corresponding to the two-dimensional design drawing according to the embodiment of the present application;
FIG. 5c is a schematic diagram of a half data structure according to an embodiment of the present disclosure;
fig. 6 is a schematic view of a scenario of a data processing method according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating another data processing method according to an embodiment of the present disclosure;
FIG. 8 is a flowchart of traversing the data set based on the design structure elements corresponding to the design operation to obtain a half data structure corresponding to the data set according to the embodiment of the present application;
fig. 8a is a schematic diagram of storing the line segments in the half data structure according to a preset direction according to an embodiment of the present application;
FIG. 9 is a flowchart of another data processing method according to an embodiment of the present disclosure;
FIG. 10 is a flowchart illustrating another data processing method according to an embodiment of the present disclosure;
FIG. 11 is a schematic flow chart of determining target design data according to the half data structure according to an embodiment of the present application;
FIG. 11a is a schematic diagram of acquiring at least one region edge corresponding to the straight line and/or the circular arc according to an embodiment of the present application;
Fig. 12 is a schematic flow chart of acquiring at least one region edge corresponding to the straight line and/or the circular arc according to an embodiment of the present application;
FIG. 13 is a schematic flowchart of determining at least one region edge corresponding to the straight line and/or the circular arc based on the first position information according to the embodiment of the present application;
FIG. 13a is a schematic diagram of determining at least one region edge corresponding to the straight line and/or the circular arc based on the at least one angle provided in an embodiment of the present application;
FIG. 14 is a schematic flow chart of determining target design data according to the half data structure according to an embodiment of the present application;
FIG. 15 is a schematic flow chart of determining target design data according to the half data structure according to an embodiment of the present application;
FIG. 15a is a schematic view of determining at least one area arc in at least one connecting arc according to the curvature of the arc according to an embodiment of the present application;
FIG. 16 is a flowchart of another data processing method according to an embodiment of the present disclosure;
FIG. 16a is a schematic diagram of determining configuration information of the at least one enclosed area according to an embodiment of the present application;
FIG. 17 is a flowchart of another data processing method according to an embodiment of the present disclosure;
FIG. 18 is a flowchart of another data processing method according to an embodiment of the present disclosure;
FIG. 19 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 20 is a schematic structural diagram of a generating device of a half data structure according to an embodiment of the present application;
fig. 21 is a schematic structural diagram of an electronic device corresponding to the generating device of the half data structure shown in fig. 20;
FIG. 22 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 23 is a schematic diagram of an electronic device corresponding to the data processing apparatus shown in FIG. 22;
FIG. 24 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 25 is a schematic diagram illustrating an electronic device corresponding to the data processing apparatus shown in FIG. 24;
fig. 26 is a flow chart of a data processing method according to an embodiment of the present application;
FIG. 27 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 28 is a schematic structural diagram of an electronic device corresponding to the data processing apparatus shown in fig. 27.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two, but does not exclude the case of at least one.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or system comprising such elements.
Interpretation of the terms
Half data structure: is an edge representation method, which is characterized in that all operations (operations of cutting, creating, editing, etc.) performed thereon can be completed within a preset time, for example: when the half data structure is cut into N parts, the preset time may be k×n, where k is a preset coefficient; when querying against a half data structure, a data query operation may be performed using "half" rather than "edge" as a base unit.
In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present application by those skilled in the art, the following description describes related technologies:
In the prior art, aiming at a two-dimensional sketch in application scenes such as home decoration design, a circle and an arc need to be identified, and one implementation mode is as follows: the discretization method is adopted to identify the circles and the circular arcs, however, the identification of the circles and the circular arcs by the method is often a zigzag discretization curve, and the requirements of designers cannot be met. For example, a complete circle is not included in the two-dimensional sketch, and for a complete circle, a polygon (hexagon, dodecagon) may be used to simulate a complete circle, where the identified circle or arc is a saw-tooth discretization curve.
Another implementation is: the circle is expressed in terms of a continuous arc, and in particular, for a complete circle, two arcs are required to simulate a circle. However, since the algorithm for analyzing the two-dimensional sketch lacks the algorithm for constructing a half-edge data structure for the circle and storing the half-edge data structure in the selfing edge set, a complete circle is split into two semicircles, and then the two semicircles are analyzed by utilizing the processing strategy for the straight line and the circular arc. In addition, due to the lack of an algorithm for identifying the circle, the accuracy and reliability of identifying the circle are easily reduced, for example, a user draws a complete circle, due to the lack of an algorithm for constructing the circle, two semicircles are obtained, and if other execution operations are input to the circle, the number of arcs is increased in subsequent execution operations, so that the accuracy and reliability of identifying the circle are seriously affected.
In order to ensure and improve the accuracy and reliability of identification processing of data and meet the design requirements of different users, the embodiment provides a generation method, a data processing method, a device and equipment of a half data structure, which are used for identifying design elements included in a two-dimensional design diagram by acquiring the two-dimensional design diagram, determining intersection points formed between any two design elements and direction information corresponding to the design elements, and then storing the design elements according to the intersection points and the direction information, thereby effectively ensuring the accuracy and reliability of generation of the half data structure, facilitating analysis processing of the half data structure, further improving the practicability of the method and being beneficial to market popularization and application.
The data processing method provided by each embodiment of the present application is specifically described below through an exemplary application scenario.
Fig. 1 is a flow chart of a method for generating a half data structure according to an embodiment of the present application; referring to fig. 1, the present embodiment provides a method for generating a half data structure, where an execution body of the method may be a generating device of the half data structure, and it is understood that the generating device may be implemented as software, or a combination of software and hardware. Specifically, the method for generating the half data structure may include:
Step S101: and obtaining a two-dimensional design drawing.
Step S102: identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs, and circles.
Step S103: determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc.
Step S104: storing the design elements according to the intersection point and the direction information to generate a half data structure, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
The following describes each of the above steps in detail:
step S101: and obtaining a two-dimensional design drawing.
The two-dimensional design chart refers to data that needs to be processed, and it can be understood that the two-dimensional design chart may have different manifestations according to different application scenarios, for example: the two-dimensional design map may be house hold design data, machine design data, building design data, animation design data, and the like.
In addition, the specific obtaining manner of the two-dimensional design chart is not limited in this embodiment, and a person skilled in the art may set the two-dimensional design chart according to specific application requirements and design requirements, for example: the user can directly input and execute the operation to the generating device of the half data structure, so that the generating device of the half data structure can directly acquire the two-dimensional design drawing. Or the two-dimensional design drawing is stored in the preset area, and the two-dimensional design drawing can be obtained by accessing the preset area, so that the two-dimensional design drawing is directly and stably obtained by the generating device of the half data structure.
In some examples, obtaining the two-dimensional design map may include: acquiring an original design drawing and a design operation corresponding to the original design drawing; and processing the original design drawing according to the design operation to obtain a two-dimensional design drawing.
The design operation is used for editing an original area corresponding to the two-dimensional design drawing, and in specific implementation, the design operation may include at least one of the following: a cutting operation of a data area, an adding operation of a data area, a deleting operation of a data area, and the like. In addition, the specific acquisition mode of the design operation is not limited in this embodiment, and those skilled in the art may set the specific acquisition mode according to the specific application requirement and the design requirement, for example: the user can directly perform an operation on the data processing apparatus input, so that the data processing apparatus can directly acquire a design operation corresponding to the two-dimensional design drawing. Or, a plurality of alternative editing operations are stored in the preset area, and after the two-dimensional design drawing is acquired, the user can select or determine the design operation corresponding to the two-dimensional design drawing from the plurality of alternative editing operations, so that the data processing device can directly and stably acquire the design operation corresponding to the two-dimensional design drawing.
In still other examples, obtaining the two-dimensional design map may include: acquiring an original design drawing and performing region division operation corresponding to the original design drawing; and carrying out region division processing on the original design drawing according to the region division operation to obtain a two-dimensional design drawing.
After the original design diagram and the region division operation corresponding to the original design diagram are obtained, the original design diagram can be divided into a plurality of different regions according to the region division operation, and further different two-dimensional design diagrams formed by the different regions can be obtained, so that different design operations can be carried out on different regions of the same original design diagram, and the use requirements and the design requirements of different users are met.
Of course, those skilled in the art may acquire the two-dimensional design chart in other manners, so long as the accuracy and reliability of acquiring the two-dimensional design chart can be ensured, and details thereof will not be repeated herein.
Step S102: identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs, and circles.
After the two-dimensional design drawing is acquired, the two-dimensional identification drawing may be analyzed to identify design elements included in the two-dimensional design drawing, where the design elements may include at least one of: straight lines, circular arcs, and circles. Specifically, identifying the design elements included in the two-dimensional design drawing may include: obtaining structural feature information corresponding to the two-dimensional design drawing; design elements included in the two-dimensional design drawing are identified based on the structural feature information.
In some examples, the structural feature information may include at least one of: size information, position information, and location area information. Since the straight line, the circular arc, or the circle has different structural features, the straight line, the circular arc, and the circle included in the two-dimensional design drawing can be identified by acquiring structural feature information corresponding to the two-dimensional design drawing. Specifically, after the two-dimensional design drawing is obtained, a preset structure recognition algorithm may be used to analyze the two-dimensional design drawing to obtain structural feature information corresponding to the two-dimensional design drawing, where the structural feature information may include at least one of the following: size information, position information, and location area information. After the structural feature information is acquired, design elements included in the two-dimensional design drawing may be determined based on a mapping relationship between the structural feature and a straight line, an arc, or a circle.
After the design elements included in the two-dimensional design drawing are acquired, the design elements can be stored in a preset sequence (a preset positive direction, a preset negative direction, a preset clockwise direction, a preset counterclockwise direction, etc.), so that the accuracy and the reliability of acquiring the design elements are effectively ensured.
Step S103: determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc.
After the design elements are obtained, whether an intersection point exists between any two design elements can be identified, specifically, position information corresponding to any two design elements can be obtained, and whether the intersection point exists between any two design elements can be determined by analyzing and processing the two position information.
After the design element is acquired, the direction information of the design element may be analyzed to determine direction information corresponding to the design element, where the direction information may include at least one of: a straight line direction corresponding to a straight line, an arc direction corresponding to an arc, and the like.
Step S104: storing the design elements according to the intersection point and the direction information to generate a half data structure, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
After the intersection and direction information is acquired, the design elements may be stored according to the intersection and direction information, so that a half data structure may be generated, where the half data structure corresponds to at least one of the following elements: straight lines, circular arcs, and circles.
According to the method for generating the half data structure, provided by the embodiment, the two-dimensional design diagram is obtained, the design elements included in the two-dimensional design diagram are identified, the intersection point formed between any two design elements and the direction information corresponding to the design elements are determined, then the design elements can be stored according to the intersection point and the direction information, so that the accuracy and the reliability of generating the half data structure are effectively ensured, the analysis processing of the half data structure is facilitated, and the practicability of the method is further improved.
In some examples, after generating the half data structure, the method in this embodiment may further include: generating a hint information corresponding to the half data structure, the hint information being used to hint a user to perform feedback operations on the half data structure, the feedback operations may include a validation operation, an update operation, a modification operation, and so on.
In some examples, after generating the half data structure, the method in this embodiment may further include: acquiring feedback information input by a user aiming at a half data structure; and updating the half-edge data structure according to the feedback information.
After the half data structure is acquired, the prompt information corresponding to the half data structure may be generated and displayed, and after the prompt information is acquired, the user may input feedback information for the half data structure according to the prompt information, where the feedback information may be used to identify whether the acquired half data structure is correct, for example: when the obtained half data structure is accurate and free, a user can input confirmation feedback information aiming at the half data structure; when the obtained half data structure has deviation, the user can input updated feedback information for the half data structure. After the feedback information is acquired, the half data structure can be updated based on the feedback information, so that the user can accurately identify the generated half data structure, and the quality and efficiency of generating the half data structure are further improved.
In still other examples, after determining that the generated half data structure has a deviation, the half data structure may be updated according to feedback information input by a user to obtain an updated second half data structure, and then an algorithm for generating the half data structure may be optimized based on the updated second half data structure and the generated half data structure to improve accuracy of generating the half data structure.
In other examples, the method in this embodiment may further include: and acquiring a three-dimensional conversion request aiming at the two-dimensional design drawing, and converting the two-dimensional design drawing into a three-dimensional design drawing according to the three-dimensional conversion request, wherein the three-dimensional design drawing comprises a three-dimensional target closed area corresponding to the two-dimensional design drawing.
After the two-dimensional design drawing is obtained, a user can perform image conversion operation on the two-dimensional design drawing according to requirements, so that the two-dimensional design drawing can be converted into the three-dimensional design drawing, at the moment, the three-dimensional design drawing can comprise a three-dimensional target closed area corresponding to the two-dimensional design drawing, thereby being beneficial to improving the design filling operation of the user on the three-dimensional target closed area, and further improving the accuracy and reliability of processing the two-dimensional design drawing.
Fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application; with reference to fig. 2, the present embodiment provides a data processing method, and an execution subject of the method may be a data processing apparatus, and it is understood that the data processing apparatus may be implemented as software, or a combination of software and hardware. Specifically, the data processing method may include:
step S201: acquiring a two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
In some examples, obtaining the two-dimensional design map may include: acquiring an original design drawing and performing region division operation corresponding to the original design drawing; and carrying out region division processing on the original design drawing according to the region division operation to obtain a two-dimensional design drawing. The specific obtaining manner of the two-dimensional design drawing is similar to that of step S101 in the above embodiment, and reference may be made to the above description for details, which are not repeated here.
After the two-dimensional design is obtained, the two-dimensional design may be analyzed to obtain a half data structure corresponding to the two-dimensional design. Specifically, acquiring the half data structure corresponding to the two-dimensional design drawing may include: identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs and circles; determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc; storing the design elements according to the intersection point and the direction information to generate a half data structure, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
Specifically, identifying the design elements included in the two-dimensional design drawing may include: obtaining structural feature information corresponding to the two-dimensional design drawing; design elements included in the two-dimensional design drawing are identified based on the structural feature information. Wherein the structural feature information may include at least one of: size information, position information, and location area information.
After the design elements included in the two-dimensional design drawing are obtained, the intersection point formed between any two design elements and the direction information corresponding to the design elements may be determined, specifically, the specific determination manner of the intersection point formed between any two design elements and the direction information corresponding to the design elements is similar to the determination manner of the intersection point formed between any two design elements and the direction information corresponding to the design elements in the above embodiment, and the description thereof will not be repeated herein with reference to the above description.
After the intersection point formed between any two design elements and the direction information corresponding to the design elements are obtained, the design elements can be stored according to the intersection point and the direction information, so that the accuracy and the reliability of generating the half-edge data structure are effectively ensured.
Step S202: based on the half-edge data structure, at least one region edge corresponding to a first design element and region information corresponding to a circle are identified, the first design element including at least one of: straight lines and circular arcs.
After the half data structure is acquired, the first design element may be analyzed based on the half data structure to identify at least one region edge corresponding to the first design element and region information corresponding to the circle, where the first design element may include at least one of the following: straight lines and circular arcs. In some examples, identifying at least one region edge corresponding to the first design element based on the half-edge data structure may include: acquiring first position information corresponding to a first design element; at least one region edge corresponding to the first design element is determined based on the first location information. When a circle is corresponding to the half data structure, the area information corresponding to the circle can be acquired, and the area information corresponding to the circle is the area covered by the circle.
Step S203: determining at least one first enclosed region using the first design element and the corresponding at least one region edge; and determining the area information corresponding to the circular area as a second closed area.
After the first design element and the corresponding at least one region edge are acquired, analysis processing can be performed on the first design element and the corresponding at least one region edge to determine at least one first closed region, and after the circular region is acquired, region information corresponding to the circular region can be directly determined as a second closed region.
Step S204: and determining a target closed area corresponding to the two-dimensional design drawing based on the first closed area and the second closed area so as to perform design filling operation on the target closed area.
After the first closed region and the second closed region are acquired, the first closed region and the second closed region may be analyzed to determine a target closed region corresponding to the second design drawing, so as to facilitate a user to perform a design filling operation on the target closed region, where the design filling operation may include any one of the following: color filling operations, pigment filling operations, texture filling operations, design pattern filling operations, and the like.
According to the data processing method provided by the embodiment, a two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing are obtained, and then at least one region edge corresponding to a first design element and region information corresponding to a circle are identified based on the half data structure, wherein the first design element comprises at least one of the following components: straight lines and circular arcs; determining at least one first enclosed region using the first design element and the corresponding at least one region edge; determining the area information corresponding to the circular area as a second closed area; finally, determining a target closed area corresponding to the two-dimensional design drawing based on the first closed area and the second closed area, so that a user can conveniently design and fill the target closed area, and specifically, the half data structure can comprise at least one of the following: the method can accurately and effectively identify the intersection, coincidence and tangency conditions of various types of data such as circles, polygons, arcs and the like, can meet the design requirements of different users, further improves the practicability of the method, and is beneficial to popularization and application of markets.
In some examples, determining at least one region edge corresponding to the first design element based on the first location information may include:
step S2021: an endpoint of the first design element is determined based on the first location information.
Step S2022: at least one connecting edge intersecting the terminus is determined.
Step S2023: at least one region edge corresponding to the first design element is determined in the at least one connecting edge, wherein the at least one region edge and the first design element are used to generate a first closed region.
After the first design element is acquired, the first design element may be analyzed to acquire first location information corresponding to the first design element, and then at least one region edge corresponding to the first design element may be determined based on the first location information. Specifically, the end point of the first design element may be determined based on the first position information, and since the end point of the first design element may have a plurality of intersecting connection edges, after the end point is acquired, at least one connection edge intersecting the end point may be determined. After the at least one connection edge is acquired, at least one region edge corresponding to the first design element may be determined in the at least one connection edge, wherein the at least one region edge and the first design element are used to generate the first closed region.
Specifically, in the at least one connection edge, determining the at least one region edge corresponding to the first design element may include: acquiring at least one angle formed by at least one connecting edge and a first design element; at least one region edge corresponding to the first design element is determined based on the at least one angle.
After the at least one connection edge intersecting the end point is acquired, at least one angle formed by the at least one connection edge and the first design element may be acquired, and after the at least one angle is acquired, at least one region edge corresponding to the first design element may be determined based on the at least one angle.
In some examples, determining at least one region edge corresponding to the first design element based on the at least one angle may include: acquiring a minimum angle among at least one angle; and determining the connecting edge corresponding to the minimum angle as at least one area edge corresponding to the first design element.
In still other examples, determining at least one region edge corresponding to the first design element based on the at least one angle may include: determining a first region edge connected with the first design element in the at least one connecting edge; acquiring second position information of the first region side; at least one second region edge corresponding to the first region edge is determined based on the second position information, wherein the first region edge, the at least one second region edge, and the first design element are used to generate a first enclosed region.
In still other examples, when the circle and/or arc to which the half data structure corresponds is an inscribed structure; identifying at least one region edge corresponding to the first design element may include:
step S2024: an inscription point corresponding to the inscription structure is determined.
Step S2025: at least one connecting arc corresponding to the inscription point and an arc curvature corresponding to the at least one connecting arc are obtained.
Step S2026: in at least one connecting arc, at least one region edge corresponding to the first design element is determined as a function of the arc curvature, wherein the at least one region edge and the first design element are used to generate a first closed region.
The specific implementation manner of the above steps in this embodiment is similar to the specific acquisition manner of the first closed region in the following embodiment, and the following description may be referred to specifically, which is not repeated here.
In some examples, in at least one connecting arc, determining at least one region edge corresponding to the first design element from the arc curvature may include: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; and determining a connecting arc corresponding to the minimum arc curvature as at least one region side.
In still other examples, in at least one connecting arc, determining at least one region edge corresponding to the first design element from the arc curvature may include: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; determining a connecting arc corresponding to the minimum arc curvature as a first area arc; acquiring third position information of the arc of the first area; at least one second region arc corresponding to the first region arc is determined based on the third position information, wherein the first region arc, the at least one second region arc and the first design element are used for generating a first closed region.
In still other examples, after determining the target enclosed area corresponding to the two-dimensional design drawing, the method in the present embodiment may further include: and generating prompt information corresponding to the target enclosed area, wherein the prompt information is used for prompting a user to perform feedback operation on the target enclosed area, and the feedback operation can comprise a confirmation operation, an updating operation, a modification operation and the like.
In some examples, after generating the hint information corresponding to the target enclosed area, the method in the present embodiment may further include: acquiring feedback information input by a user aiming at a target closed area according to the prompt information; and updating the target closed area according to the feedback information.
After the target enclosed area is acquired, the prompt information corresponding to the target enclosed area may be generated and displayed, and after the prompt information is acquired, the user may input feedback information for the target enclosed area according to the prompt information, where the feedback information may be used to identify whether the acquired target enclosed area is correct, for example: when the obtained target closed area is accurate and correct, a user can input confirmation feedback information aiming at the target closed area; when the obtained target enclosed area has deviation, the user can input updated feedback information aiming at the target enclosed area. After the feedback information is acquired, the target closed region can be updated based on the feedback information, so that a user can effectively and accurately identify the generated target closed region, and the quality and efficiency of generating the target closed region are further improved.
In still other examples, after determining that the generated target closed region has a deviation, the target closed region may be updated according to feedback information input by a user to obtain an updated target closed region, and then an algorithm for generating the target closed region may be optimized based on the updated target closed region and the generated target closed region, so as to improve accuracy of generating the target closed region.
Fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present application; fig. 4 is a schematic view of a scenario of a data processing method according to an embodiment of the present application; with reference to fig. 3 to 4, the present embodiment provides a data processing method, the execution subject of which may be a data processing apparatus, and it is understood that the data processing apparatus may be implemented as software, or a combination of software and hardware. Specifically, the data processing method may include:
step S301: a design operation corresponding to the two-dimensional design drawing is acquired.
Step S302: determining a data set of design elements based on the design operation and the two-dimensional design drawing, the design elements including at least one of: a first design element corresponding to the two-dimensional design drawing and a second design element corresponding to the design operation.
Step S303: determining a half data structure corresponding to the data set, the half data structure corresponding to at least one of: straight lines, circular arcs and circles corresponding to the data sets.
Step S304: target design data including at least one closed region corresponding to a design operation is determined based on the half data structure.
The following describes each of the above steps in detail:
step S301: a design operation corresponding to the two-dimensional design drawing is acquired.
The two-dimensional design chart refers to data that needs to be processed, and it can be understood that the two-dimensional design chart may have different manifestations according to different application scenarios, for example: the two-dimensional design map may be house hold design data, machine design data, building design data, animation design data, and the like.
In addition, the design operation is used for editing the original area corresponding to the two-dimensional design drawing, and in specific implementation, the design operation may include at least one of the following: a cutting operation of a data area, an adding operation of a data area, a deleting operation of a data area, and the like. In addition, the specific acquisition mode of the design operation is not limited in this embodiment, and those skilled in the art may set the specific acquisition mode according to the specific application requirement and the design requirement, for example: the user can directly perform an operation on the data processing apparatus input, so that the data processing apparatus can directly acquire a design operation corresponding to the two-dimensional design drawing. Or, a plurality of alternative editing operations are stored in the preset area, and after the two-dimensional design drawing is acquired, the user can select or determine the design operation corresponding to the two-dimensional design drawing from the plurality of alternative editing operations, so that the data processing device can directly and stably acquire the design operation corresponding to the two-dimensional design drawing. Of course, those skilled in the art may also acquire the design operation corresponding to the two-dimensional design chart in other manners, so long as the accuracy and reliability of acquiring the design operation can be ensured, which will not be described herein.
Step S302: determining a data set of design elements based on the design operation and the two-dimensional design drawing, the design elements including at least one of: a first design element corresponding to the two-dimensional design drawing and a second design element corresponding to the design operation.
After the design operation is acquired, the two-dimensional design drawing may be subjected to a cutting process based on the design operation, so that a data set may be acquired by the design operation and the two-dimensional design drawing, wherein the data set may include at least one of: straight lines, circular arcs, and circles. Specifically, referring to FIG. 4, determining a data set of design elements based on a design operation and a two-dimensional design drawing may include:
step S3021: design structure elements corresponding to the design operation are determined.
Step S3022: a data set of design elements is obtained based on the design structural elements and original design elements corresponding to the original data set.
Wherein the design operation corresponds to a design structural element for implementing the design operation, the design structural element may include at least one of: an operation straight line, an operation circular arc and an operation circle. Thus, after the design operation is acquired, the design structural element corresponding to the design operation can be determined using the correspondence relationship between the design operation and the design structural element.
After the design structure elements are acquired, an original data set corresponding to the two-dimensional design drawing may be analyzed based on the design structure elements, wherein the original data set may include an original straight line, an original circular arc, and an original circle which correspond to the two-dimensional design drawing and are not subjected to editing operations, and the acquired design structure elements may be subjected to editing operations (cutting operations, adding operations, deleting operations, and the like) with the original data set, so that a data set corresponding to the two-dimensional design drawing may be acquired.
In some examples, referring to FIG. 5, obtaining a data set of design elements based on design structural elements and original design elements corresponding to the original data set may include:
step S30221: an intersection point between the design structural element and the original design element in the original data set is identified.
Step S30222: if the intersection point exists, editing the design structural element and the original design element based on the intersection point, and determining the edited design element as a data set. Or,
step S30223: if the intersection points do not exist, the design structural elements are added to the original design elements, and a data set is obtained.
After the design structural element is acquired, it may be identified whether there is an intersection between the design structural element and the original data set, i.e., whether there is an intersection between the design structural element and the original straight line, the original circular arc, and the original circle (original design element) included in the original data set. Specifically, the position information corresponding to the design structural element and the position information corresponding to the original data set can be obtained, and whether the intersection point exists between the design structural element and the original data set can be determined by analyzing and processing the two position information.
When there is no intersection point between the design structural element and the original data set, editing processing can be performed on the design structural element and the original data set based on the intersection point, so that a structure obtained after the editing processing can be obtained, and then the structure after the editing processing can be determined as a data set corresponding to the two-dimensional design drawing, wherein the data set can comprise at least one of the following: straight lines, circular arcs, and circles.
When an intersection point exists between the design structural element and the original data set, the design structural element can be directly added to the original data set to obtain a data set corresponding to the two-dimensional design drawing, so that the accuracy and the reliability of acquiring the data set are ensured.
For example, as shown in fig. 5a, the original data set includes a rectangular structure and a circular structure, the rectangular structure intersects with the circular structure, the design structural element is a straight line, the straight line intersects with the rectangular structure and the circular structure, that is, there is an intersection point between the design structural element and the original data set, at this time, a data set corresponding to the two-dimensional design drawing may be obtained, where the data set includes a straight line, an arc, a circle, and the like obtained after the rectangular structure and the circular structure are divided by the design structural element.
As shown in fig. 5b, the original data set includes a rectangular structure and a circular structure, the rectangular structure intersects with the circular structure, the design structural element is a circle, the straight line is independent from the rectangular structure and the circular structure, that is, there is no intersection point between the design structural element and the original data set, and at this time, the design structural element is added to the original data set, so that a data set corresponding to the two-dimensional design drawing can be obtained, and the data set includes the design structural element, the rectangular structure, the circular structure, and the like.
Step S303: determining a half data structure corresponding to the data set, the half data structure corresponding to at least one of: straight lines, circular arcs, and circles.
After the data set is acquired, the data set may be analyzed to determine a half data structure corresponding to the data set, the half data structure may include at least one of: straight lines, circular arcs and circles corresponding to the data sets. Specifically, the specific determination manner of the half data structure is not limited in this embodiment, and those skilled in the art may set the determination manner according to specific application requirements and design requirements, and preferably, determining the half data structure corresponding to the data set in this embodiment may include: traversing the data set based on the design structure elements corresponding to the design operation to obtain a half data structure corresponding to the data set, wherein the half data structure corresponds to at least one of the following: straight lines stored according to preset directions, circular arcs stored according to preset directions and circles with selfing marks, as shown in fig. 5c, the preset directions can comprise preset forward directions and preset reverse directions for the straight lines; for circles or arcs, the preset direction may include a preset clockwise direction and a preset counterclockwise direction.
Step S304: target design data including at least one closed region corresponding to a design operation is determined based on the half data structure.
After the half data structure is acquired, the half data structure may be analyzed to determine target design data corresponding to the two-dimensional design drawing, the target design data including at least one closed region corresponding to the design operation.
For example, referring to fig. 6, a two-dimensional design drawing includes a rectangular structure and a circular structure, the rectangular structure and the circular structure intersect, after a design operation for the two-dimensional design drawing is obtained, a design structural element corresponding to the design operation may be obtained, and if the design structural element is an operation straight line, a data set corresponding to the two-dimensional design drawing may be determined based on the design structural element if the operation straight line intersects the rectangular structure and the circular structure, where the data set includes a straight line, an arc, and a circle.
After the data set is acquired, a half data structure corresponding to the data set can be acquired based on the design structural element, wherein the half data structure corresponds to a straight line stored according to a preset direction, an arc stored according to the preset direction and a circle with a selfing mark. After the half data structure is acquired, the half data structure may be analyzed to determine at least one closed area corresponding to the half data structure, for example, the at least one closed area may include the closed area 1, the closed area 2, the closed area 3 and the closed area 4, so that accuracy and reliability of acquiring the target design data are effectively ensured.
In some examples, after the target design data is obtained, at least one enclosed area included in the target design data may be configured according to different configuration policies, e.g., the at least one enclosed area is configured to be made of different materials; or filling the at least one closed region with a different color; alternatively, the at least one enclosed region described above is configured to be composed of different textures, or the like.
According to the data processing method provided by the embodiment, the design operation corresponding to the two-dimensional design drawing is obtained, the data set is determined based on the design operation and the two-dimensional design drawing, the half data structure corresponding to the data set is determined, and then the target design data is determined according to the half data structure, so that the accuracy and the reliability of determining the target design data are ensured, and specifically, the half data structure can comprise at least one of the following: the method can accurately and effectively identify the intersection, coincidence and tangency conditions of various types of data such as circles, polygons, arcs and the like, can meet the design requirements of different users, further improves the practicability of the method, and is beneficial to popularization and application of markets.
FIG. 7 is a flowchart illustrating another data processing method according to an embodiment of the present disclosure; on the basis of the above embodiment, with continued reference to fig. 7, before the design operation corresponding to the two-dimensional design drawing is acquired, the method in this embodiment may further include:
step S501: and obtaining a two-dimensional design drawing.
Step S502: the original straight line, the original circular arc, and the original circle included in the two-dimensional design drawing are identified.
Step S503: storing an original straight line, an original circular arc and an original circle according to a preset sequence to obtain an original data set comprising original design elements, wherein the original design elements comprise at least one of the following: original straight line, original circular arc and original circle.
The two-dimensional design chart may refer to data before any processing operation or design operation, and the specific obtaining manner of the two-dimensional design chart is not limited in this embodiment, and a person skilled in the art may set the two-dimensional design chart according to specific application requirements and design requirements, for example: a person skilled in the art can obtain the two-dimensional design drawing through auxiliary design software; or the two-dimensional design drawing is stored in a preset area, and the two-dimensional design drawing can be obtained by accessing the preset area.
After the two-dimensional design drawing is obtained, the two-dimensional design drawing may be analyzed to identify an original straight line, an original circular arc, and an original circle included in the two-dimensional design drawing. In some examples, identifying the original straight line, the original circular arc, and the original circle included in the two-dimensional design drawing may include: obtaining structural feature information corresponding to the two-dimensional design drawing; and identifying an original straight line, an original circular arc and an original circle included in the two-dimensional design drawing according to the structural characteristic information.
Since the straight line, the circular arc, or the circle has different structural features, the straight line, the circular arc, and the circle included in the two-dimensional design drawing can be identified by acquiring structural feature information corresponding to the two-dimensional design drawing. Specifically, after the two-dimensional design drawing is obtained, a preset structure recognition algorithm may be used to analyze the two-dimensional design drawing to obtain structural feature information corresponding to the two-dimensional design drawing, where the structural feature information may include at least one of the following: size information, position information, and location area information. After the structural feature information is acquired, an original straight line, an original circular arc, and an original circle included in the two-dimensional design drawing may be determined based on a mapping relationship between the structural feature and the straight line, the circular arc, or the circle.
After the original straight line, the original circular arc and the original circle included in the two-dimensional design drawing are acquired, the original straight line, the original circular arc and the original circle can be stored according to a preset sequence (a preset positive direction, a preset negative direction, a preset clockwise direction, a preset anticlockwise direction and the like), so that the accuracy and the reliability of acquiring the original data set are effectively ensured.
In this embodiment, by acquiring the two-dimensional design drawing, identifying the original straight line, the original circular arc and the original circle included in the two-dimensional design drawing, and then storing the original straight line, the original circular arc and the original circle according to a preset sequence, the accuracy and the reliability of acquiring the original data set are ensured, the quality and the efficiency of analyzing and processing the two-dimensional design drawing are improved, and the quality and the efficiency of performing region cutting on the two-dimensional design drawing are further improved.
FIG. 8 is a flowchart of traversing a data set based on design structure elements corresponding to design operations to obtain a half data structure corresponding to the data set according to an embodiment of the present disclosure; in this embodiment, a specific implementation manner of obtaining a half data structure corresponding to a data set is not limited, and a person skilled in the art may set the half data structure according to specific application requirements and design requirements, where, specifically, for straight lines and circles included in the data set, the straight lines may be stored in the half data structure according to a preset direction, selfing identification operation is performed on the circles, and then the circles with selfing identification are stored in the half data structure.
With reference to fig. 8, the method for traversing the data set based on the design structure elements corresponding to the design operation to obtain the half data structure corresponding to the data set may include:
step S601: and obtaining a line segment corresponding to the circular arc in the data set based on the design structural element corresponding to the design operation.
After the design operation is acquired, then a design structure element corresponding to the design operation may be determined, and then a line segment corresponding to the circular arc in the data set is acquired based on the design structure element. Specifically, obtaining a line segment corresponding to an arc in the data set based on the design structure element corresponding to the design operation may include: discretizing the circular arcs in the data set based on design structural elements corresponding to the design operation to obtain a starting point and an ending point corresponding to the circular arcs; and determining a line segment corresponding to the circular arc according to the starting point and the ending point.
Specifically, after the design structural element corresponding to the design operation is obtained, discretization processing may be performed on the circular arcs included in the data set based on the design structural element, so that a start point and an end point corresponding to the circular arcs may be obtained, and then the start point and the end point may be connected, so that a line segment corresponding to the circular arcs may be obtained. It will be appreciated that one or more arcs may be included in the data set and each arc may correspond to a line segment, and thus one or more line segments corresponding to the one or more arcs may be included in the data set.
For example, referring to fig. 8a, for an arc, the arc may be discretized based on the obtained design structural element to obtain a start point a and an end point B corresponding to the arc, and then the start point a and the end point B may be connected, so as to obtain a line segment corresponding to the arc.
Step S602: and storing the line segments into a half data structure according to a preset direction.
After the line segment corresponding to the arc is obtained, the line segment may be stored in the half data structure according to a preset direction, where the preset direction may include a preset positive direction and a preset negative direction.
In this embodiment, a line segment corresponding to an arc in the data set is obtained through a design structure element corresponding to the design operation, and then the line segment is stored in the half data structure according to a preset direction, so that analysis processing of the arc included in the data set is effectively ensured, and accuracy and reliability of determining the half data structure based on the processed arc are improved.
FIG. 9 is a flowchart of another data processing method according to an embodiment of the present disclosure; on the basis of the above embodiment, referring to fig. 9, after determining the half data structure corresponding to the data set, the method in this embodiment may further include:
Step S701: the straight line and/or the circular arc included in the half data structure is acquired.
Step S702: the straight lines and/or arcs are stored in the edge set to generate a half-edge data structure.
Wherein the half data structure may comprise at least one of: the straight line, the circular arc and the circle can store data included in the half data structure according to different data types in order to facilitate analysis processing of the two-dimensional design drawing based on the half data structure. Since the straight line and the circular arc each correspond to an end point (a start point and an end point), the straight line and the circular arc can be stored in the edge set at the same time.
Specifically, after the half data structure corresponding to the data set is determined, the straight line and/or the circular arc included in the half data structure may be acquired by using a preset structure recognition algorithm, and after the straight line and/or the circular arc are acquired, the straight line and/or the circular arc may be stored in the edge set.
Example 1: the half data structure corresponds to a straight line, and after the half data structure is acquired, the straight line included in the half data structure can be acquired by using a preset structure identification algorithm, and then the straight line is stored in the edge set.
Example 2: the half data structure corresponds to an arc, and after the half data structure is acquired, the arc included in the half data structure can be acquired by using a preset structure identification algorithm, and then the arc is stored in the edge set.
Example 3: the half data structure corresponds to a straight line and an arc, and after the half data structure is acquired, the straight line and the arc included in the half data structure can be acquired by using a preset structure identification algorithm, and then the straight line and the arc are stored in the edge set.
Example 4: the half data structure does not comprise a straight line and an arc, after the half data structure is acquired, the half data structure can be analyzed and processed by utilizing a preset structure identification algorithm, and when the half data structure is determined to not comprise the straight line and the arc, no operation is required to be executed.
In this embodiment, the straight lines and/or the circular arcs included in the half data structure are acquired, and then the straight lines and/or the circular arcs are stored in the edge set, so that the edge set is convenient to analyze and process the two-dimensional design drawing, and the stability and reliability of the method are further improved.
FIG. 10 is a flowchart illustrating another data processing method according to an embodiment of the present disclosure; on the basis of the above embodiment, referring to fig. 10, after determining the half data structure corresponding to the data set, the method in this embodiment may further include:
Step S801: the circle included in the half data structure is obtained.
Step S802: the circles are stored in the selfing edge set to generate a half-edge data structure.
After the half data structure corresponding to the data set is determined, a circle included in the half data structure can be acquired by using a preset structure identification algorithm, and since a complete circle can directly correspond to a closed and enclosed area, after the circle is acquired, the circle can be added with the selfing identifier, and the circle added with the selfing identifier is stored in the selfing edge set.
Example 1: the half data structure corresponds to a circle, after the half data structure is acquired, a circle included in the half data structure can be acquired by utilizing a preset structure identification algorithm, then the circle is added with the selfing identification, and the circle added with the selfing identification is stored in the selfing edge set.
Example 2: the half data structure does not comprise a circle, after the half data structure is acquired, the half data structure can be analyzed and processed by utilizing a preset structure identification algorithm, and when the half data structure is determined to not comprise the circle, no operation is needed to be executed.
In this embodiment, circles included in the half data structure are acquired, and then the circles are stored in the selfing edge set, and since the edge set includes straight lines and/or circular arcs corresponding to the half data structure and the selfing edge set includes selfing circles, the edge set and/or the selfing edge set is convenient to analyze and process the two-dimensional design drawing, and the stability and reliability of the method are further improved.
FIG. 11 is a flowchart of determining target design data according to a half data structure according to an embodiment of the present application; based on the above embodiment, with continued reference to fig. 11, when the half data structure corresponds to a straight line and/or a circular arc; determining target design data from the half data structure in this embodiment may include:
step S901: at least one region edge corresponding to a straight line and/or a circular arc is acquired.
When the design structural element includes a straight line and/or an arc, it may be determined that the straight line and/or the arc must be included in the half data structure. Analysis may then be performed based on the straight lines and/or arcs included in the half-edge data structure to obtain at least one region edge corresponding to the straight lines and/or arcs. It is noted that at least one region edge may include an adjacent edge directly connected to a straight line and/or a circular arc, as well as other data edges directly connected to the adjacent edge.
For example, referring to fig. 11a, taking the operation line L1 as an example of a design structural element, at this time, an intersection formed by the operation line L1 and the two-dimensional design drawing includes P1, P2 and P3, then the two-dimensional design drawing may be analyzed with reference to a partial line segment O-P1 in the operation line L1, and at least one region edge corresponding to the partial line segment O-P1 may be obtained, where the at least one region edge may include: line segment P1-P '1, line segment P' 1-P '2, line segment P' 2-P '3, circular arc P' 3-P2, line segment P1-P '3, line segment P' 3-P '4, circular arc P' 4-P2, and line segment P1-P2.
It should be noted that, in the above implementation manner, at least one region edge obtained by performing analysis processing with reference to the partial line segment O-P1 in the operation line L1 may be obtained when performing analysis processing with reference to other line segments in the operation line L1, for example: based on the partial line segment P1-P2 in the operation line L1, the two-dimensional design diagram is analyzed, so that at least one region edge corresponding to the partial line segment P1-P2 can be obtained, where the at least one region edge may include the following: arc P2-P '3, arc P2-P' 4, arc P '3-P3, arc P' 4-P3, line segment P '3-P' 2, line segment P '2-P' 1, line segment P '1-P1, line segment P' 3-P '4, and line segment P' 3-P1.
Step S902: at least one first closed region is determined on the basis of the straight line and/or the circular arc, at least one region edge.
After the straight line and/or the circular arc and the at least one region edge are acquired, at least one first closed region may be determined based on the straight line and/or the circular arc, the at least one region edge. Specifically, referring to FIG. 11a, when the partial line segment O-P1 in the operation straight line L1 is used as a reference, the first closed region S1 can be determined based on at least one obtained region edge (line segment P1-P '1, line segment P' 1-P '2, line segment P' 1-P '3, circular arc P' 3-P2 and line segment P2-P1).
When the partial line segment P1-P2 in the operation straight line L1 is used as a reference, the first closed region S1 may be determined based on the acquired at least one region edge (line segment P1-P '1, line segment P' 1-P '2, line segment P' 1-P '3, circular arc P' 3-P2, and line segment P2-P1), and the first closed region S2 may be determined based on the acquired at least one region edge (line segment P1-P '3, line segment P' 3-P '4, and circular arc P' 4-P2).
Step S903: target design data is determined based on the at least one first enclosed region.
After the at least one first closed area is acquired, the at least one first closed area can be analyzed to determine target design data corresponding to the two-dimensional design drawing, namely, the target design data at the moment comprises the at least one first closed area, so that the quality and the efficiency of acquiring the target design data are effectively ensured.
Fig. 12 is a schematic flow chart of acquiring at least one region edge corresponding to a straight line and/or an arc according to an embodiment of the present application; based on the foregoing embodiments, referring to fig. 12, the implementation manner of obtaining at least one region edge corresponding to a straight line and/or an arc is not limited in this embodiment, and those skilled in the art may set the implementation manner according to specific application requirements and design requirements, and preferably, obtaining at least one region edge corresponding to a straight line and/or an arc in this embodiment may include:
Step S1001: first position information corresponding to a straight line and/or an arc is acquired.
Step S1002: at least one region edge corresponding to the straight line and/or the circular arc is determined based on the first position information.
After the straight line and/or the circular arc are obtained, the straight line and/or the circular arc can be analyzed and processed according to an image recognition algorithm so as to obtain first position information corresponding to the straight line and/or the circular arc. After the first position information is acquired, the first position information may be analyzed to determine at least one region edge corresponding to the straight line and/or the circular arc. Specifically, referring to fig. 13, determining at least one region edge corresponding to a straight line and/or an arc based on the first position information may include:
step S1101: based on the first position information, an end point of the straight line and/or the circular arc is determined.
Step S1102: at least one connecting edge intersecting the terminus is determined.
Step S1103: at least one connecting edge is defined as at least one region edge corresponding to a straight line and/or an arc, wherein the at least one region edge, the straight line and/or the arc serve to generate a closed region.
After the first position information is acquired, an end point with the straight line and/or the circular arc may be determined based on the first position information. It will be appreciated that the end point may be a start point of at least one region side and an end point may correspond to at least one connecting side, and that the at least one region side may be at least a portion of the at least one connecting side, so that, in order to be able to ensure accurate reliability of the acquisition of the at least one region side, after the end point of the straight line and/or the circular arc is acquired, the at least one connecting side intersecting the end point may be determined. At least one region edge corresponding to the straight line and/or the circular arc can then be defined in the at least one connecting edge.
In some examples, in at least one connecting edge, determining at least one region edge corresponding to a straight line and/or an arc may include: acquiring at least one angle formed between at least one connecting edge and a straight line and/or an arc; at least one region edge corresponding to the straight line and/or the circular arc is determined based on the at least one angle.
Specifically, determining at least one region edge corresponding to the straight line and/or the circular arc based on the at least one angle may include: acquiring a minimum angle among at least one angle; and determining the connecting edge corresponding to the minimum angle as at least one area edge corresponding to the straight line and/or the circular arc.
For example, referring to fig. 13a, taking the end point S1 of the straight line L1 as an example, after the end point S1 of the straight line L1 is obtained, at least one connecting edge corresponding to the end point S1 may be determined, where the at least one connecting edge may include a connecting edge 1, a connecting edge 2, a connecting edge 3, and a connecting edge 4. At least one angle formed between the at least one connecting side and the straight line may then be obtained, and specifically, the at least one angle may include an angle α1 between the straight line L1 and the connecting side 1, an angle α2 between the straight line L1 and the connecting side 2, an angle α3 between the straight line L1 and the connecting side 4, and an angle α4 between the straight line L1 and the connecting side 3.
After the at least one angle is obtained, a minimum angle may be obtained, and assuming that the minimum angle is an angle α1 between the straight line L1 and the connecting edge 1, the connecting edge 1 corresponding to the minimum angle α1 may be determined as at least one area edge corresponding to the straight line L1, where the connecting edge 1 is the next edge connected to the straight line L1, so as to form a closed area. It will be appreciated that the connecting edge 1 may be all or part of at least one of the regional edges, thereby effectively ensuring the exact reliability of the determination of the at least one regional edge.
In other examples, if the acquired region edge includes a first region edge directly connected to the straight line and a second region edge directly connected to the straight line, determining, in the at least one connection edge, at least one region edge corresponding to the straight line and/or the circular arc may include: determining a first area edge connected with a straight line and/or an arc in at least one connecting edge; acquiring second position information of the first region side; at least one second region edge is determined based on the second position information, wherein the first region edge, the at least one second region edge, the straight line and/or the circular arc are used to generate a closed region.
After the at least one connection edge is obtained, a first area edge directly connected to the straight line and/or the circular arc may be determined in the at least one connection edge, and an implementation manner of determining the first area edge in this embodiment is similar to that of determining the area edge in the above embodiment, and specific reference may be made to the above description and details are not repeated herein.
After the first region edge is obtained, analysis processing may be performed on the first region edge to determine a second region edge (other region edge) connected to the first region edge. Specifically, second position information of the first region edge can be acquired; at least one second region edge corresponding to the first region edge may then be determined based on the second position information, and it is understood that the first region edge is a region edge directly connected to the straight line, and the second region edge is a region edge directly connected to the first region edge, where the first region edge, the at least one second region edge, the straight line, and/or the circular arc are used to generate a closed region.
In this embodiment, by acquiring the first position information corresponding to the straight line and/or the circular arc, and then determining at least one region edge corresponding to the straight line and/or the circular arc based on the first position information, the accuracy and reliability of determining the at least one region edge are effectively ensured, and the quality and efficiency of analyzing and processing data are further improved.
FIG. 14 is a flowchart of determining target design data according to a half data structure according to an embodiment of the present application; based on the above embodiment, with continued reference to fig. 14, when the half data structure corresponds to a circle; determining target design data from the half data structure in this embodiment may include:
step S1201: and acquiring the region information of the circle.
Step S1202: the region information is determined as at least one second closed region.
Step S1203: target design data is determined based on the at least one second enclosed region.
Because the region information of a complete circle is a closed region, when the half data structure corresponds to the circle, the region information of the circle can be obtained, and it can be understood that the region information is the region information covered by the circle. After the region information is acquired, the region information may be determined as at least one second closed region, and the at least one second closed region may be determined as target design data.
It should be noted that, in other examples, the target design data may include not only the second closed area formed by the circle, but also at least one first closed area defined by the straight line and/or the circular arc, and at least one area edge, which are set by those skilled in the art according to specific application requirements and design requirements, and will not be described herein.
FIG. 15 is a flowchart of determining target design data according to a half data structure according to an embodiment of the present application; on the basis of the above embodiment, referring to fig. 15, when the circle and/or the arc corresponding to the half data structure is an inscribed structure, if the target design data is determined according to the above manner of determining the region side, the accuracy and reliability of determining the target design data cannot be ensured, and in this case, determining the target design data according to the half data structure in this embodiment may include:
step S1301: an inscription point corresponding to the inscription structure is determined.
Step S1302: at least one connecting arc corresponding to the inscription point and an arc curvature corresponding to the at least one connecting arc are obtained.
Step S1303: in the at least one connecting arc, at least one region arc is determined from the arc curvature.
Step S1304: at least one third enclosed region is determined based on the inscribed point, the at least one region arc.
Step S1305: target design data is determined based on the at least one third enclosed region.
Specifically, when the inscription structure corresponding to the circle and/or the arc is obtained, the inscription structure may be analyzed to determine an inscription point corresponding to the inscription structure. After the interior point is obtained, the interior point may be analyzed to obtain at least one connecting arc corresponding to the interior point and an arc curvature corresponding to the at least one connecting arc.
Because the number of the connecting arcs is at least two, one connecting arc is a small circular arc in the inscribed structure, the other connecting arc is a large circular arc in the inscribed structure, in order to accurately determine the target design data, at least one area arc can be determined according to the curvature of the arc in at least one connecting arc, wherein one realizable mode is that in at least one connecting arc, determining at least one area edge according to the curvature of the arc can comprise: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; and determining a connecting arc corresponding to the minimum arc curvature as a first area arc, wherein the first area arc and the inscription point are used for generating a closed area.
For example, referring to fig. 15a, when the half-edge data structure corresponds to a circle C1 and a circle C2, specifically, the circle C1 is tangent to the circle C2, the circle C1 is a small circle corresponding to the inscribed structure, the circle C2 is a large circle corresponding to the inscribed structure, and the tangent point of the circle C1 and the circle C2 is S. At this time, the at least one connection arc corresponding to the inscription point S may include an arc L1 and an arc L2, the arc curvature corresponding to the connection arc L1 being M1, the arc curvature corresponding to the connection arc L2 being M2, wherein M1 is smaller than M2. Since M1 is smaller than M2, the connection arc L1 corresponding to M1 may be determined as a first region arc, and the first region arc and the inscription point are used to produce a closed third closed region, which may be a section obtained by subtracting the circle C1 from the circle C2, as shown in fig. 15 a. After the third closed area is acquired, the target design data can be determined according to at least one third closed area, so that the accuracy and the reliability of acquiring the target design data are effectively ensured.
In yet another implementation, in the at least one connecting arc, determining the at least one region edge according to the arc curvature may include: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; determining a connecting arc corresponding to the minimum arc curvature as a first area arc; acquiring third position information of the arc of the first area; and determining at least one second area arc corresponding to the first area arc based on the third position information, wherein the first area arc, the at least one second area arc and the inscription point are used for generating a closed area.
After the at least one connection arc is obtained, a first area arc corresponding to the minimum arc curvature may be determined in the at least one connection arc, and an implementation manner of determining the first area arc in this embodiment is similar to that of determining the first area arc in the above embodiment, and specific reference may be made to the above description and details are not repeated herein.
After the first area arc is acquired, analysis processing may be performed on the first area arc to determine a second area arc (other area arcs) connected to the first area arc. Specifically, third position information of the arc of the first area can be obtained; and then determining at least one second area arc corresponding to the first area arc based on the third position information, wherein it is understood that the first area arc is an arc edge directly connected with the inscription point, the second area arc is an arc edge directly connected with the first area arc, and the first area arc, the at least one second area arc and the inscription point are used for generating a closed area (namely, a third closed area). After the third closed area is acquired, the target design data can be determined according to at least one third closed area, so that the accuracy and the reliability of acquiring the target design data are effectively ensured.
It will be appreciated that in other examples, the target design data may include not only the third closed area formed by the inscription point and the first area arc, but also at least one first closed area defined by the straight line and/or the arc, at least one area edge, and/or a second closed area corresponding to the circle, which may be set by those skilled in the art according to specific application requirements and design requirements, and will not be described herein.
In this embodiment, by acquiring the first position information corresponding to the straight line and/or the circular arc, and then determining at least one region edge corresponding to the straight line and/or the circular arc based on the first position information, the accuracy and reliability of determining the at least one region edge are effectively ensured, and the quality and efficiency of analyzing and processing data are further improved.
FIG. 16 is a flowchart of another data processing method according to an embodiment of the present disclosure; on the basis of any one of the foregoing embodiments, referring to fig. 16, the method in this embodiment may further include:
step S1401: an original region corresponding to the two-dimensional design drawing is acquired.
Step S1402: at least one scale information of the at least one enclosed region relative to the original region is determined.
Step S1403: and determining configuration information of at least one closed area according to the at least one proportion information.
The two-dimensional design diagram corresponds to an original area to be configured, and it can be understood that in different application scenarios, different configuration operations may be performed on the original area, for example: configuring home decoration materials and colors of an original area in an application scene of home decoration design; in the application scenario of mechanical design, the mechanical material, color, etc. of the original area are configured.
In order to improve the flexibility and reliability of the method, the method can perform region division operation on the original region corresponding to the two-dimensional design drawing and perform different configuration operations on the divided closed region. Specifically, the two-dimensional design drawing may be analyzed and identified to obtain an original area corresponding to the two-dimensional design drawing, where the original area may correspond to original configuration information. After the design operation for the two-dimensional design drawing is acquired, the original region may be subjected to a cutting operation based on the design operation, so that at least one closed region corresponding to the design operation may be obtained.
After the at least one occlusion region is acquired, the at least one occlusion region and the original region may be analyzed to determine at least one scale information of the at least one occlusion region relative to the original region, and it may be appreciated that one occlusion region may correspond to one scale information and different occlusion regions may correspond to different scale information. After at least one piece of scale information corresponding to the at least one closed area relative to the original area is obtained, the at least one piece of scale information may be analyzed to determine configuration information of the at least one closed area.
In some examples, determining the configuration information for the at least one enclosed area based on the at least one scale information may include: when the proportion information is larger than or equal to a preset threshold value, determining the configuration information of the closed area corresponding to the proportion information to be identical with the configuration information of the original area; or when the proportion information is smaller than the preset threshold value, determining the configuration information of the closed area corresponding to the proportion information as preset configuration information.
Specifically, a preset threshold value for analyzing and processing the comparative example information is preset, after the proportional information is obtained, the proportional information can be compared with the preset threshold value in an analysis mode, when the proportional information is greater than or equal to the preset threshold value, the fact that the closed area corresponding to the proportional information occupies a larger area of the original area at the moment is indicated, and then the configuration information of the closed area corresponding to the proportional information can be determined to be identical to the configuration information of the original area. When the proportion information is smaller than the preset threshold value, the fact that the closed area corresponding to the proportion information occupies a smaller area of the original area is indicated, and then the configuration information of the closed area corresponding to the proportion information can be determined to be preset configuration information, and the preset configuration information can be preset configuration information which is identical to or different from the configuration information of the original area.
For example, referring to fig. 16a, taking an original area corresponding to a two-dimensional design drawing as a rectangular area S, configuration information corresponding to the rectangular area S as P1, and preset configuration information as P2 as an example, after a design operation corresponding to the two-dimensional design drawing is obtained, an operation line L intersecting the rectangular area as a design structural element corresponding to a closed area operation is described, where the above operation line L may divide the rectangular area S into a closed area S1 and a closed area S2, and the sum of the areas of the closed area S1 and the closed area S2 is the rectangular area S.
After the acquisition of the closed area S1 and the closed area S2, at least one piece of scale information of at least one closed area with respect to the original area where it is located, that is, scale information z1=s1/S of the closed area S1 with respect to the rectangular area S, and scale information z2=s2/S of the closed area S2 with respect to the rectangular area S, may be determined. And then the proportion information can be analyzed and compared with a preset threshold value, and when Z1 is larger than the preset threshold value, the configuration information corresponding to the closed area S1 corresponding to Z1 can be used as configuration information P1. When Z2 is smaller than the preset threshold, the configuration information corresponding to the closed area S2 corresponding to Z2 may be the preset configuration information P2.
In this embodiment, by acquiring the original area corresponding to the two-dimensional design drawing, then determining at least one proportion information of at least one closed area relative to the original area, and determining the configuration information of at least one closed area according to at least one proportion information, it is effectively achieved that different closed areas can be acquired based on different cutting operations on the original area, and different configuration operations can be performed on the acquired closed areas, so that the flexibility and reliability of the method in use are further improved.
FIG. 17 is a flowchart of another data processing method according to an embodiment of the present disclosure; on the basis of any one of the foregoing embodiments, with continued reference to fig. 17, the method in this embodiment may further include:
step 1501: identifying whether the two-dimensional design drawing includes coincident identical structures.
Step 1502: and (3) including the overlapped identical structures in the two-dimensional design drawing, and performing de-duplication operation on the overlapped identical structures.
After the two-dimensional design is obtained, in order to improve the quality and efficiency of analyzing the two-dimensional design, the two-dimensional design may be analyzed to identify whether the two-dimensional design includes overlapping identical structures, where the overlapping identical structures may include at least one of: coincident identical data points, coincident identical straight lines, coincident identical circular arcs, coincident identical circles, and the like. When the identification result is that the two-dimensional design drawing comprises the same coincident structure, in order to avoid repeated operation of analysis processing on the same coincident structure, duplicate removal operation can be carried out on the same coincident structure, so that the quality and efficiency of analysis processing on the two-dimensional design drawing are improved.
FIG. 18 is a flowchart of another data processing method according to an embodiment of the present disclosure; on the basis of any one of the foregoing embodiments, with continued reference to fig. 18, the method in this embodiment may further include:
step S1601: position information and size information corresponding to at least one enclosed area are acquired.
Step S1602: based on the location information and the size information, a containment relationship between the at least one enclosed area is determined.
Step S1603: identification information corresponding to the at least one enclosed area is determined based on the inclusion relationship.
Step S1604: and determining target design data according to the identification information corresponding to the at least one closed area.
After the at least one closed area is acquired, the at least one closed area may be analyzed by using a preset recognition algorithm to acquire position information and size information corresponding to the at least one closed area. After the position information and the size information are acquired, a containment relationship between the at least one closed region may be determined based on the position information and the size information, and then identification information corresponding to the at least one closed region may be determined based on the containment relationship.
In some examples, the at least one enclosed region may include a first enclosed region and a second enclosed region; at this time, determining the identification information corresponding to the at least one closed region based on the inclusion relationship may include: when the first enclosed area is located inside the second enclosed area, then it is determined that the identification information corresponding to the first enclosed area includes a clockwise direction for identifying the inside area, and it is determined that the identification information corresponding to the second enclosed area includes a counterclockwise direction for identifying the outside area.
After the identification information corresponding to the at least one closed area is obtained, the target design data can be determined according to the identification information corresponding to the at least one closed area, and the identification information corresponding to the at least one closed area can be included in the target design data, so that the accuracy and the reliability of obtaining the target design data are effectively ensured, and the accuracy and the reliability of using the method are further improved.
In still other examples, after determining the target design data from the half data structure, the method in the present embodiment may further include: generating prompt information corresponding to at least one closed region included in the target design data, the prompt information being used to prompt a user to perform feedback operations on the at least one closed region, the feedback operations may include a confirmation operation, an update operation, a modification operation, and the like.
In some examples, after generating the hint information corresponding to the at least one closed area included in the target design data, the method in the present embodiment may further include: acquiring feedback information input by a user aiming at least one closed area according to the prompt information; and updating at least one closed area according to the feedback information.
After the at least one closed area is acquired, a prompt message corresponding to the at least one closed area may be generated and displayed, and after the prompt message is acquired, a user may input feedback information for the at least one closed area according to the prompt message, where the feedback information may be used to identify whether the acquired at least one closed area is correct, for example: when the obtained at least one closed region is accurate and free, the user can input confirmation feedback information aiming at the at least one closed region; when there is a deviation in the obtained at least one closed area, the user may input updated feedback information for the at least one closed area. After the feedback information is acquired, the at least one closed area can be updated based on the feedback information, so that the user can effectively and accurately identify the generated at least one closed area, and the quality and efficiency of generating the at least one closed area are further improved.
In still other examples, after determining that the generated at least one closed region has a deviation, the at least one closed region may be updated according to feedback information input by a user to obtain an updated at least one closed region, and then an algorithm for generating the at least one closed region may be optimized based on the updated at least one closed region and the generated at least one closed region to improve accuracy of generating the at least one closed region.
In specific application, referring to fig. 19, the present application embodiment provides a method for cutting and generating a circular area based on a half data structure, where the method may be applied to a home decoration design field, a mechanical design field, a building design field, an animation design field, etc., and the method may accurately identify and process the intersecting, overlapping and tangent situations of multiple design graphics such as circles, polygons, arcs, etc., and may implement operations of adding and deleting a certain design graphic in original design data, for example: performing circle adding and deleting operations in the original design data; in addition, when the circle is recognized and processed, a continuous, rather than a discretized, recognition result can be obtained. Specifically, the method may include the steps of:
Step 1: and obtaining all straight lines, circular arcs and circles included in the two-dimensional design drawing to obtain an ordered set 1.
The ordered set 1 includes all straight lines, straight line directions corresponding to all straight lines (including a preset positive direction and a preset negative direction), circular arcs, circular arc directions corresponding to the circular arcs (including a preset clockwise direction and a preset counterclockwise direction), circles and circle directions corresponding to the circles (including a preset clockwise direction and a preset counterclockwise direction).
In other examples, after the two-dimensional design is obtained, the repeated patterns in the two-dimensional design may be deleted, and in particular, deleting the repeated patterns in the two-dimensional design may include deleting repeated points, repeated edges, and repeated faces; for example: the delete operation may include at least one of: deleting two points with completely consistent position coordinates; deleting the inner points in each group of collinear points and reserving the points at two ends; the lines of the different graphs, which are calculated twice due to collineation, are deleted, which is beneficial to improving the quality and efficiency of analysis processing of the two-dimensional design graph.
Step 2: a region cutting operation corresponding to the two-dimensional design drawing is acquired, and an ordered set 2 corresponding to the two-dimensional design drawing is determined based on the region cutting operation.
When the region cutting operation is to add or edit a circular region to the two-dimensional design drawing, then the two-dimensional design drawing may be subjected to intersecting or dividing operation based on a circular curve corresponding to the region cutting operation, so that a plurality of circular arcs corresponding to the two-dimensional design drawing may be obtained, so that the ordered set 2 may be obtained. If the circular curve corresponding to the region cutting operation does not intersect the two-dimensional design drawing, the circular region corresponding to the region cutting operation may be directly added to the ordered set 1, so that the ordered set 2 may be obtained.
Step 3: and traversing the design graphs included in the ordered set 2 in sequence based on the design structure elements corresponding to the region cutting operation to determine a half data structure corresponding to the ordered set 2. Specifically, the method comprises the following steps:
step 31: and acquiring straight lines included in the ordered set 2, acquiring the forward direction and the reverse direction of the straight lines, and storing the straight lines into a half data structure according to the forward direction and the reverse direction respectively.
Step 32: the method comprises the steps of obtaining arc curves included in an ordered set 2, performing discretization processing on the arc curves, obtaining a starting point and an ending point corresponding to the arc curves, obtaining line segments formed by the starting point and the ending point, identifying the forward direction and the reverse direction of the line segments, and storing the line segments into a half data structure according to the forward direction and the reverse direction respectively.
Step 33: and acquiring circles included in the ordered set 2, adding an selfing circle identification operation to the circles, and storing the circles added with the selfing circle identification operation into a half data structure.
Step 4: acquiring straight lines and circular arcs included in the half-side data structure, and storing the straight lines and the circular arcs into an edge set; and acquiring the selfing circles included in the half data structure, and storing the circles into the selfing edge set.
Step 5: traversing the obtained edge set, finding all other edges intersected with the end point of the edge set based on the position information of the straight line and the circular arc included in the edge set, determining the next edge meeting the preset requirement according to the included angle between two adjacent edges, specifically, determining one edge with the smallest angle in the clockwise direction as the next edge for iterative operation to the included angle between the two edges in the edge set, so that all the obtained edges can form a closed area, and storing the formed closed area in the ordered set 3.
In still other examples, for the case of inscribing the arc curves, the arc curvatures corresponding to the different tangent arcs can be obtained, then the arc with the smaller arc curvature is determined as the next connecting edge, and the operation is circulated until all the obtained edges can form a closed area, and the formed closed area is stored in the ordered set 3.
Step 6: traversing the acquired selfing edge set, acquiring a forward closed region and a reverse closed region corresponding to circles included in the selfing edge set, and directly adding the forward closed region and the reverse closed region into the ordered set 3.
Step 7: the ordered set 3 is traversed, the region outline corresponding to the clockwise direction of the ordered set can be taken as the outer outline of the two-dimensional design drawing, the region outline corresponding to the anticlockwise direction of the ordered set can be taken as the inner outline of the two-dimensional design drawing, and merging operation can be carried out according to the area so as to avoid repetition.
Step 8: and (3) determining target design data according to the area outline corresponding to the clockwise direction and the area outline corresponding to the anticlockwise direction obtained in the step (7), wherein the target design data comprises at least one closed area corresponding to the area cutting operation.
In some examples, for closed regions in the target design data, the closed regions located at the outermost layer are stored in a clockwise direction, and for closed regions located at the inner layer are stored in a counterclockwise direction, and specifically, the ordered target design data may be determined based on the inclusion relationship of different closed regions.
According to the round area cutting and generating method based on the half data structure, the two-dimensional design drawing is analyzed and processed through the half data structure and the selfing edge set, and target design data corresponding to the two-dimensional design drawing is obtained, so that in the process of designing at home, when round or circular arc modeling, lines, house types or furniture are required to be edited or designed, rapid calculation is conveniently carried out on the obtained graph area, accurate results are obtained, and the preview effect of modeling, lines, house types or furniture can be provided for a user, and further the operation of accurately identifying intersecting, overlapping and tangential conditions of various modeling such as circles, polygons and circular arcs is improved; in addition, a continuous rather than discrete recognition result can be given to the circle, so that accurate and effective recognition and processing operation on the circular arc and the circle can be effectively realized, and the stability and reliability of the method are further improved.
Fig. 20 is a schematic structural diagram of a generating device of a half data structure according to an embodiment of the present application; referring to fig. 20, the present embodiment provides a generating device of a half data structure, where the generating device of a half data structure may perform the generating method of a half data structure shown in fig. 1, and specifically the generating device of a half data structure may include:
A first obtaining module 11, configured to obtain a two-dimensional design drawing;
a first identifying module 12, configured to identify a design element included in the two-dimensional design drawing, where the design element includes at least one of: straight lines, circular arcs and circles;
a first determining module 13, configured to determine an intersection point formed between any two design elements, and direction information corresponding to the design elements, where the direction information includes at least one of: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc;
the first generating module 14 is configured to store the design element according to the intersection point and the direction information, and generate a half data structure, where the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
In some examples, when the first recognition module 12 recognizes a design element included in the two-dimensional design drawing, the first recognition module 12 may be configured to perform: obtaining structural feature information corresponding to the two-dimensional design drawing; design elements included in the two-dimensional design drawing are identified based on the structural feature information.
In some examples, the structural feature information includes at least one of: size information, position information, and location area information.
In some examples, when the first obtaining module 11 obtains the two-dimensional design drawing, the first obtaining module 11 is configured to perform: acquiring an original design drawing and a design operation corresponding to the original design drawing; and processing the original design drawing according to the design operation to obtain a two-dimensional design drawing.
In some examples, after the half data structure is generated, the first acquisition module 11 and the first determination module 13 in the present embodiment are further configured to perform the following steps:
the first obtaining module 11 is configured to obtain feedback information input by a user for the half data structure;
the first determining module 13 is configured to perform an update operation on the half data structure according to the feedback information.
In some examples, when the first obtaining module 11 obtains the two-dimensional design drawing, the first obtaining module 11 may be configured to perform: acquiring an original design drawing and performing region division operation corresponding to the original design drawing; and carrying out region division processing on the original design drawing according to the region division operation to obtain a two-dimensional design drawing.
The apparatus shown in fig. 20 may perform the method of the embodiment shown in fig. 1, and reference is made to the relevant description of the embodiment shown in fig. 1 for parts of this embodiment not described in detail. The implementation process and the technical effect of this technical solution refer to the description in the embodiment shown in fig. 1, and are not repeated here.
In one possible design, the structure of the generating device of the half data structure shown in fig. 20 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a server, or other various devices. As shown in fig. 21, the electronic device may include: a first processor 21 and a first memory 22. The first memory 22 is used for storing a program for executing the method for generating the half data structure provided in the embodiment shown in fig. 1 described above for the corresponding electronic device, and the first processor 21 is configured to execute the program stored in the first memory 22.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the first processor 21, are capable of performing the steps of:
acquiring a two-dimensional design drawing;
identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs and circles;
determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc;
storing the design elements according to the intersection point and the direction information to generate a half data structure, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
Further, the first processor 21 is further configured to perform all or part of the steps in the foregoing embodiment shown in fig. 1.
The electronic device may further include a first communication interface 23 in a structure for the electronic device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium, configured to store computer software instructions for an electronic device, where the computer storage medium includes a program for executing the method for generating a half data structure in the method embodiment shown in fig. 1.
FIG. 22 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure; referring to fig. 22, the present embodiment provides a data processing apparatus that may perform the data processing method shown in fig. 2, and specifically, the data processing apparatus may include:
the second obtaining module 31 is configured to obtain the two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing, where the half data structure corresponds to at least one of the following: straight lines, circular arcs and circles;
the second identifying module 32 is configured to identify, based on the half-edge data structure, at least one region edge corresponding to a first design element and region information corresponding to a circle, where the first design element includes at least one of: straight lines and circular arcs;
A second determining module 33, configured to determine at least one first enclosed area by using the first design element and the corresponding at least one area edge; determining the area information corresponding to the circular area as a second closed area;
and a second processing module 34, configured to determine a target enclosed area corresponding to the two-dimensional design drawing based on the first enclosed area and the second enclosed area, so as to perform a design filling operation on the target enclosed area.
In some examples, when the second obtaining module 31 obtains the half data structure corresponding to the two-dimensional design drawing, the second obtaining module 31 may be configured to perform: identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs and circles; determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc; storing the design elements according to the intersection point and the direction information to generate a half data structure, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs, and circles.
In some examples, when the second recognition module 32 recognizes at least one region edge corresponding to the first design element based on the half-edge data structure, the second recognition module 32 may be configured to perform: acquiring first position information corresponding to a first design element; at least one region edge corresponding to the first design element is determined based on the first location information.
In some examples, when the second recognition module 32 determines at least one region edge corresponding to the first design element based on the first location information, the second recognition module 32 may be configured to perform: determining an endpoint of the first design element based on the first location information; determining at least one connecting edge intersecting the endpoint; at least one region edge corresponding to the first design element is determined in the at least one connecting edge, wherein the at least one region edge and the first design element are used to generate a first closed region.
In some examples, when the second recognition module 32 determines at least one region edge corresponding to the first design element in the at least one connection edge, the second recognition module 32 may be configured to perform: acquiring at least one angle formed by at least one connecting edge and a first design element; at least one region edge corresponding to the first design element is determined based on the at least one angle.
In some examples, when the second recognition module 32 determines at least one region edge corresponding to the first design element based on at least one angle, the second recognition module 32 may be configured to perform: acquiring a minimum angle among at least one angle; and determining the connecting edge corresponding to the minimum angle as at least one area edge corresponding to the first design element.
In some examples, when the second recognition module 32 determines at least one region edge corresponding to the first design element based on at least one angle, the second recognition module 32 may be configured to perform: determining a first region edge connected with the first design element in the at least one connecting edge; acquiring second position information of the first region side; at least one second region edge corresponding to the first region edge is determined based on the second position information, wherein the first region edge, the at least one second region edge, and the first design element are used to generate a first enclosed region.
In some examples, when the circle and/or arc to which the half data structure corresponds is an inscribed structure; when the second recognition module 32 recognizes at least one region edge corresponding to the first design element, the second recognition module 32 may be configured to perform: determining an inscription point corresponding to the inscription structure; acquiring at least one connecting circular arc corresponding to the inscription point and the circular arc curvature corresponding to the at least one connecting circular arc; in at least one connecting arc, at least one region edge corresponding to the first design element is determined as a function of the arc curvature, wherein the at least one region edge and the first design element are used to generate a first closed region.
In some examples, when the second recognition module 32 determines at least one region edge corresponding to the first design element in at least one connecting arc according to an arc curvature, the second recognition module 32 may be configured to perform: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; and determining a connecting arc corresponding to the minimum arc curvature as at least one region side.
In some examples, when the second recognition module 32 determines at least one region edge corresponding to the first design element in at least one connecting arc according to an arc curvature, the second recognition module 32 may be configured to perform: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; determining a connecting arc corresponding to the minimum arc curvature as a first area arc; acquiring third position information of the arc of the first area; at least one second region arc corresponding to the first region arc is determined based on the third position information, wherein the first region arc, the at least one second region arc and the first design element are used for generating a first closed region.
In some examples, the second processing module 34 in this embodiment may also be configured to, after determining the target enclosed area corresponding to the two-dimensional design drawing: and generating prompt information corresponding to the target closed area, wherein the prompt information is used for prompting a user to perform feedback operation on the target closed area.
In some examples, after generating the hint information corresponding to the target enclosed area, the second processing module 34 of the present embodiment may be further configured to: acquiring feedback information input by a user aiming at a target closed area according to the prompt information; and updating the target closed area according to the feedback information.
In some examples, when the second obtaining module 31 obtains the two-dimensional design drawing, the second obtaining module 31 may be configured to perform: acquiring an original design drawing and performing region division operation corresponding to the original design drawing; and carrying out region division processing on the original design drawing according to the region division operation to obtain a two-dimensional design drawing.
The apparatus shown in fig. 22 may perform the method of the embodiment shown in fig. 2, and reference is made to the relevant description of the embodiment shown in fig. 2 for parts of this embodiment not described in detail. The implementation process and the technical effect of this technical solution are described in the embodiment shown in fig. 2, and are not described herein.
In one possible design, the structure of the data processing apparatus shown in fig. 22 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a server, or other devices. As shown in fig. 23, the electronic device may include: a second processor 41 and a second memory 42. Wherein the second memory 42 is for storing a program for the corresponding electronic device to execute the data processing method provided in the embodiment shown in fig. 2 described above, the second processor 41 is configured for executing the program stored in the second memory 42.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, are capable of performing the steps of:
acquiring a two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs and circles;
based on the half-edge data structure, at least one region edge corresponding to a first design element and region information corresponding to a circle are identified, the first design element including at least one of: straight lines and circular arcs;
determining at least one first enclosed region using the first design element and the corresponding at least one region edge; determining the area information corresponding to the circular area as a second closed area;
and determining a target closed area corresponding to the two-dimensional design drawing based on the first closed area and the second closed area so as to perform design filling operation on the target closed area.
Further, the second processor 41 is further configured to perform all or part of the steps in the embodiment shown in fig. 2.
The electronic device may further include a second communication interface 43 in the structure of the electronic device, for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, where the computer storage medium includes a program for executing the data processing method according to the embodiment of the method shown in fig. 2.
FIG. 24 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure; referring to fig. 24, the present embodiment provides a data processing apparatus that may perform the data processing method shown in fig. 3, and specifically, the data processing apparatus may include:
a third acquisition module 51 for acquiring a design operation corresponding to the two-dimensional design drawing;
a third determining module 52 for determining a data set of design elements based on the design operation and the two-dimensional design drawing, the design elements including at least one of: a first design element corresponding to the two-dimensional design drawing and a second design element corresponding to the design operation;
the third determining module 52 is further configured to determine a half data structure corresponding to the data set, where the half data structure corresponds to at least one of: straight lines, circular arcs and circles corresponding to the data sets;
the third processing module 53 is configured to determine target design data according to the half data structure, where the target design data includes at least one closed area corresponding to the design operation.
In some examples, prior to acquiring the design operation corresponding to the two-dimensional design drawing, the method in the present embodiment may further include:
a third obtaining module 51, configured to obtain a two-dimensional design drawing;
a third processing module 53, configured to identify an original straight line, an original circular arc, and an original circle included in the two-dimensional design drawing; storing an original straight line, an original circular arc and an original circle according to a preset sequence to obtain an original data set comprising original design elements, wherein the original design elements comprise at least one of the following: original straight line, original circular arc and original circle.
In some examples, in identifying the original straight line, the original circular arc, and the original circle included in the two-dimensional design drawing, the third processing module 53 is configured to include: obtaining structural feature information corresponding to the two-dimensional design drawing; and identifying an original straight line, an original circular arc and an original circle included in the two-dimensional design drawing according to the structural characteristic information.
In some examples, the structural feature information includes at least one of: size information, position information, and location area information.
In some examples, in determining the data set of design elements based on the design operation and the two-dimensional design drawing, the third determination module 52 is to: determining a design structural element corresponding to the design operation; a data set of design elements is obtained based on the design structural elements and original design elements corresponding to the original data set.
In some examples, the design structural element includes at least one of: an operation straight line, an operation circular arc and an operation circle.
In some examples, in obtaining a data set of design elements based on the design structural elements and original design elements corresponding to the original data set, the third determination module 52 is to: identifying whether an intersection exists between the design structural element and an original design element in the original data set; if the intersection point exists, editing the design structural element and the original design element based on the intersection point, and determining the edited design element as a data set; or if the intersection points do not exist, adding the design structural element to the original design element to obtain a data set.
In some examples, in determining the half data structure corresponding to the data set, the third determination module 52 is to: traversing design elements included in the data set based on the design structure elements corresponding to the design operation to obtain a half data structure corresponding to the data set, wherein the half data structure corresponds to at least one of the following: straight lines stored according to a preset direction, circular arcs stored according to the preset direction and circles with selfing marks.
In some examples, when traversing design elements included in a data set based on design structure elements corresponding to a design operation to obtain a half data structure corresponding to the data set, the third determination module 52 is to: obtaining a line segment corresponding to an arc in the data set based on a design structural element corresponding to the design operation; and storing the line segments into a half data structure according to a preset direction.
In some examples, when obtaining a line segment corresponding to an arc in the data set based on the design structure element corresponding to the design operation, the third determining module 52 is configured to perform discretization processing on the arc in the data set based on the design structure element corresponding to the design operation, to obtain a start point and an end point corresponding to the arc; and determining a line segment corresponding to the circular arc according to the starting point and the ending point.
In some examples, when the third determining module 53 determines the half data structure corresponding to the data set, the third determining module 53 may perform the following steps: storing the straight lines and/or the circular arcs in the edge set to generate a half-edge data structure; the straight lines and/or arcs are stored in the edge set to generate a half-edge data structure.
In some examples, when the third determining module 53 determines the half data structure corresponding to the data set, the third determining module 53 may perform the following steps: acquiring a circle included in the half data structure; the circles are stored in the selfing edge set to generate a half-edge data structure.
In some examples, when the half data structure corresponds to a straight line and/or a circular arc; in determining the target design data from the half data structure, the third processing module 53 may be configured to perform: acquiring at least one region edge corresponding to a straight line and/or an arc; determining at least one first closed region based on the straight line and/or the circular arc, at least one region edge; target design data is determined based on the at least one first enclosed region.
In some examples, in acquiring at least one region edge corresponding to a straight line and/or a circular arc, the third processing module 53 may be configured to perform: acquiring first position information corresponding to a straight line and/or an arc; at least one region edge corresponding to the straight line and/or the circular arc is determined based on the first position information.
In some examples, in determining at least one region edge corresponding to a straight line and/or a circular arc based on the first location information, the third processing module 53 may be configured to perform: determining the end point of the straight line and/or the circular arc based on the first position information; determining at least one connecting edge intersecting the endpoint; at least one connecting edge is defined as at least one region edge corresponding to a straight line and/or an arc, wherein the at least one region edge, the straight line and/or the arc serve to generate a closed region.
In some examples, in determining at least one region edge corresponding to a straight line and/or an arc in at least one connecting edge, the third processing module 53 may be configured to perform: acquiring at least one angle formed between at least one connecting edge and a straight line and/or an arc; at least one region edge corresponding to the straight line and/or the circular arc is determined based on the at least one angle.
In some examples, in determining at least one region edge corresponding to a straight line and/or a circular arc based on at least one angle, the third processing module 53 may be configured to perform: acquiring a minimum angle among at least one angle; and determining the connecting edge corresponding to the minimum angle as at least one area edge corresponding to the straight line and/or the circular arc.
In some examples, in determining at least one region edge corresponding to a straight line and/or an arc in at least one connecting edge, the third processing module 53 may be configured to perform: determining a first area edge connected with a straight line and/or an arc in at least one connecting edge; acquiring second position information of the first region side; at least one second region edge is determined based on the second position information, wherein the first region edge, the at least one second region edge, the straight line and/or the circular arc are used to generate a closed region.
In some examples, when the half data structure corresponds to a circle; in determining the target design data from the half data structure, the third processing module 53 may be configured to perform: acquiring the region information of a circle; determining the area information as at least one second closed area; target design data is determined based on the at least one second enclosed region.
In some examples, when the circle and/or arc to which the half data structure corresponds is an inscribed structure; in determining the target design data from the half data structure, the third processing module 53 may be configured to perform: determining an inscription point corresponding to the inscription structure; acquiring at least one connecting circular arc corresponding to the inscription point and the circular arc curvature corresponding to the at least one connecting circular arc; determining at least one regional arc in the at least one connecting arc according to the curvature of the arc; determining at least one third closed region based on the inscribed point, the at least one region arc; target design data is determined based on the at least one third enclosed region.
In some examples, in at least one connecting arc, the third processing module 53 may be configured to perform: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; and determining a connecting arc corresponding to the minimum arc curvature as a first area arc, wherein the first area arc and the inscription point are used for generating a closed area.
In some examples, in at least one connecting arc, the third processing module 53 may be configured to perform: determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc; determining a connecting arc corresponding to the minimum arc curvature as a first area arc; acquiring third position information of the arc of the first area; and determining at least one second area arc corresponding to the first area arc based on the third position information, wherein the first area arc, the at least one second area arc and the inscription point are used for generating a closed area.
In some examples, the third acquisition module 51, the third determination module 52, and the third processing module 53 in the present embodiment may be configured to perform the following steps:
a third obtaining module 51, configured to obtain an original area corresponding to the two-dimensional design drawing.
A third determining module 52 is configured to determine at least one scale information of the at least one enclosed area relative to the original area.
And a third processing module 53, configured to determine configuration information of at least one enclosed area according to the at least one proportion information.
In some examples, in determining the configuration information of the at least one enclosed area based on the at least one scale information, the third processing module 53 is configured to perform: when the proportion information is larger than or equal to a preset threshold value, determining the configuration information of the closed area corresponding to the proportion information to be identical with the configuration information of the original area; or when the proportion information is smaller than the preset threshold value, determining the configuration information of the closed area corresponding to the proportion information as preset configuration information.
In some examples, the third processing module 53 in this embodiment may be configured to perform the following steps: identifying whether the two-dimensional design drawing comprises the same coincident structure or not; and (3) including the overlapped identical structures in the two-dimensional design drawing, and performing de-duplication operation on the overlapped identical structures.
In some examples, the third acquisition module 51 and the third processing module 53 in the present embodiment may be configured to perform the following steps:
a third acquiring module 51, configured to acquire position information and size information corresponding to at least one closed area;
a third processing module 53 for determining a containment relationship between at least one enclosed area based on the position information and the size information; determining identification information corresponding to the at least one enclosed area based on the inclusion relationship; and determining target design data according to the identification information corresponding to the at least one closed area.
In some examples, the at least one enclosed region includes a first enclosed region and a second enclosed region; in determining the identification information corresponding to the at least one closed region based on the inclusion relationship, the third processing module 53 in the present embodiment may be configured to perform: when the first enclosed area is located inside the second enclosed area, then it is determined that the identification information corresponding to the first enclosed area includes a clockwise direction for identifying the inside area, and it is determined that the identification information corresponding to the second enclosed area includes a counterclockwise direction for identifying the outside area.
The apparatus of fig. 24 may perform the method of the embodiment of fig. 3-18, and reference is made to the relevant description of the embodiment of fig. 3-18 for parts of this embodiment not described in detail. The implementation process and technical effects of this technical solution are described in the embodiments shown in fig. 3 to 18, and are not described herein.
In one possible design, the structure of the data processing apparatus shown in fig. 24 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a server, or other devices. As shown in fig. 25, the electronic device may include: a third processor 61 and a third memory 62. Wherein the third memory 62 is for storing a program for the corresponding electronic device to execute the data processing method provided in the embodiments shown in fig. 3-18 described above, and the third processor 61 is configured for executing the program stored in the first memory 22.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the third processor 61, are capable of performing the steps of:
acquiring a design operation corresponding to the two-dimensional design drawing;
determining a data set of design elements based on the design operation and the two-dimensional design drawing, the design elements including at least one of: a first design element corresponding to the two-dimensional design drawing and a second design element corresponding to the design operation;
Determining a half data structure corresponding to the data set, the half data structure corresponding to at least one of: straight lines, circular arcs and circles;
target design data including at least one closed region corresponding to a design operation is determined based on the half data structure.
Further, the third processor 61 is further configured to perform all or part of the steps in the embodiments shown in fig. 3-18.
The electronic device may further include a third communication interface 63 in the structure for the electronic device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, where the computer storage medium includes a program for executing the data processing method according to the embodiment of the method shown in fig. 3 to fig. 18.
Fig. 26 is a flow chart of a data processing method according to an embodiment of the present application; with reference to fig. 26, this embodiment provides a data processing method, and the execution body of the method may be a data processing apparatus, and it is understood that the data processing apparatus may be implemented as software, or a combination of software and hardware. Specifically, the data processing method may include:
Step S2001: an operation interface for editing the two-dimensional design drawing is displayed.
Step S2002: and acquiring design operation for the two-dimensional design drawing, which is input by a user through an operation interface.
Step S2003: target design data corresponding to the two-dimensional design drawing is determined according to the design operation, the target design data being obtained based on a half data structure corresponding to the data set determined by the design operation and the two-dimensional design drawing.
The data processing device may include a display module, where the display module may display an operation interface for editing a two-dimensional design drawing, where the operation interface may include the two-dimensional design drawing and preset operation options for performing editing operation on the two-dimensional design drawing, and it may be understood that the number of preset operation options may be different according to different application fields, and each preset operation option is used to perform preset editing operation on the two-dimensional design drawing, where the preset editing operation may include at least one of: cutting operations, adding operations, selecting operations, configuring operations, modifying operations, and the like.
After displaying the operation interface for editing the two-dimensional design drawing, the user may input a design operation for the two-dimensional design drawing through the operation interface, the design operation may include at least one of: region cutting operations, region adding operations, region selecting operations, region configuring operations, region modifying operations, and the like. After the design operation for the two-dimensional design drawing input by the user through the operation interface is acquired, target design data corresponding to the two-dimensional design drawing may be determined according to the design operation, specifically, the target design data is obtained based on a half data structure, wherein the half data structure corresponds to the data set determined through the design operation and the two-dimensional design drawing.
It should be noted that, in this embodiment, the specific implementation process and implementation effect of determining the data set and determining the half data structure corresponding to the data set through the design operation and the two-dimensional design drawing are similar to those in the embodiment shown in fig. 1, and specific reference may be made to the above description, which is not repeated herein.
According to the data processing method provided by the embodiment, the design operation for the two-dimensional design drawing, which is input by a user through the operation interface, is obtained by displaying the operation interface for editing the two-dimensional design drawing, then the target design data corresponding to the two-dimensional design drawing is determined according to the design operation, so that the processing operation for the two-dimensional design drawing through the interaction operation with the user is effectively realized.
FIG. 27 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure; referring to fig. 27, the present embodiment provides a data processing apparatus that may perform the data processing method shown in fig. 26 described above, and specifically, the data processing apparatus may include:
A fourth display module 71 for displaying an operation interface for editing the two-dimensional design drawing;
a fourth obtaining module 72, configured to obtain a design operation for the two-dimensional design drawing, which is input by a user through an operation interface;
the fourth processing module 73 is configured to obtain target design data corresponding to the two-dimensional design drawing according to the design operation, where the target design data is obtained based on a half data structure corresponding to a data set determined by the design operation and the two-dimensional design drawing.
The apparatus shown in fig. 27 may perform the method of the embodiment shown in fig. 26, and reference is made to the relevant description of the embodiment shown in fig. 26 for parts of this embodiment not described in detail. The implementation and technical effects of this technical solution are described in the embodiment shown in fig. 26, and are not described herein.
In one possible design, the structure of the data processing apparatus shown in fig. 27 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a server, or other devices. As shown in fig. 28, the electronic device may include: a fourth processor 81 and a fourth memory 82. The fourth memory 82 is used for storing a program for executing the data processing method provided in the embodiment shown in fig. 26 described above for the corresponding electronic device, and the fourth processor 81 is configured to execute the program stored in the fourth memory 82.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the fourth processor 81, are capable of performing the steps of:
displaying an operation interface for editing the two-dimensional design drawing;
acquiring design operation for a two-dimensional design drawing input by a user through an operation interface;
target design data corresponding to the two-dimensional design drawing is acquired according to the design operation, the target design data being obtained based on a half data structure corresponding to a data set determined by the design operation and the two-dimensional design drawing.
Further, the fourth processor 81 is further configured to perform all or part of the steps in the embodiment shown in fig. 26.
The electronic device may further include a fourth communication interface 83 in the structure for the electronic device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, which includes a program for executing the data processing method in the embodiment of the method shown in fig. 26.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which 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, etc.) having computer-usable program code embodied therein.
The present application is 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable 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 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 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.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (51)

1. A method for generating a half data structure, comprising:
acquiring a two-dimensional design drawing;
identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs and circles;
determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc;
obtaining a ordered data set corresponding to the design element based on the intersection point and the direction information, wherein the ordered data set comprises at least one of the following components: straight line and straight line direction corresponding to straight line, circular arc and circular arc direction corresponding to circular arc, circle and circle direction corresponding to circle;
determining the half data structure corresponding to the ordered data set, the half data structure corresponding to at least one of: straight lines, circular arcs, and circles.
2. The method of claim 1, wherein identifying design elements included in the two-dimensional design drawing comprises:
Obtaining structural feature information corresponding to the two-dimensional design drawing;
and identifying design elements included in the two-dimensional design drawing according to the structural feature information.
3. The method of claim 2, wherein the structural feature information comprises at least one of: size information, position information, and location area information.
4. A method according to any of claims 1-3, characterized in that obtaining a two-dimensional design drawing comprises:
acquiring an original design drawing and a design operation corresponding to the original design drawing;
and processing the original design drawing according to the design operation to obtain the two-dimensional design drawing.
5. A method according to any one of claims 1-3, wherein after generating the half data structure, the method further comprises:
acquiring feedback information input by a user aiming at the half data structure;
and updating the half data structure according to the feedback information.
6. A method according to any of claims 1-3, characterized in that obtaining a two-dimensional design drawing comprises:
acquiring an original design drawing and region division operation corresponding to the original design drawing;
And carrying out region division processing on the original design drawing according to the region division operation to obtain the two-dimensional design drawing.
7. A method of data processing, comprising:
acquiring a two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs and circles;
identifying at least one region edge corresponding to a first design element based on the half-edge data structure and region information corresponding to the circle, the first design element including at least one of: straight lines and circular arcs;
determining at least one first closed region by using the first design element and the corresponding at least one region edge; determining the area information corresponding to the circular area as a second closed area;
determining a target closed area corresponding to the two-dimensional design drawing based on the first closed area and the second closed area so as to perform design filling operation on the target closed area;
acquiring a half data structure corresponding to the two-dimensional design drawing, including:
identifying design elements included in the two-dimensional design drawing, the design elements including at least one of: straight lines, circular arcs and circles;
Determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc;
obtaining a ordered data set corresponding to the design element based on the intersection point and the direction information, wherein the ordered data set comprises at least one of the following components: straight line and straight line direction corresponding to straight line, circular arc and circular arc direction corresponding to circular arc, circle and circle direction corresponding to circle;
determining the half data structure corresponding to the ordered data set, the half data structure corresponding to at least one of: straight lines, circular arcs, and circles.
8. The method of claim 7, wherein identifying at least one region edge corresponding to the first design element based on the half-edge data structure comprises:
acquiring first position information corresponding to the first design element;
at least one region edge corresponding to the first design element is determined based on the first location information.
9. The method of claim 8, wherein determining at least one region edge corresponding to the first design element based on the first location information comprises:
determining an endpoint of the first design element based on the first location information;
determining at least one connecting edge intersecting the terminus;
at least one region edge corresponding to the first design element is determined in the at least one connecting edge, wherein the at least one region edge and the first design element are used for generating a first closed region.
10. The method of claim 9, wherein determining at least one region edge corresponding to the first design element in the at least one connection edge comprises:
acquiring at least one angle formed by the at least one connecting edge and the first design element;
at least one region edge corresponding to the first design element is determined based on the at least one angle.
11. The method of claim 10, wherein determining at least one region edge corresponding to the first design element based on the at least one angle comprises:
Acquiring a minimum angle from the at least one angle;
and determining the connecting edge corresponding to the minimum angle as at least one area edge corresponding to the first design element.
12. The method of claim 10, wherein determining at least one region edge corresponding to the first design element based on the at least one angle comprises:
determining a first area edge connected with the first design element in the at least one connecting edge;
acquiring second position information of the first region side;
at least one second region edge corresponding to the first region edge is determined based on the second position information, wherein the first region edge, the at least one second region edge, and the first design element are used to generate a first enclosed region.
13. The method according to claim 7, wherein when the circle and/or arc to which the half data structure corresponds is an inscribed structure; identifying at least one region edge corresponding to the first design element, comprising:
determining an inscription point corresponding to the inscription structure;
acquiring at least one connecting arc corresponding to the inscription point and an arc curvature corresponding to the at least one connecting arc;
In at least one connecting arc, at least one region edge corresponding to the first design element is determined according to the curvature of the arc, wherein the at least one region edge and the first design element are used for generating a first closed region.
14. The method of claim 13, wherein in at least one connecting arc, determining at least one region edge corresponding to the first design element from the arc curvature comprises:
determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc;
and determining a connecting arc corresponding to the minimum arc curvature as at least one region side.
15. The method of claim 13, wherein in at least one connecting arc, determining at least one region edge corresponding to the first design element from the arc curvature comprises:
determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc;
determining a connecting arc corresponding to the minimum arc curvature as a first area arc;
acquiring third position information of the first area arc;
and determining at least one second area arc corresponding to the first area arc based on the third position information, wherein the first area arc, the at least one second area arc and the first design element are used for generating a first closed area.
16. The method according to any one of claims 7-15, wherein after determining a target enclosed area corresponding to the two-dimensional plan, the method further comprises:
and generating prompt information corresponding to the target closed area, wherein the prompt information is used for prompting a user to perform feedback operation on the target closed area.
17. The method of claim 16, wherein after generating the hint information corresponding to the target enclosed area, the method further comprises:
acquiring feedback information input by a user aiming at the target closed area according to the prompt information;
and updating the target closed area according to the feedback information.
18. The method according to any of claims 7-15, wherein obtaining a two-dimensional design drawing comprises:
acquiring an original design drawing and region division operation corresponding to the original design drawing;
and carrying out region division processing on the original design drawing according to the region division operation to obtain the two-dimensional design drawing.
19. A method of data processing, comprising:
acquiring a design operation corresponding to the two-dimensional design drawing;
Determining a data set of design elements based on the design operation and the two-dimensional design graph, the design elements including at least one of: a first design element corresponding to the two-dimensional design drawing and a second design element corresponding to the design operation;
determining a half data structure corresponding to the data set, the half data structure corresponding to at least one of: straight lines, circular arcs and circles, wherein the half data structure is obtained based on the generation method of the half data structure of claim 1;
and determining target design data according to the half data structure, wherein the target design data comprises at least one closed area corresponding to the design operation.
20. The method of claim 19, wherein prior to obtaining the design operation corresponding to the two-dimensional design drawing, the method further comprises:
acquiring the two-dimensional design drawing;
identifying an original straight line, an original circular arc and an original circle included in the two-dimensional design drawing;
storing the original straight line, the original circular arc and the original circle according to a preset sequence to obtain an original data set comprising original design elements, wherein the original design elements comprise at least one of the following: original straight line, original circular arc and original circle.
21. The method of claim 20, wherein identifying the original straight line, the original circular arc, and the original circle included in the two-dimensional design drawing comprises:
obtaining structural feature information corresponding to the two-dimensional design drawing;
and identifying an original straight line, an original circular arc and an original circle included in the two-dimensional design drawing according to the structural feature information.
22. The method of claim 21, wherein the structural feature information comprises at least one of: size information, position information, and location area information.
23. The method of claim 20, wherein determining a data set of design elements based on the design operation and the two-dimensional design drawing comprises:
determining a design structural element corresponding to the design operation;
the data set of design elements is obtained based on the design structural elements and original design elements corresponding to the original data set.
24. The method of claim 23, wherein the design structural element comprises at least one of: an operation straight line, an operation circular arc and an operation circle.
25. The method of claim 23, wherein obtaining the data set of design elements based on the design structural elements and original design elements corresponding to the original data set comprises:
Identifying whether an intersection exists between the design structural element and an original design element in the original data set;
if the intersection point exists, editing the design structural element and the original design element based on the intersection point, and determining the edited design element as the data set; or,
and if the intersection points do not exist, adding the design structural elements to the original design elements to obtain the data set.
26. The method of claim 19, wherein determining a half data structure corresponding to the data set comprises:
traversing the design elements included in the data set based on the design structure elements corresponding to the design operation to obtain a half data structure corresponding to the data set, wherein the half data structure corresponds to at least one of the following: straight lines stored according to a preset direction, circular arcs stored according to the preset direction and circles with selfing marks.
27. The method of claim 26, wherein traversing design elements included in the data set based on design structure elements corresponding to the design operation to obtain a half data structure corresponding to the data set comprises:
Obtaining a line segment corresponding to an arc in the data set based on a design structural element corresponding to the design operation;
and storing the line segments into the half data structure according to a preset direction.
28. The method of claim 27, wherein obtaining a line segment corresponding to an arc in the data set based on a design structural element corresponding to the design operation comprises:
discretizing the circular arcs in the data set based on the design structural elements corresponding to the design operation to obtain a starting point and an ending point corresponding to the circular arcs;
and determining a line segment corresponding to the circular arc according to the starting point and the ending point.
29. The method of claim 26, wherein determining a half data structure corresponding to the data set comprises:
acquiring a straight line and/or an arc corresponding to the half data structure;
the straight lines and/or arcs are stored in a set of edges to generate the half-edge data structure.
30. The method of claim 26, wherein determining a half data structure corresponding to the data set comprises:
Acquiring a circle included in the half data structure;
the circle is stored in a set of selfing edges to generate the half-edge data structure.
31. The method according to claim 19, wherein when the half data structure corresponds to a straight line and/or a circular arc; determining target design data according to the half data structure, including:
acquiring at least one region edge corresponding to the straight line and/or the circular arc;
determining at least one first closed region based on the straight line and/or the circular arc, at least one region edge;
and determining target design data according to the at least one first closed area.
32. The method according to claim 31, wherein acquiring at least one region edge corresponding to the straight line and/or circular arc comprises:
acquiring first position information corresponding to the straight line and/or the circular arc;
at least one region edge corresponding to the straight line and/or the circular arc is determined based on the first position information.
33. The method of claim 32, wherein determining at least one region edge corresponding to the straight line and/or circular arc based on the first location information comprises:
Determining an end point of the straight line and/or the circular arc based on the first position information;
determining at least one connecting edge intersecting the terminus;
at least one region edge corresponding to the straight line and/or the circular arc is determined in the at least one connecting edge, wherein the at least one region edge, the straight line and/or the circular arc are used for generating a closed region.
34. The method according to claim 33, wherein determining at least one zone edge corresponding to the straight line and/or circular arc in the at least one connection edge comprises:
acquiring at least one angle formed between the at least one connecting edge and the straight line and/or the circular arc;
at least one region edge corresponding to the straight line and/or the circular arc is determined based on the at least one angle.
35. The method of claim 34, wherein determining at least one region edge corresponding to the straight line and/or circular arc based on the at least one angle comprises:
acquiring a minimum angle from the at least one angle;
and determining the connecting edge corresponding to the minimum angle as at least one area edge corresponding to the straight line and/or the circular arc.
36. The method according to claim 33, wherein determining at least one zone edge corresponding to the straight line and/or circular arc in the at least one connection edge comprises:
determining a first area edge connected with the straight line and/or the circular arc in the at least one connecting edge;
acquiring second position information of the first region side;
at least one second region edge corresponding to the first region edge is determined based on the second position information, wherein the first region edge, the at least one second region edge, the straight line and/or the circular arc are used for generating a closed region.
37. The method of claim 19, wherein when the half data structure corresponds to a circle; determining target design data according to the half data structure, including:
acquiring the region information of the circle;
determining the area information as a second closed area;
and determining target design data according to the second closed area.
38. The method according to claim 19, wherein when the circle and/or arc to which the half data structure corresponds is an inscribed structure; determining target design data according to the half data structure, including:
Determining an inscription point corresponding to the inscription structure;
acquiring at least one connecting arc corresponding to the inscription point and an arc curvature corresponding to the at least one connecting arc;
determining at least one regional arc in at least one connecting arc according to the curvature of the arc;
determining at least one third closed region based on the inscribed point, at least one region arc;
and determining the target design data according to the at least one third enclosed area.
39. The method of claim 38, wherein in at least one connecting arc, determining at least one region edge from the arc curvature comprises:
determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc;
and determining a connecting arc corresponding to the minimum arc curvature as a first area arc, wherein the first area arc and the inscription point are used for generating a closed area.
40. The method of claim 38, wherein in at least one connecting arc, determining at least one region edge from the arc curvature comprises:
determining a minimum arc curvature among the arc curvatures corresponding to the at least one connecting arc;
Determining a connecting arc corresponding to the minimum arc curvature as a first area arc;
acquiring third position information of the first area arc;
and determining at least one second area arc corresponding to the first area arc based on the third position information, wherein the first area arc, the at least one second area arc and the inscription point are used for generating a closed area.
41. The method of any one of claims 19-40, further comprising:
acquiring an original area corresponding to the two-dimensional design drawing;
determining at least one scale information of the at least one closed region relative to the original region;
and determining configuration information of the at least one closed area according to the at least one proportion information.
42. The method of claim 41, wherein determining configuration information for the at least one enclosed area based on at least one scaling information comprises:
when the proportion information is larger than or equal to a preset threshold value, determining the configuration information of the closed area corresponding to the proportion information to be identical with the configuration information of the original area; or,
And when the proportion information is smaller than a preset threshold value, determining the configuration information of the closed area corresponding to the proportion information as preset configuration information.
43. The method of any one of claims 19-40, further comprising:
identifying whether the two-dimensional design drawing comprises coincident identical structures or not;
and if the two-dimensional design drawing comprises the same coincident structure, performing de-duplication operation on the same coincident structure.
44. The method of any one of claims 19-40, further comprising:
acquiring position information and size information corresponding to the at least one closed area;
determining a containment relationship between the at least one enclosed area based on the location information and the size information;
determining identification information corresponding to the at least one enclosed area based on the inclusion relationship;
and determining the target design data according to the identification information corresponding to the at least one closed area.
45. The method of claim 44, wherein the at least one enclosed region comprises a first enclosed region and a second enclosed region; determining identification information corresponding to the at least one enclosed area based on the containment relationship, comprising:
When the first enclosed area is located inside the second enclosed area, determining that the identification information corresponding to the first enclosed area includes a clockwise direction for identifying the inside area, and determining that the identification information corresponding to the second enclosed area includes a counterclockwise direction for identifying the outside area.
46. A half data structure generating apparatus, comprising:
the first acquisition module is used for acquiring a two-dimensional design drawing;
the first recognition module is used for recognizing design elements included in the two-dimensional design drawing, and the design elements comprise at least one of the following: straight lines, circular arcs and circles;
a first determining module, configured to determine an intersection point formed between any two design elements, and direction information corresponding to the design elements, where the direction information includes at least one of: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc;
a first generation module, configured to obtain, based on the intersection point and the direction information, a ordered data set corresponding to the design element, where the ordered data set includes at least one of: straight line and straight line direction corresponding to straight line, circular arc and circular arc direction corresponding to circular arc, circle and circle direction corresponding to circle; determining the half data structure corresponding to the ordered data set, the half data structure corresponding to at least one of: straight lines, circular arcs, and circles.
47. An electronic device, comprising: a memory, a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement a method of generating a half data structure as claimed in any one of claims 1 to 6.
48. A data processing apparatus, comprising:
the second acquisition module is used for acquiring a two-dimensional design drawing and a half data structure corresponding to the two-dimensional design drawing, wherein the half data structure corresponds to at least one of the following: straight lines, circular arcs and circles;
a second identifying module, configured to identify, based on the half-edge data structure, at least one region edge corresponding to a first design element and region information corresponding to the circle, where the first design element includes at least one of: straight lines and circular arcs;
a second determining module, configured to determine at least one first enclosed area by using the first design element and the corresponding at least one area edge; determining the area information corresponding to the circular area as a second closed area;
the second processing module is used for determining a target closed area corresponding to the two-dimensional design drawing based on the first closed area and the second closed area so as to perform design filling operation on the target closed area;
The second obtaining module is configured to identify a design element included in the two-dimensional design drawing, where the design element includes at least one of: straight lines, circular arcs and circles; determining an intersection point formed between any two design elements and direction information corresponding to the design elements, wherein the direction information comprises at least one of the following components: a straight line direction corresponding to the straight line and an arc direction corresponding to the arc; obtaining a ordered data set corresponding to the design element based on the intersection point and the direction information, wherein the ordered data set comprises at least one of the following components: straight line and straight line direction corresponding to straight line, circular arc and circular arc direction corresponding to circular arc, circle and circle direction corresponding to circle; determining the half data structure corresponding to the ordered data set, the half data structure corresponding to at least one of: straight lines, circular arcs, and circles.
49. An electronic device, comprising: a memory, a processor; wherein the memory is configured to store one or more computer instructions which, when executed by the processor, implement a data processing method as claimed in any one of claims 7 to 18.
50. A data processing apparatus, comprising:
the third acquisition module is used for acquiring design operation corresponding to the two-dimensional design drawing;
a third determination module for determining a data set based on the design operation and the two-dimensional design drawing;
the third determining module is further configured to determine a half data structure corresponding to the data set, where the half data structure corresponds to at least one of: straight lines, circular arcs and circles corresponding to the data sets, wherein the half data structure is obtained based on the generation method of the half data structure of claim 1;
and the third processing module is used for determining target design data according to the half data structure, wherein the target design data comprises at least one closed area corresponding to the design operation.
51. An electronic device, comprising: a memory, a processor; wherein the memory is configured to store one or more computer instructions that, when executed by the processor, implement the data processing method of any of claims 19 to 45.
CN202010820153.6A 2020-08-14 2020-08-14 Half data structure generation method, data processing method, device and equipment Active CN113297401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010820153.6A CN113297401B (en) 2020-08-14 2020-08-14 Half data structure generation method, data processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010820153.6A CN113297401B (en) 2020-08-14 2020-08-14 Half data structure generation method, data processing method, device and equipment

Publications (2)

Publication Number Publication Date
CN113297401A CN113297401A (en) 2021-08-24
CN113297401B true CN113297401B (en) 2024-02-02

Family

ID=77318180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010820153.6A Active CN113297401B (en) 2020-08-14 2020-08-14 Half data structure generation method, data processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN113297401B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2523166B1 (en) * 2011-05-12 2013-11-27 BlackBerry Limited Method and device for rendering areas bounded by curves using a gpu
CN107644449A (en) * 2017-09-15 2018-01-30 江苏大学 A kind of planar graph autonomous closure area recognizing method
CN108305261A (en) * 2017-08-11 2018-07-20 腾讯科技(深圳)有限公司 Picture segmentation method, apparatus, storage medium and computer equipment
CN110297718A (en) * 2018-03-22 2019-10-01 阿里巴巴集团控股有限公司 Interface element linkage processing method, device and equipment
CN110706314A (en) * 2019-09-30 2020-01-17 广东博智林机器人有限公司 Element layout method and device, electronic equipment and readable storage medium
CN111429399A (en) * 2019-01-09 2020-07-17 银河水滴科技(北京)有限公司 Straight line detection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9607414B2 (en) * 2015-01-27 2017-03-28 Splunk Inc. Three-dimensional point-in-polygon operation to facilitate displaying three-dimensional structures

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2523166B1 (en) * 2011-05-12 2013-11-27 BlackBerry Limited Method and device for rendering areas bounded by curves using a gpu
US8941662B2 (en) * 2011-05-12 2015-01-27 Blackberry Limited Method and device for rendering areas bounded by curves using a GPU
CN108305261A (en) * 2017-08-11 2018-07-20 腾讯科技(深圳)有限公司 Picture segmentation method, apparatus, storage medium and computer equipment
CN107644449A (en) * 2017-09-15 2018-01-30 江苏大学 A kind of planar graph autonomous closure area recognizing method
CN110297718A (en) * 2018-03-22 2019-10-01 阿里巴巴集团控股有限公司 Interface element linkage processing method, device and equipment
CN111429399A (en) * 2019-01-09 2020-07-17 银河水滴科技(北京)有限公司 Straight line detection method and device
CN110706314A (en) * 2019-09-30 2020-01-17 广东博智林机器人有限公司 Element layout method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN113297401A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
Fan et al. A three-step approach of simplifying 3D buildings modeled by CityGML
Labatut et al. Robust and efficient surface reconstruction from range data
CN102779358B (en) Method and device for designing a geometrical three-dimensional modeled object
Qian et al. Automatic unstructured all-hexahedral mesh generation from B-Reps for non-manifold CAD assemblies
US20050007368A1 (en) Topology determination, decomposable shape generation, and structured mesh generation
US11048335B2 (en) Stroke operation prediction for three-dimensional digital content
CN105760570B (en) Selecting viewpoints of a set of objects
CN103914865A (en) Groups of faces that form a geometrical pattern
Schreiner et al. Direct (re) meshing for efficient surface processing
CN101866379B (en) Method, program and product edition system for visualizing objects displayed on a computer screen
US7639249B2 (en) Direct inset beveling of geometric figures
CN108564645A (en) Rendering intent, terminal device and the medium of building model
CN111127649A (en) Method and device for constructing three-dimensional block model and server
CA2966299C (en) Method for immediate boolean operations using geometric facets
CA2395809A1 (en) Mesh generator for and method of generating meshes in an extrusion process
US20180189419A1 (en) System maintaining domain-specific 3d models as a graph within computer aided design
CA3037575A1 (en) Geometric modelling for facilitating simulation for manufacturing operations
CN113297401B (en) Half data structure generation method, data processing method, device and equipment
CN106920269A (en) Graphics processing method and device
CN110989979A (en) Terrain generation method based on UE engine
KR100843292B1 (en) Apparatus and Method for Ray Tracing Using Lookup Table
CN113129406B (en) Data processing method and device and electronic equipment
KR101782816B1 (en) Treemap visualization method and device using the method
CN117421089B (en) Step geographic information element processing method and device
KR100792827B1 (en) Method of generating mosaic image and storage medium storing program therefor

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
CB02 Change of applicant information

Address after: 200127 3rd and 4th floors, No.1 Lane 65, Huanlong Road, Pudong New Area Free Trade Zone, Shanghai

Applicant after: Meiping Meiwu (Shanghai) Technology Co.,Ltd.

Address before: 200127 3rd and 4th floors, No.1 Lane 65, Huanlong Road, Pudong New Area Free Trade Zone, Shanghai

Applicant before: Lie Ping Designer (Shanghai) Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant