A wind turbine blade glass fiber cutting paper processing method based on graphic color classification and automatic closing correction

By using graphic color classification and automatic closure correction methods, the processing of wind turbine blade cutting drawings is automated, solving the problems of low efficiency and high error rate caused by manual operation. It achieves efficient and accurate graphic processing and area calculation, generates detailed reports, and improves production quality and efficiency.

CN122244891APending Publication Date: 2026-06-19JILIN CHONGTONG CHENGFEI NEW MATERIAL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JILIN CHONGTONG CHENGFEI NEW MATERIAL
Filing Date
2026-01-26
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The process of processing cutting drawings in wind turbine blade manufacturing relies on manual operation, resulting in low efficiency in area calculation, visual inspection for graphic closure verification, cumbersome error correction, and outdated specification information management, which affects production efficiency and quality.

Method used

By using a method based on graphic color classification and automatic closure correction, the system reads DXF drawing files, parses the unit system, creates a processing result container, traverses and filters graphic entities, automatically verifies and corrects non-closed graphics, calculates the area using multiple algorithms, and generates a processing report.

Benefits of technology

It improves the automation of drawing processing, reduces manual operation time, avoids production accidents caused by incomplete drawing closure, provides reliable area calculation and error marking, generates detailed reports, and supports quality audits and production traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122244891A_ABST
    Figure CN122244891A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of wind turbine blade manufacturing technology, and specifically discloses a method for processing fiberglass cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction. The method includes steps such as automatically performing graphic entity traversal and filtering, closure verification and correction, accurate area calculation, color classification statistics, and error handling. Compared with the prior art, this method solves the problems of low efficiency and high error rate of manual operation, and has the advantages of improving the automation level of drawing processing, reducing manual operation time and errors, and improving overall processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of wind turbine blade manufacturing technology, and in particular relates to a method for processing fiberglass sleeve cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction. Background Technology

[0002] In the manufacturing process of wind turbine blades, the cutting of glass fiber composite materials plays a crucial role in controlling production costs and ensuring product quality. To optimize material utilization, manufacturers commonly use two-dimensional computer-aided design software for dense nesting and cutting, generating nesting drawings containing numerous graphics. These drawings consist of hundreds of closed graphics of varying shapes, each corresponding to a specific specification of glass fiber cloth sheet. The quality of this processing directly affects the accuracy and efficiency of subsequent CNC cutting.

[0003] However, the current post-processing workflow for overlay cutting drawings in the industry heavily relies on manual operation or general computer-aided design tools, exposing numerous technical deficiencies. The area calculation process faces significant efficiency bottlenecks and accuracy risks. Designers must select graphics one by one, invoke measurement commands, and manually record the results, then classify them according to scattered layers or annotation information. Faced with the processing needs of hundreds of graphics in a typical drawing, this process is time-consuming and prone to omissions, duplications, or classification errors due to operator fatigue. Calculation deviations directly lead to inaccurate material procurement budgets and uncontrolled production costs. The graphic closure verification stage relies entirely on manual visual inspection, while CNC cutting equipment strictly requires all contours to be geometrically closed; any tiny gap can cause the cutting process to be interrupted or the product to be scrapped. Designers must repeatedly zoom in on views to examine vertex connection details; under high-intensity work, it is difficult to ensure comprehensive coverage. Undetected non-closed graphics often only surface during the production stage, resulting in costly material losses and project delays. Error correction lacks automated support. Upon discovering non-closed shapes, manual location of breakpoints and adjustment of vertices are required, a technically demanding and time-consuming process. Furthermore, the correction process lacks systematic documentation, making it impossible to trace historical operations or assess quality consistency. Specification information management is particularly outdated. Material specification data is scattered across layer attributes, linetype settings, or independent text annotations, resulting in chaotic formats and susceptibility to accidental modification. This makes it difficult for programs to automatically identify and utilize this information, severely hindering the intelligent upgrading of the processing workflow. These issues collectively restrict the digitalization level of wind turbine blade manufacturing, making the drawing processing stage a bottleneck for improving production efficiency.

