Parameter line extraction method, device, equipment and medium for cutting a digital model surface
By setting texture image coordinates and intersection detection in the digital model, generating grid lines and segmenting and filtering center point coordinates, the problems of loss of information and high complexity of parameter line extraction in the existing technology are solved, and efficient and accurate parameter line extraction is achieved.
Patent Information
- Application Number
- CN202510444152.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-10
AI Technical Summary
The prior art tends to lose information about the original geometric figure when extracting digital model parameter lines, and the calculation complexity is high and inaccurate enough, especially when dealing with complex irregular shapes.
By obtaining the initial geometric figure of the digital model, setting the texture image coordinates, generating grid lines and performing intersection detection, calculating the horizontal value of the texture image for segmentation, filtering the coordinates of the center point to extract the target parameter lines, avoiding the re-parameterization process.
Improve the accuracy of parameter line extraction, reduce the computational complexity and cost, and quickly generate accurate parameter lines.
Smart Images

Figure CN119939791B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computational fluid dynamics, and particularly relates to a method, device, equipment and medium for extracting parametric lines of a trimmed digital model surface. Background Art
[0002] In related technical solutions, the methods for extracting parametric lines of digital models include the isoparametric curve method and the data fitting method. In addition, for trimmed geometric figures, there are also some methods including the reparametrization line method, the parameter range calculation method, and the topology-based method. The disadvantages of these solutions are as follows: In the reparametrization line method, during the reparametrization process, information of the original geometric figure may be lost. For example, complex textures and subtle shape changes may lead to error accumulation. This method usually involves complex mathematical calculations and algorithms, and the computational cost may be very high. In the parameter range calculation method, the parameter range calculation is usually based on specific digital models or algorithms, and these models cannot accurately describe the characteristics of geometric figures. Therefore, the parameter range may be inaccurate or unrepresentative. In the topology-based method, for geometric figures with very complex and irregular shapes, the topology may not be able to accurately describe details and features, resulting in the loss of some key local shape information. The topology usually has a certain degree of fixity and standardization, resulting in a lack of sufficient flexibility when facing some special requirements or changes.
[0003] As can be seen from the above, how to avoid losing information of the original geometric figure, reduce the complexity of parametric line extraction of trimmed geometric figures, and improve the accuracy of parametric line extraction of trimmed geometric figures is a problem to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for extracting parametric lines of a trimmed digital model surface, which can avoid losing information of the original geometric figure, reduce the complexity of parametric line extraction of trimmed geometric figures, and improve the accuracy of parametric line extraction of trimmed geometric figures. The specific solutions are as follows:
[0005] In the first aspect, the present application discloses a method for extracting parametric lines of a trimmed digital model surface, including:
[0006] Obtaining a digital model for describing geometric elements of an aircraft, screening and parameter-configuring an initial geometric figure in the digital model to obtain a geometric figure, and determining a parametric surface extraction direction;
[0007] Judging whether the geometric figure is a trimmed surface. If the geometric figure is a trimmed surface, extracting corresponding parametric lines from the geometric figure according to the parametric surface extraction direction;
[0008] Generate grid lines based on the geometric figure, perform intersection detection on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the horizontal value of the texture image at the intersection, and use the horizontal value of the texture image to segment the grid lines to obtain the segmented grid lines. Calculate and screen the midpoint coordinates of the segmented grid lines to obtain the target midpoint coordinates, and extract the target parameter lines for the clipped geometric figure based on the target midpoint coordinates.
[0009] Optionally, the screening and parameter configuration of the initial geometric figure in the digital model include:
[0010] Select any initial geometric figure from the digital model;
[0011] Set the horizontal coordinate and vertical coordinate of the texture image for the initial geometric figure.
[0012] Optionally, the generating grid lines based on the geometric figure includes:
[0013] Obtain the discrete points of all the boundary lines of the geometric figure, and generate grid lines using the discrete points.
[0014] Optionally, the intersection detection of the grid lines and the parameter lines includes:
[0015] Calculate the shortest distance between the grid lines and the parameter lines, and use the shortest distance to determine whether the grid lines and the parameter lines intersect to complete the intersection detection.
[0016] Optionally, if the grid lines and the parameter lines intersect, calculating the horizontal value of the texture image at the intersection includes:
[0017] If the grid lines and the parameter lines intersect, determine the lengths and the number of segments of the intersecting parameter lines, and calculate the horizontal value of the texture image at the intersection based on the lengths and the number of segments of the intersecting parameter lines.
[0018] Optionally, the calculating and screening the midpoint coordinates of the segmented grid lines to obtain the target midpoint coordinates includes:
[0019] Obtain all the segmented grid lines, and calculate the midpoint coordinates of all the segmented grid lines to obtain the midpoint coordinates;
[0020] Use the midpoint coordinates that meet the preset conditions as the target midpoint coordinates.
[0021] Optionally, the using the midpoint coordinates that meet the preset conditions as the target midpoint coordinates includes:
[0022] Determine whether the midpoint coordinates are within the digital model or on the digital model;
[0023] If the midpoint coordinates are within the digital model or on the digital model, then use the midpoint coordinates as the target midpoint coordinates.
[0024] In a second aspect, the present application discloses a parameter line extraction device for trimming a digital model surface, including:
[0025] A geometric figure determination module, configured to obtain a digital model for describing the geometric elements of an aircraft, screen and perform parameter configuration on the initial geometric figure in the digital model to obtain a geometric figure, and determine the parameter surface extraction direction;
[0026] A trimming surface determination module, configured to determine whether the geometric figure is a trimming surface. If the geometric figure is a trimming surface, extract the corresponding parameter line from the geometric figure according to the parameter surface extraction direction;
[0027] A target parameter line extraction module, configured to generate grid lines based on the geometric figure, perform intersection detection on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the horizontal value of the texture image at the intersection, use the horizontal value of the texture image to segment the grid lines to obtain the segmented grid lines, calculate and screen the midpoint coordinates of the segmented grid lines to obtain the target midpoint coordinates, and extract the target parameter line of the trimmed geometric figure based on the target midpoint coordinates.
[0028] In a third aspect, the present application discloses an electronic device, including:
[0029] A memory, configured to store a computer program;
[0030] A processor, configured to execute the computer program to implement the foregoing parameter line extraction method for trimming a digital model surface.
[0031] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the foregoing parameter line extraction method for trimming a digital model surface are implemented.
[0032] It can be seen that the present application provides a method for extracting parameter lines for cutting a digital model surface, including obtaining a digital model for describing geometric elements of an aircraft, screening and parameter configuring an initial geometric figure in the digital model to obtain a geometric figure, and determining a parameter surface extraction direction; determining whether the geometric figure is a cutting surface, if the geometric figure is a cutting surface, then extracting corresponding parameter lines from the geometric figure according to the parameter surface extraction direction; generating grid lines based on the geometric figure, performing an intersection detection on the grid lines and the parameter lines, if the grid lines and the parameter lines intersect, then calculating a horizontal value of a texture image at the intersection, and using the horizontal value of the texture image to segment the grid lines to obtain the segmented grid lines, calculating and screening midpoint coordinates of the segmented grid lines to obtain target midpoint coordinates, and extracting target parameter lines of the cut geometric figure based on the target midpoint coordinates. The present application screens and parameter configures the initial geometric figure in the digital model for describing geometric elements of an aircraft to obtain a geometric figure, determines a parameter surface extraction direction, and if the geometric figure is a cutting surface, then extracts corresponding parameter lines, avoiding the process of re-parameterizing the geometric figure after cutting, so it can solve the problem of losing information of the original geometric figure. Grid lines are generated based on the geometric figure, intersection detection is performed on the grid lines and the parameter lines, if the grid lines and the parameter lines intersect, then the horizontal value of the texture image at the intersection is calculated, the grid lines are segmented, midpoint coordinates of the segmented grid lines are calculated and screened to obtain target midpoint coordinates, and thus the target parameter lines of the cut geometric figure are extracted. By using the method of intersection detection on the grid lines and the parameter lines, the complexity of extracting parameter lines of the cut geometric figure can be reduced, the calculation cost can be reduced, parameter lines can be generated quickly, and the accuracy of extracting parameter lines of the cut geometric figure can be improved. Description of the Drawings
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0034] Figure 1 Flowchart of a method for extracting parameter lines for cutting a digital model surface disclosed in the present application;
[0035] Figure 2 Example diagram of all boundary lines and grid lines of a geometric figure disclosed in the present application;
[0036] Figure 3 Principle diagram of parameter line segmentation disclosed in the present application;
[0037] Figure 4 The result graph of the target parameter line extracted in this application
[0038] Figure 5 The specific flowchart for implementing the extraction of the parameter line of the clipped geometric figure in this application
[0039] Figure 6 The structural schematic diagram of the device for extracting the parameter line of the clipped geometric figure disclosed in this application
[0040] Figure 7 The structural diagram of an electronic device provided by this application Specific implementation manners
[0041] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0042] In the related technical solutions, the methods for extracting the parameter lines of digital models include the isoparametric curve method and the data fitting method. In addition, for the clipped geometric figures, there are also some methods including the reparameterization line method, the parameter range calculation method, and the topology-based method. The disadvantages of these solutions are as follows: In the reparameterization line method, during the reparameterization process, information of the original geometric figure may be lost. For example, complex textures and subtle shape changes may lead to error accumulation. This method usually involves complex mathematical calculations and algorithms, and the calculation cost may be very high. In the parameter range calculation method, the parameter range calculation is usually based on specific digital models or algorithms, and these models cannot accurately describe the characteristics of geometric figures. Therefore, the parameter range may be inaccurate or unrepresentative. In the topology-based method, for geometric figures with very complex and irregular shapes, the topology may not be able to accurately describe the details and features, resulting in the loss of some key local shape information. The topology usually has a certain degree of fixity and standardization, resulting in a lack of sufficient flexibility when facing some special requirements or changes. As can be seen from the above, how to avoid losing the information of the original geometric figure, reduce the complexity of the parameter line extraction of the clipped geometric figure, and improve the accuracy of the parameter line extraction of the clipped geometric figure are problems to be solved in this field.
[0043] See Figure 1 As shown, the embodiments of the present invention disclose a method for extracting the parameter line of the clipped digital model surface, which may specifically include:[[]]
[0044] Step S11: Obtain a digital model for describing the geometric elements of the aircraft, screen and configure parameters for the initial geometric figures in the digital model to obtain geometric figures, and determine the parameter surface extraction direction.
[0045] In this embodiment, obtain a digital model for describing the geometric elements of the aircraft, select any initial geometric figure from the digital model, set the horizontal coordinate of the texture image and the vertical coordinate of the texture image for the initial geometric figure to obtain geometric figures, and determine the parameter surface extraction direction.
[0046] In CAD (Computer Aided Design), a digital model is a model that accurately describes and expresses the geometric, physical and other characteristics of an object or system in a digital way. In the related field of CAD, the UV value refers to the value in the UV coordinate system. The UV coordinate is a coordinate system used to locate colors and details in a two-dimensional texture image. U and V represent the horizontal and vertical axes of the texture image respectively, similar to the X and Y axes in a two-dimensional plane. The UV value is the specific coordinate value of a certain point on the U axis and the V axis in this coordinate system, which is used to accurately determine the corresponding position of each point on the texture image on the surface of the three-dimensional model.
[0047] Specifically, first import the digital model, then select the corresponding initial geometric figure for generating the parameter line, then set the UV coordinates (i.e., the horizontal coordinate of the texture image and the vertical coordinate of the texture image) on the geometric figure, and determine the parameter surface extraction direction.
[0048] Step S12: Determine whether the geometric figure is a cutting plane. If the geometric figure is a cutting plane, extract the corresponding parameter line from the geometric figure according to the parameter surface extraction direction.
[0049] In this embodiment, determine whether the geometric figure is a cutting plane. If the geometric figure is not a cutting plane, end the process of extracting the parameter line of the trimmed geometric figure. If the geometric figure is a cutting plane, extract the corresponding parameter line from the geometric figure according to the parameter surface extraction direction.
[0050] Step S13: Generate grid lines based on the geometric figure, perform an intersection detection on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the horizontal value of the texture image at the intersection, use the horizontal value of the texture image to segment the grid lines to obtain the segmented grid lines, calculate and screen the midpoint coordinates of the segmented grid lines to obtain the target midpoint coordinates, and extract the target parameter line of the trimmed geometric figure based on the target midpoint coordinates.
[0051] In this embodiment, all discrete points of the boundary lines of the geometric figure are obtained, grid lines are generated using the discrete points, the shortest distance between the grid lines and the parameter lines is calculated, and the shortest distance is used to determine whether the grid lines intersect the parameter lines to complete the intersection detection. If the grid lines intersect the parameter lines, the lengths and numbers of segments of the intersecting parameter lines are determined, the horizontal value of the texture image at the intersection is calculated based on the lengths and numbers of segments of the intersecting parameter lines, all the segmented grid lines are obtained, and the midpoint coordinates are calculated for all the segmented grid lines to obtain the midpoint coordinates. The midpoint coordinates that meet the preset conditions are used as the target midpoint coordinates, and the target parameter lines of the clipped geometric figure are extracted based on the target midpoint coordinates.
[0052] Among them, using the midpoint coordinates that meet the preset conditions as the target midpoint coordinates includes: determining whether the midpoint coordinates are inside the digital model or on the digital model; if the midpoint coordinates are inside the digital model or on the digital model, then using the midpoint coordinates as the target midpoint coordinates.
[0053] The specific extraction process of the target parameter lines is as follows: (1) Obtain the discrete points of all the boundary lines of the geometric figure, and use the discrete points to generate a new grid line FC_CON. The new grid line is as shown in Figure 2 , and a circle of discrete points of the digital model forms FC_CON, and the part of the extracted parameter line CON that exists on the non-geometric figure; (2) Perform intersection detection on the line segments formed by two adjacent discrete points of FC_CON and the parameter line CON. The principle of intersection detection is as shown in Figure 3 . Assume that the start and end points of the first line segment are P0 and Q0, and the start and end points of the second line segment are P1 and Q1. For the above two line segments, they can be expressed as and . Assume that and the distance between them is the smallest, and let . To find , only when has the minimum value, is perpendicular to at the same time, . That is,
[0054] ;
[0055] ;
[0056] Further, we have:
[0057] ;
[0058] Substituting into the equation gives:
[0059]
[0060] Let , , , , and . Then the solution of the system of equations is:
[0061] ;
[0062] ;
[0063] If the denominator , then , are parallel to each other. By arbitrarily taking to calculate . By setting , then . The distance of , can be calculated:
[0064] ;
[0065] The shortest distance can be used to back-calculate , , and then it can be determined whether the line segments intersect;
[0066] Then, the u value (i.e., the horizontal value of the texture image) on the grid line is determined by the points on the parameter line CON where there are intersecting discrete segments: Assume that the nth segment (with length lenth_n) of the parameter line CON intersects with FC_CON, the total number of segments of the parameter line CON is N, and the total length is Lenth, then the u value is
[0067] ;
[0068] All the divided u values can be obtained:
[0069] ;
[0070] Then, the extracted parameter line CON is divided at the obtained u values: First, the set U is sorted as:
[0071] ;
[0072] where , when i > 0, there is .
[0073] The parameter line segmentation principle is as follows Figure 3 As shown, let a be the parameter line CON, which needs to be segmented into 3 segments. Then the segmentation value on a is , obtaining line segments b and c; then the segmentation value on line c is , obtaining line segments d and e. By analogy, multiple segmented grid lines are obtained;
[0074] Finally, for each grid line, calculate the midpoint coordinates. If the point is inside or on the digital model, keep it; if the point is on the clipping plane, delete it. Thus, the extraction of the parameter line on the clipping plane is completed, and the resulting target parameter line is as shown in Figure 4 .
[0075] The process of implementing the extraction of the parameter line of the clipped geometric figure in this application is as shown in Figure 5 . First, obtain the digital model used to describe the geometric elements of the aircraft, select any initial geometric figure, set the texture image horizontal coordinate and texture image vertical coordinate for the initial geometric figure to obtain the geometric figure, and determine the parameter plane extraction direction; then determine whether the geometric figure is a clipping plane. If the geometric figure is not a clipping plane, end the extraction process. If the geometric figure is a clipping plane, extract the corresponding parameter line from the geometric figure according to the parameter plane extraction direction; then generate grid lines based on the discrete points of all the boundary lines of the geometric figure, perform an intersection detection on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the texture image horizontal value at the intersection, use the texture image horizontal value to segment the grid lines, calculate the midpoint coordinates of the segmented grid lines, and then determine whether the midpoint coordinates are inside or on the digital model. If so, keep them to extract the target parameter line of the clipped geometric figure.
[0076] The initial parameter line in this application is extracted from the geometric figure before the original clipping, without reparameterizing the geometric figure surface after clipping. Therefore, the information of the original geometric figure will not be further lost, resulting in the accumulation of errors and the generation of factors that make the final simulation inaccurate. Moreover, this application uses the limit intersection detection algorithm to divide the parameter line into two categories: whether it is on the geometric figure after clipping. The calculation method is simple, does not require a high calculation cost, and can quickly generate the parameter line.
[0077] In this embodiment, a digital model for describing the geometric elements of an aircraft is obtained, and the initial geometric figures in the digital model are screened and parameter-configured to obtain geometric figures, and the parameter surface extraction direction is determined; it is judged whether the geometric figure is a trimming surface, and if the geometric figure is a trimming surface, the corresponding parameter lines are extracted from the geometric figure according to the parameter surface extraction direction; grid lines are generated based on the geometric figure, and intersection detection is performed on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, the horizontal value of the texture image at the intersection is calculated, and the grid lines are segmented using the horizontal value of the texture image to obtain the segmented grid lines. The midpoint coordinates of the segmented grid lines are calculated and screened to obtain the target midpoint coordinates, and the target parameter lines of the trimmed geometric figure are extracted based on the target midpoint coordinates. In this application, the initial geometric figures in the digital model for describing the geometric elements of the aircraft are screened and parameter-configured to obtain geometric figures, and the parameter surface extraction direction is determined. If the geometric figure is a trimming surface, the corresponding parameter lines are extracted, avoiding the process of re-parameterizing the geometric figure after trimming, so the situation of losing the information of the original geometric figure can be solved. Grid lines are generated based on the geometric figure, and intersection detection is performed on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, the horizontal value of the texture image at the intersection is calculated, and the grid lines are segmented. The midpoint coordinates of the segmented grid lines are calculated and screened to obtain the target midpoint coordinates, so as to extract the target parameter lines of the trimmed geometric figure. By using the method of intersection detection between the grid lines and the parameter lines, the complexity of extracting the parameter lines of the trimmed geometric figure can be reduced, the calculation cost can be reduced, the parameter lines can be generated quickly, and the accuracy of extracting the parameter lines of the trimmed geometric figure can be improved.
[0078] See Figure 6 As shown, an apparatus for extracting parameter lines of a trimmed digital model surface is disclosed in an embodiment of the present invention, which may specifically include:
[0079] A geometric figure determination module 11, configured to obtain a digital model for describing the geometric elements of an aircraft, screen and parameter-configure the initial geometric figures in the digital model to obtain geometric figures, and determine the parameter surface extraction direction;
[0080] A trimming surface judgment module 12, configured to judge whether the geometric figure is a trimming surface, and if the geometric figure is a trimming surface, extract the corresponding parameter lines from the geometric figure according to the parameter surface extraction direction;
[0081] The target parameter line extraction module 13 is configured to generate grid lines based on the geometric figure, perform intersection detection on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the horizontal value of the texture image at the intersection, use the horizontal value of the texture image to segment the grid lines to obtain the segmented grid lines, calculate and filter the midpoint coordinates of the segmented grid lines to obtain the target midpoint coordinates, and extract the target parameter line of the clipped geometric figure based on the target midpoint coordinates.
[0082] In this embodiment, a digital model for describing the geometric elements of the aircraft is obtained, the initial geometric figures in the digital model are screened and parameter-configured to obtain geometric figures, and the parameter plane extraction direction is determined; it is judged whether the geometric figure is a clipping plane. If the geometric figure is a clipping plane, the corresponding parameter line is extracted from the geometric figure according to the parameter plane extraction direction; grid lines are generated based on the geometric figure, intersection detection is performed on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the horizontal value of the texture image at the intersection, use the horizontal value of the texture image to segment the grid lines to obtain the segmented grid lines, calculate and filter the midpoint coordinates of the segmented grid lines to obtain the target midpoint coordinates, and extract the target parameter line of the clipped geometric figure based on the target midpoint coordinates. In this application, the initial geometric figures in the digital model for describing the geometric elements of the aircraft are screened and parameter-configured to obtain geometric figures, the parameter plane extraction direction is determined. If the geometric figure is a clipping plane, the corresponding parameter line is extracted, avoiding the process of re-parameterizing the geometric figure after clipping, so the situation of losing the information of the original geometric figure can be solved. Grid lines are generated based on the geometric figure, intersection detection is performed on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the horizontal value of the texture image at the intersection and segment the grid lines, calculate and filter the midpoint coordinates of the segmented grid lines to obtain the target midpoint coordinates, and thus extract the target parameter line of the clipped geometric figure. By the method of performing intersection detection on the grid lines and the parameter lines, the complexity of extracting the parameter line of the clipped geometric figure can be reduced, the calculation cost can be reduced, the parameter line can be generated quickly, and the accuracy of extracting the parameter line of the clipped geometric figure can be improved.
[0083] In some specific embodiments, the geometric figure determination module 11 may specifically include:
[0084] The model surface selection module is configured to select any initial geometric figure from the digital model;
[0085] The setting module is configured to set the horizontal coordinate and vertical coordinate of the texture image for the initial geometric figure.
[0086] In some specific embodiments, the target parameter line extraction module 13 may specifically include:
[0087] A grid line generation module, configured to obtain discrete points of all boundary lines of the geometric figure, and generate grid lines by using the discrete points.
[0088] In some specific embodiments, the target parameter line extraction module 13 may specifically include:
[0089] An intersection detection module, configured to calculate the shortest distance between the grid line and the parameter line, and determine whether the grid line intersects with the parameter line by using the shortest distance, so as to complete intersection detection.
[0090] In some specific embodiments, the target parameter line extraction module 13 may specifically include:
[0091] A horizontal value calculation module, configured to, if the grid line intersects with the parameter line, determine the lengths and numbers of segments of the intersecting parameter lines, and calculate the horizontal value of the texture image at the intersection based on the lengths and numbers of segments of the intersecting parameter lines.
[0092] In some specific embodiments, the target parameter line extraction module 13 may specifically include:
[0093] A midpoint coordinate calculation module, configured to obtain all the segmented grid lines, and calculate the midpoint coordinates of all the segmented grid lines to obtain midpoint coordinates;
[0094] A target midpoint coordinate determination module, configured to use the midpoint coordinates that meet the preset conditions as target midpoint coordinates.
[0095] In some specific embodiments, the target parameter line extraction module 13 may specifically include:
[0096] A judgment module, configured to judge whether the midpoint coordinates are inside the digital model or on the digital model;
[0097] A target midpoint coordinate determination module, configured to, if the midpoint coordinates are inside the digital model or on the digital model, use the midpoint coordinates as target midpoint coordinates.
[0098] Figure 7A schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the method for extracting parameter lines of the trimmed digital model surface executed by the electronic device disclosed in any of the foregoing embodiments.
[0099] In this embodiment, the power supply 23 is used to provide operating voltages for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0100] In addition, as a carrier for resource storage, the memory 22 can be a read-only memory, a random access memory, a magnetic disk, or an optical disc, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0101] Among them, the operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222 to implement the operation and processing of the data 223 in the memory 22 by the processor 21, and it can be Windows, Unix, Linux, etc. In addition to the computer program that can be used to complete the method for extracting parameter lines of the trimmed digital model surface executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to the data that can include the data transmitted from external devices received by the parameter line extraction device for trimming the digital model surface, the data 223 can also include the data collected by its own input / output interface 25, etc.
[0102] The steps of the method or algorithm described in combination with the embodiments disclosed in this article can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0103] Furthermore, the embodiments of the present application also disclose a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps for extracting the parameter lines of the trimmed digital model surface disclosed in any of the foregoing embodiments are implemented.
[0104] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0105] The above has introduced in detail a method, device, equipment and storage medium for extracting parameter lines of a trimmed digital model surface provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for extracting parametric lines for trimming digital model surfaces, characterized by, Including: Obtain a digital model for describing the geometric elements of the aircraft, screen and parameter-configure the initial geometric figures in the digital model to obtain geometric figures, and determine the parameter surface extraction direction; Judge whether the geometric figure is a trimming surface. If the geometric figure is a trimming surface, extract the corresponding parameter lines from the geometric figure according to the parameter surface extraction direction; Generate grid lines based on the geometric figure, perform intersection detection on the grid lines and the parameter lines. If the grid lines and the parameter lines intersect, calculate the horizontal value of the texture image at the intersection, use the horizontal value of the texture image to segment the parameter lines to obtain the segmented parameter lines, calculate and screen the midpoint coordinates of the segmented parameter lines to obtain the target midpoint coordinates, and extract the target parameter lines of the trimmed geometric figure based on the target midpoint coordinates; Among them, grid lines are generated based on geometric figures, and intersection detection is performed on the grid lines and parameter lines. If the grid lines and parameter lines intersect, the horizontal value of the texture image at the intersection is calculated, and the parameter lines are segmented using the horizontal value of the texture image to obtain the segmented parameter lines, including: obtaining the discrete points of all the boundary lines of the geometric figure, and generating grid lines using the discrete points; performing intersection detection on the line segments formed by two adjacent discrete points of the grid lines and parameter lines; determining the corresponding horizontal value of the texture image on the grid line through the points with intersecting discrete segments on the parameter line; obtaining all the horizontal values of the texture image ; where u is the horizontal value of the texture image, and N is the total number of segments of the parameter line; segment the parameter line at the horizontal value of the texture image: organize the set U as: ; where ; when i > 0, there is ; and so on for segmentation to obtain multiple segmented parameter lines.
2. The method for extracting parametric lines of a trimmed digital model surface according to claim 1, wherein The screening and parameter configuration of the initial geometric figures in the digital model include: Select any initial geometric figure from the digital model; Set the horizontal coordinate and vertical coordinate of the texture image for the initial geometric figure.
3. The method for extracting parametric lines of a trimmed digital model surface according to claim 1, characterized in that The intersection detection of the grid lines and the parameter lines includes: Calculate the shortest distance between the grid lines and the parameter lines, and use the shortest distance to determine whether the grid lines and the parameter lines intersect to complete the intersection detection.
4. The method for extracting parameter lines of a trimmed digital model surface according to claim 1, characterized in that The calculation of the horizontal value of the texture image at the intersection when the grid lines and the parameter lines intersect includes: If the grid lines and the parameter lines intersect, determine the lengths and numbers of segments of the intersecting parameter lines, and calculate the horizontal value of the texture image at the intersection based on the lengths and numbers of segments of the intersecting parameter lines.
5. The method for extracting parametric lines of a trimmed digital model surface according to any one of claims 1 to 4, characterized in that The calculation and screening of the midpoint coordinates of the segmented parameter lines to obtain the target midpoint coordinates include: Obtain all the segmented parameter lines and calculate the midpoint coordinates of all the segmented parameter lines to obtain the midpoint coordinates; Use the midpoint coordinates that meet the preset conditions as the target midpoint coordinates.
6. The method for extracting parametric lines of a trimmed digital model surface according to claim 5, characterized in that, The use of the midpoint coordinates that meet the preset conditions as the target midpoint coordinates includes: Judge whether the midpoint coordinates are inside the digital model or on the digital model; If the midpoint coordinates are inside the digital model or on the digital model, use the midpoint coordinates as the target midpoint coordinates.
7. A parameter line extraction device for cutting a digital model surface, characterized in that Including: A geometric figure determination module for obtaining a digital model for describing the geometric elements of the aircraft, screening and parameter-configuring the initial geometric figures in the digital model to obtain geometric figures, and determining the parameter surface extraction direction; A trimming surface judgment module for judging whether the geometric figure is a trimming surface. If the geometric figure is a trimming surface, extract the corresponding parameter lines from the geometric figure according to the parameter surface extraction direction; A target parameter line extraction module, configured to generate grid lines based on the geometric figure, perform intersection detection on the grid lines and the parameter line. If the grid lines and the parameter line intersect, calculate the horizontal value of the texture image at the intersection, use the horizontal value of the texture image to segment the parameter line to obtain the segmented parameter line, calculate and filter the midpoint coordinates of the segmented parameter line to obtain the target midpoint coordinates, and extract the target parameter line of the trimmed geometric figure based on the target midpoint coordinates; Among them, grid lines are generated based on geometric figures, and intersection detection is performed on the grid lines and parametric lines. If the grid lines and parametric lines intersect, the horizontal value of the texture image at the intersection is calculated, and the parametric lines are segmented using the horizontal value of the texture image to obtain the segmented parametric lines, including: obtaining discrete points of all boundary lines of the geometric figure, and generating grid lines using the discrete points; performing intersection detection on line segments formed by two adjacent discrete points of the grid lines and parametric lines; determining the corresponding horizontal value of the texture image on the grid line through the points on the parametric line where there are intersecting discrete segments; obtaining all horizontal values of the texture image ; where u is the horizontal value of the texture image, and N is the total number of segments of the parametric line; segment the parametric line at the horizontal value of the texture image: organize the set U as: ; where ; when i > 0, there is ; and so on for segmentation to obtain multiple segmented parametric lines.
8. An electronic device, characterized in that, including: a memory for storing a computer program; a processor for executing the computer program to implement the parameter line extraction method for trimming the digital model surface according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, for storing a computer program; wherein, when the computer program is executed by the processor, the parameter line extraction method for trimming the digital model surface according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Target object detection method and device, electronic equipment and storage medium
CN116433767A
Fracture surface geometric element description method based on structural modeling
CN116500680A