Automatic template generation method and system based on UG software

By capturing sketch operation event streams in real time, dynamically mapping design features to the process rule library, and building parameter-rule binding and dual-channel instruction sets, we solve the problems of traditional CAD systems such as the need to repeatedly adjust the rule library after design changes, the lack of real-time geometric interference detection and automatic correction mechanisms, low model transmission and rendering efficiency, difficulty in cross-platform adaptation, and reliance on manual updating of the rule library, thereby achieving efficient and intelligent automated template generation.

CN120805511APending Publication Date: 2025-10-17河北鑫泰轴承锻造有限公司
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202511289257.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional CAD systems have problems in automated template generation, such as the need to repeatedly adjust the rule library after design changes, lack of real-time geometric interference detection and automatic correction mechanism, low model transmission and rendering efficiency, difficulty in cross-platform adaptation, and reliance on manual experience for updating the process rule library.

Method used

By capturing sketch operation event streams in real time, dynamically mapping design features to the process rule library, building parameter-rule binding and dual-channel instruction sets, and combining multi-level logic verification mechanisms to detect conflicts, generating zero-conflict BREP boundary models, and optimizing the process rule library, we can achieve cross-platform manufacturing package generation and continuous optimization cycles.

Benefits of technology

It improves the efficiency of design and manufacturing collaboration, ensures design compliance and process accuracy, solves the problems of rule binding lag, inefficient conflict detection, difficulty in cross-platform adaptation and static rule base in traditional technologies, and realizes efficient and intelligent automatic template generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805511A_ABST
    Figure CN120805511A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent manufacturing and automatic design optimization, and discloses an automatic template generation method and system based on UG software, and the method comprises the steps: capturing a sketch operation event flow, carrying out the deep binding of geometric parameters and tolerance rules, generating a technology enhancement parameter set, and constructing a dual-channel instruction set; synchronously generating a two-dimensional engineering drawing projection and a three-dimensional expansion drawing preview; detecting conflicts in real time, and calling an exception correction plan library for dynamic correction; generating a zero-conflict BREP boundary model and a correction track log, and establishing a log-plan library mapping relation; generating an enhanced BERP model through a template drawing optimization mechanism; further generating a processing path instruction set, and integrating the processing path instruction set into a process compliance template drawing package; generating a cross-platform manufacturing package; constructing a quality index set, and generating an abnormal event association graph; and calculating a rule parameter adjustment amount, dynamically updating the process rule base, generating a global strategy packet, and reversely injecting sketch parameter constraints to form a continuous optimization cycle.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent manufacturing and automated design optimization, and more particularly, to an automated template generation method and system based on UG software. BACKGROUND

[0002] With the increasing demand for design and manufacturing collaboration efficiency in intelligent manufacturing, traditional CAD systems based on UG and the like face multiple challenges in the field of automated template generation. In the traditional design process, the binding of process rules and design parameters relies on manual verification, resulting in the need to repeatedly adjust the rule library after design changes, which is inefficient and prone to conflicts. In the context of complex curved surface modeling and high-precision tolerance control, traditional methods lack real-time geometric interference detection and automatic correction mechanisms, resulting in delayed design conflict discovery and prolonged production cycle. In addition, 3D models generally have large volume and slow loading in the process of cross-platform transmission and rendering, which restricts the realization of lightweight preview and real-time interaction experience.

[0003] Current automated template generation technology has significant limitations: in terms of parameter and rule binding, the traditional static mapping mechanism cannot dynamically respond to design changes, resulting in frequent process rule conflicts (such as tolerance overshoot and constraint fracture), and lacks the ability to automatically trigger alternative solution strategies; in terms of multi-modal data processing, the independent analysis mode of images, 3D models and text breaks the contextual association of process rules, making it difficult to achieve accurate defect detection and rule matching through joint reasoning. Resource scheduling and lightweight capabilities also face bottlenecks, resulting in high loading delay of preview models and insufficient interaction smoothness. And the existing system lacks a closed-loop optimization mechanism, the process rule library update relies on manual experience, and cannot be adjusted adaptively based on production feedback data (such as three-coordinate detection reports and material consumption rates), resulting in a disconnect between the rule library and actual manufacturing needs, limiting long-term stability and scalability. SUMMARY

[0004] In order to overcome the above-mentioned defects of the prior art, in order to achieve the above-mentioned purposes, the present application provides the following technical scheme: an automated template generation method based on UG software, comprising: S1: Real-time capture of sketch operation event stream, map design features to process rule library through product type identifier; execute parameter-rule dynamic mapping, deeply bind geometric parameters and tolerance rules in process rule library, trigger alternative solution strategy when parameter out-of-range is detected; generate process enhancement parameter set, construct topological binding instruction set and dual-channel instruction set of abnormal correction preplan library; S2: Based on the process enhancement parameter set and the double-channel instruction set, drive the UG modeling engine to synchronously generate two-dimensional engineering drawing projection and three-dimensional development drawing preview; through multi-level logical consistency verification mechanism, real-time detection of conflicts, calling of abnormal correction contingency library for dynamic correction; based on GPU accelerated rendering engine, generating zero conflict BREP boundary model and XML format correction trajectory log, and establishing log-preplan library mapping relationship through correction trajectory log and abnormal correction contingency library; S3: Based on the zero conflict BREP boundary model, generating enhanced BREP model through template drawing optimization mechanism; further generating machining path instruction set, and integrating into process-compliant template drawing package; through multi-format conversion, combining with equipment-specific NC program and process card, generating cross-platform manufacturing package; S4: Based on the production feedback of the cross-platform manufacturing package, constructing quality index set, and generating abnormal event correlation graph through abnormal threshold determination; calculating rule parameter adjustment amount to dynamically update process rule library, generating global strategy package and reversely injecting sketch parameter constraints, verifying quality index improvement amplitude, and then forming a continuous optimization cycle.

[0005] Further, the way of mapping the design features to the process rule library through the product type identifier includes: Real-time monitoring and capturing user operation events in UG sketch through UG / Open API; Converting the captured operation events into operation event stream containing event type and parameter details; Defining design features, including geometric features, constraint features and user input labels, and then extracting corresponding design features from the operation event stream; Matching the extracted design features with the process rule library of ISO standard through the product type identifier to obtain product type identification result and corresponding associated process rule.

[0006] Further, the way of performing parameter-rule dynamic mapping, binding geometric parameters with tolerance rules in the process rule library, and triggering alternative strategy when detecting parameter out-of-bound includes: According to the product type identification result and the parameter details in the operation event stream, extracting design parameters related to the current product type, and dividing the design parameters into geometric parameters and constraint parameters according to geometric type and constraint type; Further converting the parameter values of geometric parameters and constraint parameters into unified units and standardizing the naming; Based on the associated process rule, dynamically binding the geometric parameters and constraint parameters after standard naming with the process rule to generate parameter-rule dynamic mapping relationship; Mapping the process rule ID in the process rule library with the preset alternative strategy of process adjustment to form preplan library entries, and then integrating to form abnormal correction contingency library; According to the allowable range of the process rule bound in the parameter-rule dynamic mapping relationship, the change of the design parameter is monitored in real time, and when the design parameter is modified, whether the parameter value of the new design parameter conforms to the allowable range is checked through the process rule library; If it conforms to the allowable range, the parameter value in the parameter-rule dynamic mapping relationship and the bound process rule are dynamically updated; If it does not conform to the allowable range, it is determined that the parameter is out of range, and the alternative scheme strategy in the exception correction plan library is called.