[0004] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0005] The purpose of this invention is to provide a method for processing fiberglass cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction. This method has the advantages of improving the automation level of drawing processing in wind turbine blade manufacturing, improving the accuracy of area calculation, simplifying the graphic closure verification process, optimizing the error handling mechanism, and improving specification information management. It solves the problems of inefficient and error-prone area calculation caused by manual operation in the prior art, reliance on visual inspection for graphic closure verification, cumbersome error correction, and backward specification information management.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows: a method for processing fiberglass sleeve cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction, comprising the following steps:

[0007] S1. File Initialization and Preprocessing: Read the original DXF drawing file of the fiberglass cutting of the wind turbine blade, parse the file header information, and obtain the unit system identifier corresponding to the original DXF drawing file; at the same time, create another DXF drawing file as a container for the processing results, and create an error mark layer in the processing results container;

[0008] S2. Graphic Entity Traversal and Filtering: Traverse all graphic entities in the model space corresponding to the original DXF drawing file, and then filter all graphic entities to obtain the target entity graphic.

[0009] S3. Graphic Closure Verification and Automatic Correction: A closure judgment and correction sub-process is performed on each selected target entity graphic. The specific process is as follows:

[0010] S3.1 Closure State Judgment: By accessing the closed attribute or is_closed attribute of the target entity graphic, determine whether it is in a geometrically closed state. If it is, output it directly as the result to step S4; otherwise, proceed to step S3.2.

[0011] S3.2 Automatic Closure and Marking: For a target entity graphic that is not geometrically closed, connect its first and last vertices to force it to form a closed graphic; then, modify the display color attribute of the corrected target entity graphic to the first preset identifier color, and record one "closure correction" operation; output the corrected target entity graphic as the result to step S4;

[0012] S4. Accurate calculation of graphic area with multiple algorithm adaptation: For each target entity graphic output in step S3, the corresponding matching algorithm is called to calculate the area to obtain the original area value. Based on the unit system identifier obtained in step S1, the original area value is converted to a unit to obtain the actual area value expressed in standard units.

[0013] S5. Area classification statistics based on color attributes:

[0014] S5.1 Color Attribute Parsing: Retrieves the color index value of the current graphic entity;

[0015] S5.2 Color Mapping and Classification Accumulation: Map color index values ​​to easy-to-read color names; and accumulate the actual area values ​​calculated in step S4 into a statistical dictionary with "color name" as the key to classify and summarize the area of ​​each target entity graphic.

[0016] S6. Error handling and graphic marking: If the target entity graphic in steps S2-S6 experiences a processing error, the corresponding target entity graphic is directly output to the error marking layer of the processing result container, and its corresponding display color is modified to the second preset identifier color.

[0017] S7. Output Results and Report Generation: Output all processed target entity graphics to the processing result container and save them, while generating a text processing report.

[0018] Furthermore, in step S2, the targets to be screened include at least lightweight polylines, traditional polylines, circles, ellipses, spline curves, regions, and fill patterns.

[0019] Furthermore, in step S4, the area calculation of the target entity graphic includes:

[0020] S4.1 Calculation of area of ​​segments and polygons: If the drawing has a corresponding area attribute, the corresponding area attribute is directly called as the original area value; if there is no such attribute, the shoelace formula is used to calculate based on the vertex coordinates.

[0021] S4.2, Approximate calculation of spline curve area: Calculate the area of ​​the corresponding spline curve using the vertex approximation algorithm.

[0022] S4.3 Calculation of area of ​​regular graphics: If the drawing has a corresponding area attribute, the corresponding area attribute is directly called as the original area value; if there is no such attribute, the original area value is obtained by calculating using the geometric formula of the corresponding graphic.

[0023] Furthermore, the text processing report should include at least an area summary list, a drawing unit system, a count of the number of closure correction operations, and a summary of the error log.

[0024] The beneficial effects of this technical solution are as follows:

[0025] This invention discloses a method for processing fiberglass overlay drawings of wind turbine blades based on graphic color classification and automatic closure correction. By reading the original DXF drawing file of the fiberglass overlay of the wind turbine blade, parsing the file header information, and obtaining the unit system identifier, a processing result container and an error marking layer are created, laying the foundation for subsequent automated processing. This solves the problems of low efficiency and high error rate of manual operation, and has the advantages of improving the automation level of drawing processing, reducing manual operation time and errors, and improving overall processing efficiency. Simultaneously, the closure check of the graphics is performed through programmatic logic to avoid omission risks and eliminate production accidents caused by non-closed graphics. This invention also provides a method for approximate area calculation of complex graphics such as spline curves, covering various situations in practical applications. Furthermore, a safe mode of "identifying the original file - processing - creating a new file" is adopted to ensure that the original drawings are not destroyed. An independent error marking mechanism ensures that problems are clear at a glance, facilitating targeted review. The automatically generated processing report provides a complete data snapshot and operation log, realizing standardized output of the processing process, facilitating quality auditing, production traceability, and data analysis. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the processing flow of a wind turbine blade fiberglass cutting drawing processing method based on graphic color classification and automatic closure correction according to the present invention. Detailed Implementation