[0007] Further, the way of generating the process enhancement parameter set, constructing the double-channel instruction set of the topology binding instruction set and the exception correction plan library includes: Define standard constraints, user constraints and dynamically generated constraints, and integrate them to form a constraint relationship matrix; Further, the constraint relationship matrix is converted into a topology binding instruction set; and the topology binding instruction set is bound with the geometric parameter to form a constraint chain; Integrate the geometric parameter, the process rule bound in the parameter-rule dynamic mapping relationship and the allowable range of the process rule to form a process parameter set, and write the constraint chain and the topology binding instruction set as fields into the process parameter set to form a process enhancement parameter set; The topology binding instruction set is extracted from the process enhancement parameter set, and the double-channel instruction set is formed in combination with the exception correction plan library.

[0008] Further, the way of real-time detecting conflicts through the multi-level logic consistency verification mechanism and dynamically correcting by calling the exception correction plan library includes: Based on the process enhancement parameter set and the double-channel instruction set, the double-channel instruction set is used to drive the UG modeling engine to synchronously generate a two-dimensional engineering drawing projection and a three-dimensional development drawing preview interface; The multi-level logic consistency verification mechanism is defined as real-time detection of design conflicts through geometric interference checking, process rule compliance verification and constraint chain integrity checking; The geometric interference checking is defined as checking the interference conditions between a plurality of entities in parallel through the double-channel instruction set, and if interference between the entities is detected, a geometric interference conflict is triggered; The process rule compliance verification is defined as verifying in parallel whether the parameter value of the design parameter conforms to the allowable range, and if there is a parameter value that does not conform to the allowable range, a parameter out-of-range conflict is triggered; The constraint chain integrity checking is defined as analyzing the constraint chain in parallel through the double-channel instruction set to identify whether there are broken or conflicting constraints, and if there are, a constraint chain breakage conflict is triggered; If the geometric interference conflict, the parameter out-of-range conflict or the constraint chain conflict is triggered, a rule ID is matched from the exception correction plan library, and the corresponding alternative scheme strategy is called and executed.

[0009] Further, the establishment method of the log-preparation library mapping relationship comprises: Based on the GPU accelerated rendering engine, geometric features are extracted from the UG three-dimensional model and converted into vector data that can be processed by the GPU. The GPU parallel computing is used to complete the triangular meshing of complex surfaces, and the geometric interference check is performed in parallel in the GPU memory, and then the zero conflict BREP boundary model is generated; The design parameter change record, the alternative strategy corresponding to the process rule adjustment, the associated rule ID and the corresponding timestamp are integrated to generate a corrected trajectory log; The rule ID in the corrected trajectory log is mapped to the preparation library entry of the abnormal correction preparation library to form a log-preparation library mapping relationship.

[0010] Further, the generation method of the process compliance template package comprises: Based on the zero conflict BREP boundary model, the template optimization mechanism is defined as generating an accurate template by process rule injection and intelligent error correction; The process rule injection is defined as converting the process rule in the parameter-rule dynamic mapping relationship into a visual workpiece feature, adding it to the zero conflict BREP boundary model, and performing automatic dimension and tolerance labeling to obtain an enhanced BREP model; Further, the machining feature recognition is used to generate a machining path instruction set and associate it with the enhanced BREP model; Intelligent error correction is defined as calculating the geometric similarity index of the sketch and the two-dimensional engineering drawing generated by the enhanced BREP model according to the sketch drawn by the user combined with the two-dimensional engineering drawing generated by the enhanced BREP model; Based on the geometric similarity index, the sketch is judged and corrected by a preset similarity threshold; If the geometric similarity index is less than the similarity threshold, it is determined that there is a conflict, a conflict alarm is triggered, and the sketch is geometrically corrected to obtain a corrected sketch; If the similarity index is greater than or equal to the similarity threshold, it is determined that the sketch does not need to be corrected; The judged and corrected sketch is synchronized to the enhanced BREP model to obtain a corrected enhanced BREP model; Based on the corrected enhanced BREP model and the machining path instruction set, the tolerance labeling and machining path in the enhanced BREP model are packaged into a unified data structure to generate a structured template data; At the same time, the enhanced BREP model is subjected to lightweight model optimization processing to generate a lightweight three-dimensional preview model; Synchronize the parameter-rule mapping relationship to process metadata; Integrate structured sample drawing data, lightweight three-dimensional preview model and process metadata to form a process-compliant sample drawing package.

[0011] Further, the generation of the cross-platform manufacturing package includes: According to the process-compliant sample drawing package, analyze the user configuration and identify the platform configuration identifier of the user; According to the platform configuration identifier, load the conversion protocol template required by the corresponding platform to generate a platform adaptation context; and convert the enhanced BREP model in the process-compliant sample drawing package into a format required by the corresponding platform to generate a multi-format manufacturing file set; Based on the type of processing equipment, convert the machining path instruction set into equipment-specific NC programs, and generate process cards; Integrate and package the multi-format manufacturing file set, NC programs and process cards to generate a cross-platform manufacturing package.

[0012] Further, the formation of the continuous optimization cycle includes: Based on the production feedback data after the execution of the cross-platform manufacturing package, extract the three-coordinate detection report and material consumption data of the manufacturing link, and then analyze the deviation vector and material consumption rate to construct a quality index set; Set the abnormal threshold of the deviation vector and the material consumption rate, and define the values in the quality index set that are greater than the abnormal threshold as abnormal index features; Further, the abnormal index features are used as deviation event nodes, the process rules in the process rule library are used as rule nodes, and the association between the deviation event nodes and the rule nodes is established to form an abnormal association graph; Root cause positioning analysis is performed on the abnormal association graph to identify key failure rule nodes and obtain root cause rule IDs and influence factors; Calculate the rule parameter adjustment amount according to the root cause rule ID and the influence factor, and then update the specific parameter values in the process rule library; Integrate the update results of the process rule library and the historical optimization records to generate a global strategy package, and then write the parameter update instructions in the global strategy package into the process rule library to update the sketch parameter constraints synchronously; Combine the global strategy package and the new production feedback data after the update, compare the production feedback data before and after the update, obtain the quality index improvement amplitude, and then verify the effectiveness of the updated process rule library to form a continuous optimization cycle.

[0013] Further, an automatic sample generation system based on UG software includes: Sketch feature binding and mapping unit: real-time capture sketch operation event stream, map design features to process rule library through product type identifier; perform parameter-rule dynamic mapping, bind geometric parameters with tolerance rules in process rule library, trigger alternative solution strategy when parameter out-of-bound is detected; generate process enhancement parameter set, build topology binding instruction set and dual-channel instruction set of exception correction plan library; Template drawing generation and correction unit: based on process enhancement parameter set and dual-channel instruction set, drive UG modeling engine to synchronously generate two-dimensional engineering drawing projection and three-dimensional development drawing preview; real-time detect conflicts through multi-level logical consistency verification mechanism, dynamically correct by calling exception correction plan library; generate zero-conflict BREP boundary model and XML format correction trajectory log based on GPU accelerated rendering engine, and establish log-plan library mapping relationship through correction trajectory log and exception correction plan library; Template drawing optimization and multi-modal conversion unit: based on zero-conflict BREP boundary model, generate enhanced BREP model through template drawing optimization mechanism; further generate machining path instruction set, and integrate into process compliant template drawing package; through multi-format conversion, generate cross-platform manufacturing package combined with equipment-specific NC program and process card; Closed-loop self-optimization unit: based on production feedback of cross-platform manufacturing package, build quality indicator set, and generate exception event correlation graph through exception threshold determination; calculate rule parameter adjustment amount to dynamically update process rule library, generate global strategy package and inject back to sketch parameter constraint, verify quality indicator improvement amplitude, and then form a continuous optimization cycle.