[0027] The following detailed description illustrates the specific implementation method:

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] For ease of understanding, the following explains some key terms in this embodiment:

[0030] DXF drawing files are a CAD data exchange file format developed by Autodesk, used to transfer two-dimensional or three-dimensional graphic data between different CAD programs. This file format stores geometric information, attribute information, and layer information of graphic objects in text or binary format.

[0031] Model space is a concept in DXF drawing files, typically used to represent actual geometric objects. In model space, graphic entities are drawn and stored with their actual dimensions and coordinates.

[0032] A graphic entity is the smallest unit in a DXF drawing file that represents a geometric shape or annotation, such as a line, circle, polyline, or text. Each graphic entity has its own geometric data and attribute data.

[0033] Target entity graphics refer to the graphic entities selected as the operation objects during the processing. These graphic entities typically represent specific outlines in the fiberglass cutting drawings of wind turbine blades that require area calculation and closure verification.

[0034] The `closed` attribute, or `is_closed` attribute, is a property of a graphic entity that indicates its geometric closure state. When this attribute is true, it means that the first and last vertices of the graphic are connected, forming a closed outline; when this attribute is false, it means that the graphic has breaks and is in an unclosed state.

[0035] The first preset identifier color is a specific display color used to mark the corrected graphic after the graphic closure correction operation is completed. This color is used to visually distinguish the original closed graphic from the automatically corrected graphic.

[0036] The second preset identifier color is a specific display color used to mark abnormal graphics when an anomaly occurs during graphics processing. This color is used to quickly identify and locate graphic entities that have failed to process.

[0037] A color index value is a numerical code used in a CAD system to represent the color of a graphic entity. Different color index values ​​correspond to different display colors.

[0038] A color name is a textual description that converts a color index value into a form that is easily recognized and understood by humans, such as "red" or "blue". This name is typically used as a key value in area classification statistics.

[0039] A statistical dictionary is a data structure used to store and manage data organized in key-value pairs. In this embodiment, the keys are color names, and the values ​​are the cumulative areas of the corresponding colored graphics.

[0040] A text processing report is a document automatically generated by the system after the entire processing workflow is completed. It contains processing results, statistical data, and anomaly records. This report provides an overview and detailed information about the processing process.

[0041] In this embodiment, the processing method runs on a data processing device with storage and data processing capabilities. It operates on CAD drawing files through a programming interface. Furthermore, this embodiment implements the processing method using Python. Before the processing method begins execution, the system environment needs to be initialized and key operating parameters preset. This process is achieved by defining a set of global configuration constants and mapping relationships, establishing unified execution rules and judgment criteria for all subsequent processing steps. Specific configuration content includes:

[0042] 1. Definition of color identifiers for graphic processing status: To intuitively distinguish different states of graphics during processing, two key color identifiers are preset, namely the first preset marker color and the second preset marker color.

[0043] 2. Definition of Dedicated Layer: Defines a dedicated layer name (e.g., "CAD_Error_Marks") for centralized management of error graphics, which is the error mark layer. All error entities marked with the second preset identifier color will be moved to this independent layer, achieving isolation and standardized management of error graphics.

[0044] 3. List of Supported Graphical Entity Types: This section explicitly lists the types of CAD graphic entities that this method can recognize and process. The list includes at least: lightweight polylines, traditional polylines, circles, ellipses, hatch patterns, splines, and regions. This configuration limits the scope of the method, ensuring that only relevant entities are processed, thus improving execution efficiency.

[0045] 4. Drawing Unit System Conversion Factor Mapping: Establish a mapping relationship between drawing unit identifiers and area conversion factors. Based on common unit system identifiers in CAD file header information, such as 0 representing imperial units and 1 representing metric units, preset corresponding area conversion factors, such as the factor for converting imperial square inches to square millimeters being approximately 645.16. This configuration ensures that regardless of the unit used in the input drawing, the final calculated area value can be uniformly converted to standard units of measurement.

[0046] 5. Precision Parameter Settings for Complex Graphics Processing: For complex entities such as spline curves whose area cannot be directly calculated, sampling precision parameters for area approximation calculations are defined, such as SPLINE_SAMPLE_COUNT=100. This parameter determines the number of vertices when discretizing the spline curve into polygons for approximate calculation, directly balancing calculation accuracy and processing speed. It is a key configuration to ensure that the area calculation results are both reasonable and efficient.

[0047] The above configuration set is loaded during the initialization phase and together constitutes the basic environment for the operation of the processing method of the present invention, ensuring the standardization, configurability and consistency of the processing process.

[0048] The following will be combined with the appendix Figure 1 The present invention further elaborates on a method for processing fiberglass sleeve cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction. This method specifically includes the following steps:

[0049] S1. File Initialization and Preprocessing: Read the original DXF drawing file of the wind turbine blade fiberglass overlay, parse the file header information, and obtain the unit system identifier corresponding to the original DXF drawing file; simultaneously, create another DXF drawing file as a container for the processing results, and create an error marker layer in the processing results container; specifically, first create the main processing class CADProcessor (i.e., the CAD file processing library). In its initialization method, use ezdxf.readfile() to read the user-specified original DXF file. Obtain the unit system (0 for imperial, 1 for metric) by accessing the document header variable $MEASUREMENT. Then, use ezdxf.new() to create a new DXF document with the same version as the original file as the processing results container. Call newdocument.layers.new(ERROR_LAYER_NAME, dxfattribs={'color': COLOR_ERROR}) to create the error marker layer.

[0050] By initializing and preprocessing the fiberglass cutting drawings of wind turbine blades, the system automates the reading of original DXF drawing files and the parsing of key information. This provides a unified and standardized data foundation for subsequent graphic entity processing, closure verification, area calculation, and error marking. This method effectively solves the problems of time-consuming file preparation and inaccurate information acquisition in traditional manual processing, significantly improving the automation level and data consistency of drawing processing, and laying a solid foundation for subsequent accurate calculations and quality control.

[0051] S2. Graphical Entity Traversal and Filtering: This step involves traversing all graphic entities in the model space corresponding to the original DXF drawing file, and then filtering these entities to obtain the target entity graphics. Specifically, traversing all graphic entities in the model space corresponding to the original DXF drawing file means that the system uses a professional DXF file parsing library or API to access the internal structure of the loaded DXF drawing file and read each graphic entity contained in its model space one by one. The model space usually carries the core geometric information of the design drawings. Through traversal, it can be ensured that all potential geometric elements constituting the fiberglass overlay drawings of wind turbine blades are taken into consideration. Based on this, filtering all graphic entities to obtain the target entity graphics means that, according to preset rules and conditions, the geometric graphics representing the fiberglass overlay outline of the wind turbine blades are identified and extracted from all the traversed graphic entities. These target entity graphics are usually closed or unclosed shapes with clear geometric boundaries that can be used for area calculation, such as lightweight polylines, traditional polylines, circles, ellipses, spline curves, regions, or filled patterns. The filtering process can be based on entity type (such as `LWPOLYLINE`, `CIRCLE`, etc.), layer information, color attributes, or other geometric features. For example, it can be set to process only entities on specific layers or only entities of specific geometric types, thereby effectively excluding entities unrelated to the overlay contour, such as text, annotations, auxiliary lines, and non-geometric blocks, ensuring the focus and efficiency of subsequent processing. In this embodiment, the filtering of graphic entities is based on a predefined list of supported entity types, which includes at least: lightweight polylines, traditional polylines, circles, ellipses, splines, regions, and fill patterns. Through the above technical solution, after completing file initialization and preprocessing, this method can efficiently and accurately identify and extract the graphic entities that truly need to be processed from complex original DXF drawing files. This traversal and filtering mechanism avoids time-consuming operations such as subsequent closure checks and area calculations for irrelevant graphic entities, significantly improving the efficiency and resource utilization of the overall processing flow. Meanwhile, through precise screening, it is ensured that subsequent steps only process valid geometric contours, thereby effectively avoiding errors or inaccurate data introduced by processing non-target entities. This greatly improves the accuracy and reliability of the processing results of the fiberglass cutting drawings for wind turbine blades, laying a solid foundation for subsequent closure correction and area statistics.