[0014] The technical effects and advantages of the automatic template generation method and system based on UG software of the present application are as follows: The present application realizes automatic triggering and alternative solution execution of process rules when design changes by real-time capturing UG sketch operation event stream, dynamically mapping design features to process rule library, and constructing parameter-rule binding and dual-channel instruction set (topology binding and correction plan); Secondly, based on multi-level logical verification mechanism (geometric interference, rule compliance, constraint chain verification), real-time detect conflicts, generate zero-conflict BREP model and correction log based on GPU acceleration, and ensure design compliance and correction traceability; Then, generate enhanced BREP model through process rule injection and intelligent error correction, encapsulate machining path as structured template drawing data, and adapt to multi-platform format to generate cross-platform manufacturing package, ensuring process precision and compatibility; Next, based on production feedback data, build quality indicator set, locate root cause rules through exception correlation graph, dynamically update process rule library and inject back to sketch constraint, form a closed-loop self-optimization cycle, and realize continuous iteration of rule library; Finally, by integrating historical data and real-time feedback through the global strategy package, the effectiveness of the rules is verified and the system performance is improved, solving the problems of rule binding lag, inefficient conflict detection, cross-platform adaptation difficulties and static rule base in traditional technologies, significantly improving design efficiency, manufacturing accuracy and system scalability, and providing end-to-end automation solutions for intelligent manufacturing. It solves the pain points of existing technologies such as disconnection between design and process, multimodal data islands, insufficient real-time performance and reliance on manual rule base updates, and has the significant advantages of high efficiency, intelligence and sustainability. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 Schematic diagram of an automatic template generation method based on UG software of the present invention; Figure 2 A schematic diagram of the process of sketch feature binding and mapping in an automatic template generation method based on UG software of the present invention; Figure 3 The figure is a schematic diagram of an automatic template generation system based on UG software of the present invention. DETAILED DESCRIPTION

[0016] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0017] Example 1 See also Figure 1 and Figure 2 As shown, the automatic template generation method based on UG software described in this embodiment includes: S1: Capture sketch operation event streams in real time and map design features to a process rule library using a product type identifier (the identifier uses a rule-matching algorithm (e.g., decision tree) or a machine learning model (e.g., lightweight CNN) to map features to ISO standard process rules (e.g., ISO 492)). Perform dynamic parameter-rule mapping to deeply bind geometric parameters to tolerance rules in the process rule library, triggering alternative solution strategies when parameter out-of-bounds is detected. Generate a process enhancement parameter set and construct a dual-channel instruction set consisting of a topology binding instruction set and an abnormality correction plan library. S2: Based on the process enhancement parameter set and the double-channel instruction set, drive the UG modeling engine to synchronously generate two-dimensional engineering drawing projections and three-dimensional development map previews; real-time detect conflicts through a multi-level logical consistency verification mechanism, and dynamically correct by calling the exception correction plan library; generate zero-conflict BREP boundary models and XML format correction trajectory logs based on GPU accelerated rendering engines, and establish a log-plan library mapping relationship through the correction trajectory log and the exception correction plan library; S3: Based on the zero-conflict BREP boundary model, generate an enhanced BREP model through a template drawing optimization mechanism; then generate a machining path instruction set and integrate it into a process-compliant template drawing package; through multi-format conversion, combine with device-specific NC programs and process cards to generate a cross-platform manufacturing package; Generate accurate template drawings through a template drawing optimization mechanism, perform multi-format adaptive export, dynamically match target platform requirements through an interface adaptation layer; embed the instruction channel of one-key direct numerical control equipment to generate a cross-platform manufacturing package; S4: Based on the production feedback of the cross-platform manufacturing package, construct a quality indicator set, and generate an abnormal event correlation graph through abnormal threshold determination; calculate the rule parameter adjustment amount to dynamically update the process rule library, generate a global strategy package and inject it back into the sketch parameter constraint, verify the quality indicator improvement amplitude, and then form a continuous optimization cycle.