[0052] S3. Graphic Closure Verification and Automatic Correction: For each selected target entity graphic (including lightweight polylines and traditional polylines), a closure judgment and correction sub-process is performed. The specific process is as follows:

[0053] S3.1 Closure Status Judgment: By accessing the `closed` or `is_closed` attribute of the target entity graphic, the system determines whether it is geometrically closed. If yes, the result is directly output to step S4; otherwise, proceed to step S3.2. Specifically, for each target entity graphic selected from the original DXF drawing file, the system attempts to access its internal `closed` or `is_closed` attribute. These attributes are identifiers in the CAD graphic data structure used to indicate whether a graphic forms a complete closed boundary. For example, for a polyline entity, if its start and end points coincide, the `closed` attribute is usually true; for graphics such as circles or ellipses that are inherently closed, this attribute is also true. By reading these attributes, the closure of the graphic can be quickly and accurately determined. If the judgment result is a geometrically closed state, the graphic can directly proceed to the subsequent step S4 for processing; otherwise, if it is not geometrically closed, further correction is required.

[0054] S3.2 Automatic Closure and Marking: For target entity graphics that are not geometrically closed, the `close()` method of the polyline entity is automatically called to connect its first and last vertices to force a closed shape. Subsequently, the display color attribute of the corrected target entity graphic is changed to a first preset identifier color, and a "closure correction" operation is recorded. The corrected target entity graphic is output as the result to step S4. This step performs forced correction on target entity graphics judged to be non-geometrically closed to ensure their closure. Specifically, the system automatically identifies the first and last vertices of the non-closed shape and connects these two vertices through program logic, thereby geometrically forming a closed shape. For example, for an open polyline, the system adds a line segment from its end point to its start point to form a closed loop. After completing the closure operation, to facilitate subsequent review and traceability, the system changes the display color attribute of the corrected target entity graphic to the "first preset identifier color." This first preset identifier color can be a striking color, such as yellow, to visually distinguish the automatically corrected graphic. Simultaneously, the system will record one "closure correction" operation, which helps to count the number of corrections and provides data support for generating a processing report. The graphic processed in this step, whether originally closed or automatically corrected, will be output as the result to step S4 for subsequent area calculation.

[0055] By introducing steps for graphic closure verification and automatic correction, this application effectively solves the problem of non-closed graphic entities that may exist in the original DXF drawings. After judging the closure status of the selected target entity graphics, for those graphics that are not geometrically closed, the system can automatically connect their first and last vertices to force them into closed graphics. This correction mechanism ensures that all graphics to be processed have clear boundaries, thus providing reliable basic data for subsequent accurate calculation of graphic area and avoiding problems such as area calculation errors or inability to calculate due to non-closed graphics. At the same time, modifying the display color attribute of the corrected graphics to the "first preset identifier color" and recording the "closure correction" operation not only provides intuitive visual feedback, making it easy for users to identify and review, but also provides accurate statistical data for generating detailed processing reports, significantly improving the automation, accuracy, and traceability of drawing processing.

[0056] S4. Accurate Area Calculation of Graphics with Multiple Algorithm Adaptation: For each target entity graphic output in step S3, the corresponding matching algorithm is invoked to calculate the area and obtain the original area value. Specifically, for each target entity graphic output from step S3, its specific geometric type needs to be identified first. Then, based on the identified type, a pre-configured area calculation algorithm that precisely matches the type of graphic is dynamically invoked. Specifically, the area calculation of the target entity graphic includes:

[0057] S4.1 Calculation of area of ​​segments and polygons: If the drawing has a corresponding area attribute, the corresponding area attribute is directly called as the original area value; if there is no such attribute, the shoelace formula (i.e. Gaussian area formula) is used to calculate based on the vertex coordinates.

[0058] S4.2, Approximate Calculation of Spline Curve Area: For spline curves, a vertex approximation algorithm is used. Specifically, the spline curve is discretized into N (e.g., N=100) sequentially connected points to form an approximate polygon. The area of ​​this approximate polygon is then calculated using the shoelace formula, and output as the approximate area of ​​the spline curve.

[0059] S4.3 Calculation of Area of ​​Regular Shapes: For regular shapes such as circles, ellipses, regions, and filled patterns, if the drawing has a corresponding area attribute, the corresponding area attribute is directly called as the original area value; if there is no such attribute, the original area value is obtained by calculating using the geometric formula of the corresponding shape.

[0060] S4.4 Unit system conversion: Based on the unit system identifier obtained in step S1, multiply the calculated original area value by the corresponding conversion factor to obtain the actual area value expressed in standard units (such as square millimeters).

[0061] Through the aforementioned technical solution, this application can intelligently adapt the most accurate area calculation algorithm to the diverse graphic entities in the fiberglass cutting drawings for wind turbine blades, thereby avoiding area calculation errors caused by differences in graphic types. Simultaneously, by combining the unit system identifier of the drawings for unified unit conversion, it ensures that all calculated area values ​​are expressed in standard units, eliminating obstacles to subsequent data statistics and analysis caused by inconsistencies in the units of the original drawings. This significantly improves the accuracy of area calculation and data consistency, providing reliable basic data for subsequent material statistics, cost accounting, and cutting optimization, effectively supporting refined management and cost control in the wind turbine blade production process.

[0062] S5. Area classification statistics based on color attributes:

[0063] S5.1 Color Attribute Parsing: Obtaining the Color Index Value of the Current Graphical Entity; First, S5.1 color attribute parsing is performed to obtain the color index value of the current graphic entity. In DXF drawing files, graphic entities typically contain a color attribute, which is stored in the form of a color index value (e.g., AutoCAD Color Index, ACI). The color index value is an integer representing a specific color in a predefined color palette. Obtaining the color index value of the current graphic entity means extracting its associated color information by accessing the graphic entity's data structure. For example, when processing DXF files, this index value can be obtained by accessing the "entity.dxf.color" attribute through a specific parsing library. This step is the basis for subsequent color-based classification, ensuring accurate identification of the visual attributes of each graphic entity. If the color index value is a specific value (e.g., 256, representing "by layer"), the color attribute of the layer to which the entity belongs is traced as its final color.

[0064] S5.2 Color Mapping and Categorization Accumulation: Color index values ​​are mapped to easily readable color names, such as "red," "green," and "yellow." The actual area values ​​corresponding to each target entity graphic calculated in step S4 are accumulated into a statistical dictionary with "color name" as the key, to categorize and summarize the areas of each target entity graphic. Mapping color index values ​​to easily readable color names improves the human-computer readability of the data. Since color index values ​​are usually numbers and not intuitive, a mapping table or dictionary needs to be established to convert these numerical indices into color names that are easier for users to understand (e.g., 1 maps to "red," 2 maps to "yellow," etc.). This mapping process can be implemented using a preset color lookup table. Based on this, the actual area values ​​calculated in step S4 are accumulated into a statistical dictionary with "color name" as the key. This statistical dictionary is a data structure where each key is the mapped color name, and the corresponding value is the sum of the areas of all graphic entities under that color. When processing a graphic entity, its color name is first obtained, and then it is checked whether the color name already exists in the statistical dictionary. If the field exists, the actual area value of the current graphic entity is added to the accumulated value corresponding to the color name; if it does not exist, a new entry is created in the dictionary, and the actual area value of the current graphic entity is used as its initial value. In this way, the area of ​​all target graphic entities can be categorized and summarized according to their color attributes.

[0065] Through the above technical solution, after processing the fiberglass overlay drawings of wind turbine blades and calculating the actual area of ​​each graphic entity, the area can be further classified and statistically analyzed based on the color attributes of the graphic entities. Specifically, by parsing the color index values ​​of the graphic entities and mapping them to easily readable color names, the originally abstract numerical color information becomes intuitive. Subsequently, the areas of graphic entities with the same color name are summed and aggregated to form a statistical dictionary with color names as keys. This allows users to clearly understand the area distribution of fiberglass materials of different colors (usually representing different material types or functional areas) in the entire overlay drawing, thereby greatly improving the efficiency and accuracy of data analysis. For example, the total area of ​​a specific color (representing a specific fiberglass layer) can be quickly obtained, providing accurate data support for material procurement, cost estimation, and production planning, avoiding the tediousness and potential errors of manual statistics, and significantly enhancing the practical value and decision support capabilities of the drawing processing results.