[0018] Through UG / Open API (such as NX Pen API), real-time monitor and capture user operation events in UG sketches (such as geometry creation (drawing line segments, arcs, rectangles, polygons, etc.), feature addition (adding holes (menu→insert→design features→holes), stretching (menu→insert→design features→stretch), etc.), size modification (adjusting geometric parameters through menu→insert→size modification, etc.)); Convert the captured operation events into a structured data format containing event types (operation types (such as "hole addition", "line drawing", "size modification")) and parameter details (geometric parameters (such as hole diameter, position coordinates), constraint conditions (such as parallel, perpendicular)), as operation event streams; Define design features, including geometric features (hole distribution (counting the number of holes, position (such as symmetrical distribution), hole diameter range (such as Φ10~Φ50)), contour shape (identifying whether the contour is symmetrical (such as rectangle, circle), whether it contains chamfer / round), constraint features (user-defined geometric constraints (such as parallel, perpendicular, concentric)) and user input labels (user-specified manually input product type labels (such as "deep groove ball bearing")), and then extract the corresponding design features from the operation event stream; The extracted design features are matched with the ISO standard process rule library (such as ISO 492) through a product type identifier (the identifier uses a rule matching algorithm, such as decision tree logic, to map features to ISO standard process rules), obtaining product type identification results and corresponding associated process rules; Example matching logic: If "8 hole positions + hole diameter range 10~50mm" is detected, it is matched as "deep groove ball bearing" and associated with H7 tolerance rules (±0.01mm); If "symmetric contour + chamfer R5" is detected, it is matched as "precision shaft parts" and associated with ISO 286-G6 tolerance rules; If rule matching fails, a lightweight convolutional neural network (CNN) model can be used to classify based on historical design feature data, and new rules can be created and added to the process rule library; During the specific process rule library matching process, performance optimization and error handling are also required. Performance optimization includes event filtering and asynchronous processing, and error handling includes exception event handling and log recording; Event filtering: only capture operations related to process rules (such as hole addition, stretching features), ignore irrelevant operations (such as sketch movement); Example implementation method: traverse the workpiece, filter out target features such as sketches and holes; Asynchronous processing: separate event stream processing from the UG main process to avoid blocking user operations; Example implementation method: use multithreading technology to execute feature analysis and rule matching in a background thread; Exception event handling: if event parameters are missing (such as not specifying hole diameter), trigger user prompts (such as pop-up dialog boxes to request additional parameters); Example implementation method: display warning windows (such as through UF_UI_open_dialog); Log recording: record abnormal events and processing results for debugging and subsequent analysis; Example implementation method: write logs to files (such as model-plain-1-mm-template.prt); According to the product type identification results and parameter details in the operation event stream, extract design parameters related to the current product type (such as deep groove ball bearing focusing on hole diameter and contour width, and shaft parts focusing on cylindricity), and divide the design parameters into geometric parameters (such as hole diameter, length) and constraint parameters (such as parallelism, concentricity) according to geometric type and constraint type; Further convert the parameter values of geometric parameters and constraint parameters to a unified unit (such as millimeters) and standardize the naming; Based on the associated process rules, the geometric parameters and constraint parameters named in the specification are dynamically bound to the process rules to generate a dynamic mapping relationship between parameters and rules (in the form of a key-value pair structure, which is convenient for subsequent query and update); Example key-value pair structure: {"key":"hole_diameter","value":10.0,"tolerance_rule":"ISO492-H7","allowed_range":[9.99, 10.01]}; Map the process rule ID (such as TOL_07) in the process rule library with the preset process adjustment alternative strategy (such as "tolerance reduction" and "boring process") to form a plan library entry, and then integrate it to form an abnormal correction plan library; Example repository entry: {"rule_id": "TOL_07","strategy": "Tolerance reduction","description": "When the aperture exceeds the allowable range, the tolerance range is automatically reduced to ±0.005mm"}; Based on the allowed range of the process rules bound in the parameter-rule dynamic mapping relationship (which can be obtained through the allowed_range field in the binding relationship, such as the allowed range of [9.99, 10.01]), changes in design parameters are monitored in real time. When a design parameter is modified, the process rule library is used to check whether the parameter value of the new design parameter is within the allowed range (for example, if the parameter value is less than 9.99 or greater than 10.01, it is determined to be out of the allowed range); If it is within the allowed range, the parameter value and the bound process rule in the parameter-rule dynamic mapping relationship are dynamically updated; If it does not meet the allowed range, it is determined that the parameter is out of range, and the alternative solution strategy in the abnormal correction plan library is called (the alternative solution strategy is such as "boring instead of turning"); Record the original parameter values, process adjustment strategies, and corresponding rule IDs of out-of-bounds events to facilitate subsequent optimization of the process rule library; Set up a feedback mechanism to transmit out-of-bounds event data back to the product type identification part to optimize the matching logic between product type and process rules; It should be noted that the process rule library is used to store all ISO standard rules (such as ISO492, ISO286), and the associated process rules, that is, the rules divided by product type (such as "deep groove ball bearings" → ISO 492-H7); Through product type identification, the calling range of the process rule library can be narrowed down, and the binding efficiency can be improved. If product type identification is not performed, the global rule library is bound by default, which may lead to rule redundancy or conflict; For dynamic binding of parameters and process rules, a hash table is used for storage. For incremental updates, only the changed parameter binding relationship is updated to avoid full reconstruction. For parameter out-of-range processing mechanism, a callback function is registered to trigger alternative solution recommendation, and the out-of-range event and processing result are recorded synchronously to facilitate subsequent debugging. The following logical chain is used to achieve dynamic binding of parameters and rules: Product type identification result → rule library screening → parameter extraction → dynamic binding → out-of-range detection → alternative solution recommendation; Among them, the product type determines the calling range of the process rule library, avoiding full binding; The allowed_range field in the parameter-rule dynamic mapping relationship provides the basis for out-of-range detection; Alternative solution recommendation relies on the pre-set process adjustment strategy of the product type; Through this design, accurate binding of design parameters and process rules is achieved, and quick response is achieved when out-of-range occurs, which can ensure the compliance of the design; Define standard constraints, user constraints, and dynamically generated constraints, and integrate them to form a constraint relationship matrix. It is used to clarify the type and effect of the constraint relationship (such as "center alignment of hole and contour"); Among them, the allowed range of the process rule bound in the parameter-rule dynamic mapping relationship (for example, the ISO 492-H7 tolerance rule of hole diameter Φ10 requires an allowed range of [9.99, 10.01]) is used as a standard constraint; The "symmetry" constraint in geometric tolerance requires the center lines of two features to be aligned; The constraint feature is used as a user constraint; Example: When designing a flange, the user defines the "center alignment" constraint of the hole and the contour; In UG modeling, the user manually adds "parallelism" or "concentricity" constraints; When the parameter binding or design parameter changes, the constraints generated by the UG modeling engine according to the geometric parameter relationship are used as dynamically generated constraints; It should be noted that in actual system applications, the three types of constraints will work together to form a complete constraint relationship network: Standard constraints (process rule library) serve as the basic framework to ensure that the design complies with industry standards; User constraints serve as a supplement to meet specific design needs; Dynamic constraints are generated as a bridge to connect parameters and rules, realizing real-time response to design changes. The binding logic of constraint relationships follows the following process: Product type identification→Call standard constraints (such as ISO standard process rules); User input→Add custom constraints (such as symmetry requirements); Design parameter change→Generate dynamic constraints (such as constraint chain update); This multi-constraint coordination mechanism can ensure the accurate connection of design and process, while also considering flexibility and standardization; Then the constraint relationship matrix is converted into a topological binding instruction set (adjacency matrix + degree of freedom constraint) executable by the UG modeling engine, ensuring that the constraint relationship is updated synchronously when the design changes; and the topological binding instruction set and geometric parameters (such as aperture, profile width) are bound to form a constraint chain, which is used to describe the dependency relationship between parameters; Integrate geometric parameters, parameter-rule dynamic mapping relationship bound process rules and process rule allowed range to form process parameter set, and write constraint chain and topological binding instruction set as fields into process parameter set to form process enhanced parameter set; It should be noted that the topological binding instruction is a specific operation executable by the UG modeling engine, which is used to drive the update of the three-dimensional model, and the constraint chain is the dependency relationship between parameters, which is used for subsequent process rule matching; By writing topological binding instructions and constraint chains as fields into the parameter set, it ensures that they can directly drive process modeling (such as calling UG interface); By writing topological binding instructions into the parameter set, it can ensure that the UG modeling engine can directly call the instructions to update the model after the design parameter changes, forming a closed loop of "design→constraint→instruction→modeling"; From the process enhanced parameter set, extract the topological binding instruction set, and combine it with the exception correction plan library to form a double-channel instruction set with a double-channel mechanism, which is used to ensure that the model is updated and the process rule is dynamically adapted when the design changes; It should be noted that the topological binding instruction set can be directly extracted from the topology_binding_instruction field of the process enhanced parameter set, ensuring the consistency of design parameters and modeling instructions; The exception correction plan library relies on the allowed_range field of the process enhanced parameter set for out-of-range detection, and is associated with the process rule library through the tolerance_rule field; The double-channel instruction set has independence and collaboration, which includes: The topological binding instruction set is responsible for driving the UG modeling engine to update the three-dimensional model (such as hole alignment adjustment); The exception correction plan library is responsible for dynamically adjusting the process rules (such as recommending "boring instead of turning") when the parameters are out of bounds; The cooperative mechanism of the dual-channel is to realize the closed-loop control of design change and process adjustment by sharing the rule_id and allowed_range fields in the process enhancement parameter set; Only when the design parameters are changed, the local update of the topology binding instruction is triggered, avoiding global reconstruction; Exemplary scenarios: Input: The hole diameter Φ10.02 in the process enhancement parameter set exceeds the allowed range [9.99, 10.01] of ISO 492-H7; Output: Topology binding instruction set: driving the UG modeling engine to adjust the hole alignment relationship; Exception correction plan library: recommending "boring instead of turning", and switching the tolerance rule from H7 to H8; Based on the process enhancement parameter set and the dual-channel instruction set, according to the topology binding instruction set, through the dual-channel instruction set (i.e. according to the SIMD characteristics of the dual-channel instruction set), the binding constraint (i.e. BindConstraint) operation is performed in parallel in batches, which is used to accelerate the binding of constraint relationships; for example, the alignment relationship of multiple holes and contours is bound in batches, which can greatly improve the efficiency, and drive the UG modeling engine to generate a two-dimensional engineering drawing projection and a three-dimensional development drawing preview interface synchronously; Specifically, the geometric parameters and constraint relationships are extracted from the process enhancement parameter set, the SIMD characteristics of the dual-channel instruction set (such as Intel AVX instruction set) are used, and the parameters are loaded into the cache in parallel, reducing data reading delay; Then through the SIMD parallelization of the dual-channel instruction set, the binding constraint operation is performed in batches, that is, the constraint relationships of multiple geometric features (such as the alignment of multiple holes and contours) are bound at the same time; Further, through GPU dual-channel rendering, a two-dimensional engineering drawing projection of the front view and the top view is generated synchronously, that is, through the dual-channel parallel computing of CUDA / OpenCL, the problem of serial rendering of each view is avoided; According to the bound process rules of ISO 492-H7, etc., the developed geometric features (such as bending angle, development length) are checked, and a three-dimensional development drawing preview interface is generated to ensure compliance with manufacturing specifications; The actual operation is to enter the drawing module in UG, select a drawing template (such as A3), and use the basic view command to generate a view; When the design parameters are changed, the dual-channel instruction set updates the two-dimensional engineering drawing and the three-dimensional development drawing in parallel, thereby ensuring the synchronization of the interface; The multi-level logical consistency verification mechanism is defined as real-time detection of design conflicts through geometric interference checking, process rule compliance verification, and constraint chain integrity checking; Geometric interference checking is defined as the parallel batch verification of interference conditions between several entities through a dual-channel instruction set (using the GJK algorithm for accurate collision detection). If interference is detected between entities (such as overlapping holes and contours), a geometric interference conflict is triggered; Example: Calculate the intersection of all hole positions and contours simultaneously. If there is overlap between a hole and a contour, mark it as a geometric interference. Process rule compliance verification is defined as parallel batch verification of whether the parameter values ​​of design parameters are within the allowed range. If they are not within the allowed range, a parameter out-of-bounds conflict is triggered; Constraint chain integrity checking is defined as parsing the constraint chain (e.g., ["center_aligned", "through_all"]) in parallel using a dual-channel instruction set to identify whether there are any broken or conflicting constraints (using a depth-first search algorithm). If so, a constraint chain break conflict is triggered (e.g., failure of the "through_all" constraint). If a geometric interference conflict, parameter out-of-bounds conflict, or constraint chain conflict is triggered, the rule ID is matched from the abnormal correction plan library, and the corresponding alternative strategy is called and executed (such as "tolerance reduction" or "boring instead of turning", with an allowance of +0.3mm); Based on the principle of minimal impact, compensatory repairs (such as adjusting parameters rather than rolling back) can be prioritized. At the same time, dual-channel memory is used to accelerate the associated storage of logs and plan libraries (such as the hash table mapping of rule_id and policy ID); Example mapping: {"log_id":"CORR_001","rule_id":"TOL_07","strategy":"Tolerance reduction", "description":"When the aperture exceeds the allowable range, the tolerance range is automatically reduced to ±0.005mm"}; It should be noted that the SIMD parallel computing and GPU acceleration of the dual-channel instruction set can significantly shorten the time it takes to generate engineering drawings (for example, simultaneous rendering of front and top views). Furthermore, dual-channel memory optimization ensures that when design parameters change, engineering drawings are refreshed instantly, avoiding delays. Based on the GPU accelerated rendering engine, the geometric features are extracted from the UG 3D model and converted into vector data (such as vertex coordinates + normal vectors) that can be processed by the GPU. The GPU parallel computing (such as CUDA core, 1024 threads parallel) is used to complete the triangular meshing of complex surfaces in the UG 3D model (such as Delaunay triangulation algorithm), and at the same time, the geometric interference check is performed in parallel in the GPU memory, and then the zero conflict BREP boundary model (including two-dimensional engineering drawing (DXF data structure (such as layer / line type / tolerance annotation)) and three-dimensional preview (UG internal lightweight model (the number of patches ≤5000))) is generated. For the verification of zero conflict, the integrity of the BREP model (such as topological consistency, tolerance compliance) is verified in parallel through the double-channel instruction set. The final zero conflict BREP boundary model is saved in a standard format (such as STEP, IGES) for subsequent use. The design parameter change record, the alternative scheme strategy corresponding to the process rule adjustment, the associated rule ID and the corresponding timestamp are integrated to generate an XML format correction trajectory log. When the correction trajectory log is written, the double-channel instruction set is used for optimization. Specifically, multiple <correction>The node reduces IO delay, and when the design parameters are changed, the double-channel instruction set updates the log in parallel to ensure synchronization with the two-dimensional engineering drawing; The rule ID in the correction trajectory log is mapped to the pre-plan library entry in the abnormal correction pre-plan library to form a log-pre-plan library mapping relationship (e.g., realized through an XPath mapping mechanism); the rule ID can be associated with the pre-plan library entry to construct a correction strategy knowledge graph, and the log-pre-plan library mapping relationship is realized; The rule ID and the pre-plan entry can be mapped through the double-channel memory acceleration storage; the log-pre-plan library mapping relationship is stored in a lightweight database (such as SQLite) for subsequent query and expansion; When the log is written, the matching of the rule ID and the pre-plan library entry is verified in parallel through the double-channel instruction set according to the GPU synthesis layer verification technology; when the pre-plan library is updated, the mapping relationship is refreshed in synchronization through the double-channel instruction set; It should be noted that compared with CPU serial processing, GPU parallel computing can greatly improve the BREP model generation speed; Through this process, the whole process automation from conflict repair to result output is realized, and the data consistency and traceability are guaranteed through GPU acceleration and log mapping; Based on the zero-conflict BREP boundary model, the template drawing optimization mechanism is defined as generating an accurate template drawing through process rule injection and intelligent error correction; Process rule injection is defined as converting the process rule in the parameter-rule dynamic mapping relationship into a visual workpiece feature, adding it to the zero-conflict BREP boundary model, and automatically labeling the size tolerance to obtain an enhanced BREP model (containing tolerance labeling); Further, the machining feature recognition generates a machining path instruction set (G code, such as G01 X_Y_F8000) and associates it with the enhanced BREP model; Specifically, by calling UG / Open API functions and commands (such as the UF_VARS_get_value function), the parameter value (such as the tolerance grade of the drill hole diameter) of the process rule in the parameter-rule dynamic mapping relationship is obtained, which is denoted as a rule parameter, and the rule parameter is matched with the tolerance table in the process rule library (such as ISO 2768) to generate a visual workpiece feature (such as IT7→±0.015); The automatic dimensioning is based on the visualization requirements, and continues to call the UG / Open API functions and commands (such as UF_ANNOTATION_create_text) to add a color warning box (such as a red warning box (10±0.015)) in the two-dimensional engineering drawing; at the same time, the UG / Open API functions and commands (such as UF_ANNOTATION_set_style) are called to set the font color (such as RGB(255, 0, 0)) and the frame width (such as 2pt); The processing feature recognition is based on BREP topology analysis, and the UG / Open API functions and commands (such as UF_CURVE_get_data) are called to extract the geometric data (such as straight line profile, circular arc, hole) of the workpiece feature contour line in the enhanced BREP model, and then the processing strategy (such as laser cutting, drilling) is matched according to the geometric data, and is bound to the contour line entity, and is integrated into a processing path instruction set; An exemplary processing strategy table: [geometric feature; processing strategy; output instruction example]; [straight line profile; laser cutting; G01 X_Y_F8000]; [circular arc; circular arc interpolation; G02 / G03 I_J_K]; [Φ10-Φ50 hole; drilling; G81 X_Y_Z_R_F50]; The intelligent error correction is defined as calculating the geometric similarity index (such as through the Shapiro-Wilk shape similarity test algorithm) of the sketch and the two-dimensional engineering drawing generated according to the sketch drawn by the user combined with the two-dimensional engineering drawing generated by the enhanced BREP model; Based on the geometric similarity index, the sketch is judged and corrected through a preset similarity threshold; If the geometric similarity index is less than the similarity threshold (such as 0.05), it is determined that there is a conflict, and a conflict alarm (such as a pop-up warning box) is triggered, and the sketch is geometrically corrected (such as B-spline reconstruction, NURBS smoothing) at the same time, to obtain a corrected sketch; If the similarity index is greater than or equal to the similarity threshold, it is determined that the sketch does not need to be corrected; The judged and corrected sketch is synchronized to the enhanced BREP model (i.e. the geometric data in the judged and corrected sketch is extracted, and then embedded into the enhanced BREP model), to obtain a corrected enhanced BREP model (containing the geometric data of the corrected sketch, the dimensioning and the processing path); The geometric correction is to correct the geometric features (such as straight line segment distortion, discontinuous surface) in the sketch that do not conform to the BREP model through B-spline reconstruction, NURBS smoothing, etc.; An exemplary geometry correction, if the diameter of a hole in the sketch = 9.98 exceeds the tolerance range of IT7 (±0.015) in the enhanced BREP model (e.g., the hole diameter ∈ [9.985, 10.015]), a correction strategy (e.g., parameter rollback or B-spline reconstruction) is triggered to adjust the hole diameter in the sketch to 10.0 and update the label to 10.0 ± 0.015; Based on the corrected enhanced BREP model and the machining path instruction set, the tolerance label and the machining path in the enhanced BREP model are packaged into a unified data structure (e.g., the PatternModel structure) to generate structured sample chart data; At the same time, the enhanced BREP model is subjected to lightweight model optimization processing (i.e., the QEM simplification algorithm is executed, and the constraint condition of the number of facets ≤ 5000 and the boundary error < 0.01 mm is added), to generate a lightweight three-dimensional preview model; Simultaneously, the parameter-rule mapping relationship is converted into process metadata (i.e., XDATA in DXF format); The structured sample chart data, the lightweight three-dimensional preview model, and the process metadata are integrated to form a process-compliant sample chart package, which includes the enhanced BREP model, the machining path instruction set (G code), the lightweight three-dimensional preview model, and the process metadata; According to the process-compliant sample chart package, the user configuration is parsed, and the user's platform configuration identifier (CAM / MES / CNC) is identified; According to the platform configuration identifier, the conversion protocol template required by the corresponding platform (e.g., CAM platform: ISO 10303-21 STEP template; MES platform: OPC UA information model template; CNC platform: FANUC / Siemens postprocessor) is loaded to generate a platform adaptation context; then, through a multi-format conversion engine, the enhanced BREP model in the process-compliant sample chart package is converted into the required format for the corresponding platform to generate a multi-format manufacturing file set; When the platform is a CAM system, the enhanced BREP model is directly output as a standard DXF file through a DXF native converter, and the tolerance metadata is preserved; An exemplary operation process is: calling the UG / Open UF_DXF_export_data_t interface to convert the BREP boundary into a DXF graphic element, then embedding the XDATA process metadata to obtain a standard DXF file; At the same time, the machining path instruction set is converted into an ISO 10303-21 compatible layered assembly structure through a STEP layered converter; An exemplary operation process is: creating an AP214 protocol container, then layering according to machining features (cutting layer / drilling layer) and adding manufacturing feature entities, and finally obtaining an ISO 10303-21 standard file; When the platform is an MES system, key features and process metadata are extracted by a lightweight encapsulator to generate an OPC UA compatible JSON data package; The example operation flow is: key features (hole position / profile) are extracted and then mapped to an OPC UA node structure to generate a JSON data package; Based on the type of processing equipment, a processor is dynamically selected to convert the machining path instruction set into an equipment-specific NC program, while generating a process card describing the material, tool, and cutting parameters; Multiple format manufacturing file sets, NC programs, and process cards are integrated and encapsulated to generate a cross-platform manufacturing package; Based on the production feedback data after the execution of the cross-platform manufacturing package, three-coordinate detection reports and material consumption data of the manufacturing link are extracted, and then deviation vectors (obtained by analyzing three-coordinate detection reports, containing the maximum position deviation and average position deviation of the (X, Y, Z) three coordinates of each machining position) and material consumption rates (the ratio of the actual consumption of the material to the theoretical consumption) are analyzed to construct a quality index set (containing the maximum position deviation, average position deviation, and material consumption rate of the (X, Y, Z) three coordinates); The abnormal threshold values of the deviation vector and the material consumption rate are set, and the values in the quality index set that are greater than the abnormal threshold values are defined as abnormal index features; Then, the abnormal index features are taken as deviation event nodes, the process rules in the process rule library are taken as rule nodes, the association relationship between the deviation event nodes and the rule nodes is established, and a rule-defect abnormal association graph (i.e., a graph with confidence, and the rule-defect confidence is calculated by a similarity algorithm to obtain the corresponding similarity as the confidence) is formed using a graph database (such as a Neo4j graph database); An example rule-defect causal relationship chain is: [Quality index abnormality: X1 coordinate maximum deviation > 0.01 mm; associated rule type: tolerance rule; confidence: 0.85]; [Quality index abnormality: material consumption rate > 110%; associated rule type: allowance compensation rule; confidence: 0.92]; Root cause positioning analysis is performed on the abnormal association graph to identify key failure rule nodes to obtain root cause rule IDs and impact factors; Specifically, the rule-defect weights in the abnormal association graph and the quality index are taken as inputs, and the impact factors of the rules are output by a random forest regression algorithm; Then, the deviation events are analyzed. Specifically, when the deviation vector related abnormal index is detected, the specific tolerance rule ID in the parameter-rule dynamic mapping relationship is located; when the material consumption rate abnormal index is detected, the specific allowance compensation rule ID is located; According to the root cause rule ID and the influence factor calculation rule parameter adjustment amount (set an adjustment coefficient (such as 0.2), take the product of the adjustment coefficient, the influence factor and the measured deviation value as the rule parameter adjustment amount), update the specific parameter value in the process rule library (that is, the original parameter value of the process rule minus the rule parameter adjustment amount, to obtain the new parameter value for processing); Integrate the update result of the process rule library and the historical optimization record to generate a global strategy package with a semantic version label (specifically, first extract all changed process rules and their parameter new and old value comparison, then generate a semantic version label according to the change influence degree (major parameter change increments the main version number, optimization adjustment increments the secondary version number), and finally encapsulate the change description document, parameter effective condition and rollback configuration, form a traceable global strategy package, example: when detecting a key tolerance parameter change, generate a version v1.3.0 strategy package, which contains change list [{"rule":"TOL_IT7","old_value":10.00,"new_value":9.98}] and version description "solve aperture oversize problem" ), and then write the parameter update instruction in the global strategy package to the process rule library, and update the sketch parameter constraint synchronously; Combine the global strategy package and the new production feedback data after updating, compare the production feedback data before and after updating to get the quality index improvement amplitude (for example, the maximum position deviation, before optimization: 0.02mm→after optimization: 0.012mm→improvement amplitude: 40%), and then verify the effectiveness of updating the process rule library (take the ratio of the sum of all improvement amplitudes to the number of rule changes in the process rule library as the effectiveness index), form a continuous optimization cycle.

[0019] Example two Please refer to Figure 3 As shown in the drawings, some parts of the embodiment are not described in detail, see the description of example 1, provide an automatic template generation system based on UG software, including: Sketch feature binding and mapping unit: real-time capture sketch operation event stream, map design features to process rule library through product type identifier; execute parameter-rule dynamic mapping, deeply bind geometric parameters and tolerance rules in process rule library, trigger alternative solution strategy when parameter out-of-bound is detected; generate process enhancement parameter set, construct topological binding instruction set and dual-channel instruction set of exception correction plan library; The template drawing generation and correction unit: based on the process enhancement parameter set and the double-channel instruction set, driving the UG modeling engine to synchronously generate two-dimensional engineering drawing projection and three-dimensional development drawing preview; through a multi-level logical consistency verification mechanism, conflicts are detected in real time, and the abnormal correction plan library is called for dynamic correction; based on the GPU accelerated rendering engine, a zero conflict BREP boundary model and an XML format correction trajectory log are generated, and a log-plan library mapping relationship is established between the correction trajectory log and the abnormal correction plan library; The template drawing optimization and multi-modal conversion unit: based on the zero conflict BREP boundary model, an enhanced BREP model is generated through a template drawing optimization mechanism; then a machining path instruction set is generated, and is integrated into a process-compliant template drawing package; through multi-format conversion, combined with device-specific NC programs and process cards, a cross-platform manufacturing package is generated; The closed-loop self-optimization unit: based on the production feedback of the cross-platform manufacturing package, a quality index set is constructed, and an abnormal event correlation graph is generated through abnormal threshold determination; the rule parameter adjustment amount is calculated to dynamically update the process rule library, generate a global strategy package, and inject the sketch parameter constraint in reverse, verify the quality index improvement amplitude, and then form a continuous optimization cycle.

[0020] Embodiment three The embodiment discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the running mode of the above-provided automatic template generation method based on UG software when executing the computer program.

[0021] Since the electronic device introduced in the embodiment is the electronic device used to implement the automatic template generation method based on UG software in the embodiment, the specific implementation mode of the electronic device in the embodiment and its various forms can be understood by those skilled in the art based on the automatic template generation method based on UG software in the embodiment, so the implementation of the method in the embodiment by the electronic device will not be introduced in detail. As long as the electronic device used to implement the automatic template generation method based on UG software in the embodiment is implemented by those skilled in the art, it belongs to the scope of protection of the present application.

[0022] The above formulas are dimensionless values, and the formulas are obtained by collecting a large amount of data to simulate the most recent real situation, and the preset parameters and threshold values in the formulas are set by those skilled in the art according to the actual situation.

[0023] The above merely describes the preferred embodiments of the present application, and the protection scope of the present application is not limited to the above-described embodiments. Any technical solution falling within the concept of the present application shall fall within the protection scope of the present application. It should be noted that, for ordinary technical users in the technical field, several improvements and refinements without departing from the principle of the present application shall also be considered as falling within the protection scope of the present application.< / correction>

Claims

1. An automatic template generation method based on UG software, characterized in that: include: S1: Capture sketch operation event streams in real time and map design features to process rule libraries through product type identifiers; Perform parameter-rule dynamic mapping, deeply bind geometric parameters with tolerance rules in the process rule library, and trigger alternative solution strategies when parameter out-of-bounds is detected; Generate process enhancement parameter sets and build dual-channel instruction sets of topology binding instruction sets and abnormal correction plan libraries; S2: Based on the process enhancement parameter set and dual-channel instruction set, the UG modeling engine is driven to simultaneously generate 2D engineering drawing projections and 3D unfolded drawing previews. A multi-level logic consistency verification mechanism is used to detect conflicts in real time, and dynamic corrections are made by calling the abnormal correction plan library. A GPU-accelerated rendering engine is used to generate a zero-conflict BREP boundary model and correction trajectory log, and a log-plan library mapping relationship is established between the correction trajectory log and the abnormal correction plan library. S3: Based on the zero-conflict BREP boundary model, an enhanced BERP model is generated through a template optimization mechanism. This in turn generates a machining path instruction set and integrates it into a process-compliant template package. Through multi-format conversion, combined with equipment-specific NC programs and process cards, a cross-platform manufacturing package is generated. S4: Based on the production feedback of the cross-platform manufacturing package, a set of quality indicators is constructed, and an abnormal event correlation map is generated through abnormal threshold judgment; the adjustment amount of rule parameters is calculated to dynamically update the process rule library, generate a global strategy package and reversely inject sketch parameter constraints to verify the improvement of quality indicators, thereby forming a continuous optimization cycle.

2. The method for generating an automatic template based on UG software according to claim 1, characterized in that: The method of mapping the design features to the process rule library through the product type identifier includes: Monitor and capture user operation events in UG sketches in real time through UG / Open API; Convert captured operation events into operation event streams containing event types and parameter details; Define design features, including geometric features, constraint features, and user input labels, and then extract corresponding design features from the operation event stream; The extracted design features are matched with the ISO standard process rule library through the product type identifier to obtain the product type identification results and the corresponding associated process rules.

3. The method for generating an automatic template based on UG software according to claim 2, characterized in that: The execution parameter-rule dynamic mapping deeply binds the geometric parameters with the tolerance rules in the process rule library. When the parameter out-of-bounds is detected, the alternative solution strategy is triggered in the following ways: Extract design parameters related to the current product type based on the product type identification results and parameter details in the operation event stream, and divide the design parameters into geometric parameters and constraint parameters according to geometric type and constraint type; Then, the parameter values ​​of geometric parameters and constraint parameters are converted into unified units and named in a standardized manner; Based on the associated process rules, the geometric parameters and constraint parameters named in the specification are dynamically bound to the process rules to generate a dynamic mapping relationship between parameters and rules; Map the process rule ID in the process rule library with the preset process adjustment alternative strategy to form a plan library entry, which is then integrated to form an abnormal correction plan library; According to the allowable range of the process rules bound in the parameter-rule dynamic mapping relationship, the changes of design parameters are monitored in real time. When the design parameters are modified, the parameter values ​​of the new design parameters are checked through the process rule library to see if they meet the allowable range; If it is within the allowed range, the parameter value and the bound process rule in the parameter-rule dynamic mapping relationship are dynamically updated; If it does not meet the allowed range, it is determined that the parameter is out of bounds, and the alternative solution strategy in the abnormal correction plan library is called.

4. The method for generating an automatic template based on UG software according to claim 3, characterized in that: The method of generating a process enhancement parameter set and constructing a dual-channel instruction set of a topology binding instruction set and an abnormality correction plan library includes: Define standard constraints, user constraints, and dynamically generated constraints, and integrate them to form a constraint relationship matrix; Then, the constraint relationship matrix is ​​converted into a topology binding instruction set; and the topology binding instruction set is bound to the geometric parameters to form a constraint chain; Integrate the geometric parameters, the process rules bound in the parameter-rule dynamic mapping relationship, and the allowable range of the process rules to form a process parameter set, and write the constraint chain and topology binding instruction set as fields into the process parameter set to form a process enhancement parameter set; A topology binding instruction set is extracted from the process enhancement parameter set and combined with the abnormal correction plan library to form a dual-channel instruction set.

5. The method for generating an automatic template based on UG software according to claim 4, characterized in that: The method of detecting conflicts in real time through a multi-level logic consistency verification mechanism and calling an abnormal correction plan library for dynamic correction includes: Based on the process enhancement parameter set and dual-channel instruction set, the UG modeling engine is driven by the dual-channel instruction set to simultaneously generate the 2D engineering drawing projection and 3D unfolded drawing preview interface; The multi-level logic consistency verification mechanism is defined as real-time detection of design conflicts through geometric interference checking, process rule compliance verification, and constraint chain integrity verification; Geometric interference checking is defined as the parallel batch verification of interference conditions between several entities through a dual-channel instruction set. If interference between entities is detected, a geometric interference conflict is triggered. Process rule compliance verification is defined as parallel batch verification of whether the parameter values ​​of design parameters are within the allowed range. If they are not within the allowed range, a parameter out-of-bounds conflict is triggered; Constraint chain integrity check is defined as parsing the constraint chain in parallel through a dual-channel instruction set to identify whether there are broken or conflicting constraints. If so, a constraint chain break conflict is triggered; If a geometric interference conflict, parameter out-of-bounds conflict, or constraint chain conflict is triggered, the rule ID is matched from the exception correction plan library, and the corresponding alternative solution strategy is called and executed.

6. The method for automatically generating a template based on UG software according to claim 5, characterized in that: The log-preplan library mapping relationship is established in the following ways: Based on the GPU-accelerated rendering engine, geometric features are extracted from UG 3D models and converted into vector data that can be processed by the GPU. GPU parallel computing is used to complete the triangulation of complex surfaces. At the same time, geometric interference checks are performed in parallel in the GPU memory to generate a zero-conflict BREP boundary model. Integrate the design parameter change records, the corresponding alternative strategy for process rule adjustments, the associated rule ID, and the corresponding timestamp to generate a correction trajectory log; A mapping relationship is established between the rule ID in the correction trajectory log and the plan library entry in the abnormal correction plan library to form a log-plan library mapping relationship.

7. The method for automatically generating a template based on UG software according to claim 6, characterized in that: The generation method of the process compliance sample drawing package includes: Based on the zero-conflict BREP boundary model, the template optimization mechanism is defined to generate accurate templates through process rule injection and intelligent error correction; Process rule injection is defined as converting the process rules in the parameter-rule dynamic mapping relationship into visual workpiece features, adding them into the zero-conflict BREP boundary model, and automatically marking the dimensional tolerances to obtain an enhanced BREP model; Then, a machining path instruction set is generated through machining feature recognition and associated with the enhanced BREP model; Intelligent error correction is defined as calculating the geometric similarity index between the sketch drawn by the user and the 2D engineering drawing generated by the enhanced BREP model; Based on the geometric similarity index, the sketch is judged and corrected through the preset similarity threshold; If the geometric similarity index is less than the similarity threshold, it is determined that there is a conflict, a conflict alarm is triggered, and the sketch is geometrically corrected to obtain a corrected sketch; If the similarity index is greater than or equal to the similarity threshold, it is determined that the sketch does not need to be corrected; Synchronize the judgment and the corrected sketch into the enhanced BREP model to obtain the corrected enhanced BREP model; Based on the revised enhanced BREP model and machining path instruction set, the tolerance annotations and machining paths in the enhanced BREP model are encapsulated into a unified data structure to generate structured template drawing data; At the same time, the enhanced BREP model is optimized for lightweight modeling to generate a lightweight 3D preview model; Synchronously convert parameter-rule mapping relationship into process metadata; Integrate structured sample drawing data, lightweight 3D preview models and process metadata to form a process compliance sample drawing package.

8. The method for generating an automatic template based on UG software according to claim 7, characterized in that: The generation method of the cross-platform manufacturing package includes: Parse user configurations based on the process compliance template package and identify the user's platform configuration identifier; Based on the platform configuration identifier, the conversion protocol template required by the corresponding platform is loaded to generate the platform adaptation context. The enhanced BREP model in the process compliance template package is then converted into the format required by the corresponding platform to generate a multi-format manufacturing file set. Based on the type of processing equipment, the processing path instruction set is converted into a device-specific NC program and a process card is generated at the same time; Integrate and package multi-format manufacturing file sets, NC programs, and process cards to generate cross-platform manufacturing packages.

9. The method for automatically generating a template based on UG software according to claim 8, characterized in that: The method of forming a continuous optimization cycle includes: Based on the production feedback data after the cross-platform manufacturing package is executed, the three-coordinate inspection report and material consumption data of the manufacturing process are extracted, and then the deviation vector and material consumption rate are analyzed to construct a set of quality indicators; Set the abnormal thresholds of the deviation vector and the material consumption rate, and define the values ​​of the quality index set that are greater than the abnormal thresholds as abnormal index features; Then, the abnormal indicator characteristics are used as deviation event nodes, and the process rules in the process rule library are used as rule nodes. The association relationship between the deviation event nodes and the rule nodes is established to form an abnormal association map; Perform root cause location analysis on the abnormal correlation graph, identify key failure rule nodes, and obtain the root cause rule ID and influencing factors; Calculate the rule parameter adjustment amount based on the root cause rule ID and influencing factors, and then update the specific parameter values ​​in the process rule library; Integrate the update results of the process rule library and historical optimization records to generate a global strategy package, then write the parameter update instructions in the global strategy package into the process rule library and update the sketch parameter constraints synchronously; By combining the global strategy package with the updated production feedback data, and comparing the production feedback data before and after the update, we can obtain the improvement in quality indicators, and then verify the effectiveness of the updated process rule library, forming a continuous optimization cycle.

10. An automatic template generation system based on UG software, which is implemented based on the automatic template generation method based on UG software according to any one of claims 1 to 9, characterized in that: include: Sketch feature binding and mapping unit: captures sketch operation event streams in real time and maps design features to the process rule library through the product type identifier; Perform parameter-rule dynamic mapping, deeply bind geometric parameters with tolerance rules in the process rule library, and trigger alternative solution strategies when parameter out-of-bounds is detected; Generate process enhancement parameter sets and build dual-channel instruction sets of topology binding instruction sets and abnormal correction plan libraries; Template drawing generation and correction unit: Based on the process enhancement parameter set and dual-channel instruction set, it drives the UG modeling engine to simultaneously generate 2D engineering drawing projections and 3D unfolded drawing previews. It detects conflicts in real time through a multi-level logic consistency verification mechanism and dynamically corrects them by calling the abnormal correction plan library. It generates a zero-conflict BREP boundary model and a correction trajectory log in XML format based on the GPU-accelerated rendering engine, and establishes a log-plan library mapping relationship between the correction trajectory log and the abnormal correction plan library. Template Optimization and Multimodal Conversion Unit: Based on the zero-conflict BREP boundary model, the template optimization mechanism generates an enhanced BERP model; then generates a machining path instruction set and integrates it into a process-compliant template package; through multi-format conversion, combined with equipment-specific NC programs and process cards, a cross-platform manufacturing package is generated; Closed-loop self-optimization unit: Based on production feedback from cross-platform manufacturing packages, a quality indicator set is constructed, and an abnormal event correlation map is generated through abnormal threshold judgment. The process rule library is dynamically updated by calculating the rule parameter adjustment amount, and a global strategy package is generated and reversely injected into the sketch parameter constraints to verify the improvement of quality indicators, thereby forming a continuous optimization cycle.

Citation Information

Cited By

  • Intelligent optimization system and method for traditional Chinese medicine extraction process

    CN121031921A

  • Traditional Chinese medicine extraction process intelligent optimization system and method

    CN121031921B

  • Python-based reflector design optimization method and system and medium

    CN121389375A

  • Python-based methods, systems, and media for mirror design optimization.

    CN121389375B

  • Model-oriented geometry and three-dimensional labeling information extraction and recombination system

    CN121682931A