[0066] S6. Error Handling and Graphical Marking: If any processing exception occurs in the target entity graphic during steps S2-S6, the corresponding target entity graphic will be directly output to the error marking layer of the processing result container, and its corresponding display color will be changed to a second preset identifier color, such as red, for prominent indication in the output drawing. Specifically, a "processing exception" refers to a situation where a specific target entity graphic fails to complete the processing according to the expected logic or calculation rules during any of the above processing steps. This may include, but is not limited to: corrupted graphic data structure leading to unparsing, geometric calculation failure (e.g., division by zero error or invalid geometry in area calculation), attribute access error, memory overflow, or encountering an unrecognized graphic type in a specific algorithm. Exception detection can be achieved by introducing an error capture mechanism in each processing step, such as using a try-catch block provided by a programming language. When an operation throws an exception, the system will capture the exception and mark it as a "processing exception." Alternatively, the existence of an exception can be determined by validating the validity of key processing results; for example, if the area calculation result is negative or NaN (not a number), it can be considered an exception. When a processing error is detected in a target entity graphic, the system directly outputs it to the error marker layer of the processing result container. In the file initialization and preprocessing (S1) step, one or more special layers are pre-created in the processing result container specifically for storing abnormal graphics; these layers are called "error marker layers." When a processing error is detected in a target entity graphic, the program no longer outputs it to the normal processing result layer, but instead writes its geometric data (or a copy thereof) directly into this "error marker layer." This can be achieved using APIs provided by the DXF file manipulation library, for example, by adding the entity to a specified layer and ensuring that the layer is visible in the final saved DXF file. This is to ensure that all failed-to-process graphic entities are not overlooked, but are specifically isolated and recorded for subsequent manual review and troubleshooting. Simultaneously, to provide intuitive visual feedback, the system modifies the display color of the abnormal graphic to a second preset identifier color. The second preset identifier color can be a striking color not commonly used in normal processing results, such as bright red or magenta. When an abnormal graphic is output to the error marker layer, its color attribute (such as the "color" attribute in a DXF entity) is modified by the program to this preset color value. Thus, when a user opens the processed DXF file in CAD software, all abnormal graphics will be displayed in this special color, creating a sharp contrast with normally processed graphics, thereby improving the efficiency of problem localization.

[0067] Through the above technical solution, this application introduces a dedicated error handling and graphic marking mechanism, solving the problem of incomplete or untraceable data caused by abnormal situations that may occur during the processing of complex drawings. When any target entity graphic encounters an anomaly in any step of traversal, closure correction, area calculation, or color classification statistics, the system can promptly capture and specially process it. Specifically, abnormal graphics are not simply discarded, but are directed to a preset error marking layer in the processing result container, and their display color is changed to a second preset identifier color for prominent identification. This processing method allows users to clearly identify all unprocessed graphic entities and their locations when viewing the final processing results, greatly improving the efficiency and accuracy of problem troubleshooting. At the same time, isolating abnormal graphics in a dedicated layer avoids their interference with normal statistical results, ensuring the reliability and integrity of the final area classification statistics, thereby improving the robustness of the entire drawing processing method and the user experience.

[0068] S7. Result Output and Report Generation: Output all processed target entity graphics (including corrected closed graphics, unmodified graphics, and error-marked graphics) to the processing result container and save it, while simultaneously generating a text processing report. The text processing report should include at least an area summary list, drawing unit system, statistics on the number of closure correction operations, and an error log summary. Specifically, this step involves outputting all processed target entity graphics to the processing result container and saving it, while simultaneously generating a text processing report. Outputting all processed target entity graphics to the processing result container and saving it ensures that all graphic entities that have undergone geometric correction, area calculation, and color classification can be persistently stored in standard DXF format. This is typically achieved by calling the programming interface of the CAD software or a specific DXF file processing library to write the processed graphic entity objects in memory (including their geometric information, corrected color attributes such as the first preset identifier color, and the second preset identifier color for error marks) to the DXF drawing file (i.e., the processing result container) created in step S1, and finally saving it as a new DXF file. Generating a text processing report provides a structured and easy-to-understand summary, containing key information and statistics about the processing process. This report can integrate the area classification statistics obtained in step S5, the number of closure correction operations recorded in step S3, the error log summary recorded in step S6, and the drawing unit system identifier obtained in step S1. This information can be written into a separate text file (e.g., TXT, CSV, or PDF format) according to a preset template format for easy viewing and analysis by users.

[0069] The above technical solution ensures that all graphic entities that have undergone geometric correction, area calculation, and color classification can be persistently stored in standard DXF format. This allows users to intuitively review the processing results in the CAD environment, verify the correction effects, and directly use them in subsequent production processes. Simultaneously, a text processing report is generated, presenting key information such as the area summary list, drawing unit system, statistics on the number of closure correction operations, and error log summaries in a structured format, greatly improving the readability and usability of the processing results. This allows users to quickly grasp the overall processing status and key data of the drawings without needing to deeply understand the internal processing logic, effectively supporting subsequent decision-making and production processes, and significantly improving the overall efficiency and data value of wind turbine blade fiberglass overlay drawing processing.

[0070] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0071] The above descriptions are merely embodiments of the present invention. Commonly known structures and characteristics are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A wind turbine blade glass fiber cutting template processing method based on graphical color classification and automatic closure correction, characterized in that, Includes the following steps: S1. File Initialization and Preprocessing: Read the original DXF drawing file of the fiberglass cutting of the wind turbine blade, parse the file header information, and obtain the unit system identifier corresponding to the original DXF drawing file; at the same time, create another DXF drawing file as a container for the processing results, and create an error mark layer in the processing results container; S2. Graphic Entity Traversal and Filtering: Traverse all graphic entities in the model space corresponding to the original DXF drawing file, and then filter all graphic entities to obtain the target entity graphic. S3. Graphic Closure Verification and Automatic Correction: For each selected target entity graphic, a closure judgment and correction sub-process is executed. The specific process is as follows: S3.1 Closure State Judgment: By accessing the closed attribute of the target entity graphic, determine whether it is in a geometrically closed state. If yes, output it directly as the result to step S4; otherwise, proceed to step S3.

2. S3.2 Automatic Closure and Marking: For target entity graphics that are not geometrically closed, connect their first and last vertices to force them to form a closed shape; Subsequently, the target entity graphic display color attribute was modified to the first preset identifier color, and a "closure correction" operation was recorded. The corrected target entity graphic is output as the result to step S4; S4. Accurate calculation of graphic area with multiple algorithm adaptation: For each target entity graphic output in step S3, the corresponding matching algorithm is called to calculate the area to obtain the original area value. Based on the unit system identifier obtained in step S1, the original area value is converted to a unit to obtain the actual area value expressed in standard units. S5. Area classification statistics based on color attributes: S5.1 Color Attribute Parsing: Retrieves the color index value of the current graphic entity; S5.2 Color Mapping and Category Accumulation: Maps color index values ​​to easily readable color names; The actual area values ​​calculated in step S4 are then added to a statistical dictionary with "color name" as the key to classify and summarize the area of ​​each target entity graphic. S6. Error handling and graphic marking: If the target entity graphic in steps S2-S6 experiences a processing error, the corresponding target entity graphic is directly output to the error marking layer of the processing result container, and its corresponding display color is modified to the second preset identifier color. S7. Output Results and Report Generation: Output all processed target entity graphics to the processing result container and save them, while generating a text processing report.

2. The method for processing fiberglass sleeve cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction as described in claim 1, characterized in that: In step S2, the targets for filtering include at least lightweight polylines, traditional polylines, circles, ellipses, spline curves, regions, and filled patterns.

3. The method for processing fiberglass sleeve cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction as described in claim 1, characterized in that: In step S4, the area calculation of the target entity graphic includes: S4.1 Calculation of area of ​​segments and polygons: If the drawing has a corresponding area attribute, the corresponding area attribute is directly called as the original area value; if there is no such attribute, the shoelace formula is used to calculate based on the vertex coordinates. S4.2, Approximate calculation of spline curve area: Calculate the area of ​​the corresponding spline curve using the vertex approximation algorithm. S4.3 Calculation of area of ​​regular graphics: If the drawing has a corresponding area attribute, the corresponding area attribute is directly called as the original area value; if there is no such attribute, the original area value is obtained by calculating using the geometric formula of the corresponding graphic.

4. The method for processing fiberglass sleeve cutting drawings for wind turbine blades based on graphic color classification and automatic closure correction as described in claim 1, characterized in that: The text processing report shall include at least an area summary list, a drawing unit system, a number of closure correction operations, and an error log summary.