Wireframe anomaly detection and training-free repair method and system for boundary representation generation
Patent Information
- Application Number
- CN202611179741.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-27
AI Technical Summary
[0008]综上所述,现有学习式边界表示生成方法虽然已经在自动化CAD建模方面取得了进展,但仍然缺乏一种面向线框的异常检测与修复机制
1.本发明提出了面向多阶段边界表示生成的WDR框架。
Smart Images

Figure CN122989918A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design technology, specifically to a method and system for wireframe anomaly detection and training-free repair oriented towards boundary representation generation. Background Technology
[0002] Boundary representation generation is an important research problem in computer graphics and computer-aided design, aiming to automatically generate editable and manufacturable 3D CAD models. Boundary representation (B-rep) describes 3D solids using vertices, edges, surfaces, and their topological relationships, and is a widely used model representation method in CAD systems. Because boundary representation can completely preserve the geometric and topological information of a model, it has significant application value in engineering design, simulation analysis, and manufacturing.
[0003] In recent years, with the development of deep learning, learning-based boundary representation generation has gradually become an important direction in automated CAD modeling. Early methods were mainly based on modeling command generation, that is, first predicting the sequence of CAD modeling operations, and then recovering the final model through a modeling kernel. For example, DeepCAD and SkexGen use neural networks to generate CAD modeling command sequences. This type of method can generate models with a certain degree of editability, but it usually relies on complete modeling history data, which is relatively scarce in actual industrial scenarios.
[0004] To reduce reliance on modeling history, researchers have begun to focus on direct boundary representation generation methods, which directly generate the geometric information and topological relationships of boundary representations without predicting modeling commands. Existing direct boundary representation generation methods are mainly divided into single-stage methods and multi-stage methods.
[0005] One type of approach is the single-stage boundary representation generation method, which learns both geometric and topological information simultaneously within a unified model. For example, HoLa, AutoBrep, and BrepGPT all employ a unified representation to generate boundary representation models. This type of method can reduce the errors introduced by cascading multiple modules, but because it requires simultaneous modeling of continuous geometry and discrete topology, it is prone to problems such as complex training and difficulty in controlling structural constraints.
[0006] Another type of approach is the multi-stage boundary representation generation method, which breaks down the complex generation task into multiple sub-tasks. Typically, wireframes are generated first, followed by curve, surface, or complete boundary representation models. For example, SolidGen, BrepGen, DTGprepGen, and Stitch-A-Shape all employ a staged generation strategy. This type of method reduces modeling difficulty through task decomposition and offers good flexibility.
[0007] However, existing multi-stage methods typically focus more on the quality of the generated final boundary representation model, while paying insufficient attention to the structural validity of the wireframe. When the wireframe contains geometric or topological anomalies such as edge self-intersections, edge collapse, broken vertex connections, or incomplete loop structures, these errors propagate continuously during subsequent curve generation, surface generation, and solid construction, ultimately rendering the generated boundary representation model invalid. Therefore, effectively detecting and repairing abnormal structures within the wireframe is a crucial issue for improving the validity of the final boundary representation model.
[0008] In summary, while existing learning-based boundary representation generation methods have made progress in automated CAD modeling, they still lack an anomaly detection and repair mechanism for wireframes. Especially in multi-stage boundary representation generation pipelines, accurately detecting and effectively repairing geometric and topological anomalies in wireframes without retraining the existing large-scale generation model is a key issue in improving the structural effectiveness and generation quality of the final boundary representation model. Summary of the Invention
[0009] To address the aforementioned technical problems, this invention proposes a wireframe detection and repair (WDR) framework oriented towards boundary representation generation.
[0010] First, this invention proposes the first training-free, model-independent, plug-and-play wireframe detection and repair framework. This framework operates on wireframes in a multi-stage boundary representation generation pipeline, thereby significantly improving the effectiveness of the output boundary representation without requiring any model retraining.
[0011] Secondly, this invention proposes a Geometric-Topology Anomaly Detector (GTAD) module, which integrates a verification mechanism based on a visual language model and an energy-based evaluation mechanism, enabling reliable detection of complex geometric and topological anomalies in wireframes.
[0012] Finally, this invention develops an Energy-Guided Geometric-Topology Repair (EGGTR) module, which consists of independent geometric and topological branches and can systematically solve geometric and topological anomalies while maintaining the integrity of the overall structure.
[0013] Under the above scheme, the invention has conducted numerous experiments on various boundary representation generation tasks, and the WDR framework has achieved significant results over existing multi-stage boundary representation generation methods.
[0014] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: In a first aspect, the present invention provides a wireframe anomaly detection and training-free repair method oriented towards boundary representation generation, comprising: Obtain the intermediate wireframes output by the wireframe generator in the multi-stage boundary representation generation pipeline. The intermediate wireframes are composed of vertices and edges. Anomaly detection is performed on the intermediate wireframe using a geometric-topological anomaly detection module: coarse-grained structural risk screening is performed on the wireframe rendering image obtained from the intermediate wireframe based on a visual language model, and fine-grained geometric anomaly and topological anomaly assessment is performed based on an energy function. When an anomaly is detected, the energy-guided geometry-topology repair module is used to repair the wireframe without training: the vertex coordinates of the intermediate wireframe are adjusted by the geometric branch to repair geometric anomalies, and the connectivity of the intermediate wireframe is adjusted by the topology branch to repair topological anomalies. The repaired intermediate wireframe is input into the geometry generator to generate geometric properties, and the CAD kernel combines the repaired intermediate wireframe with the geometric properties to construct a boundary representation model.
[0015] In one embodiment, the coarse-grained structural risk screening of the wireframe rendering image obtained from the intermediate wireframe rendering based on the visual language model specifically includes: The multi-view rendering of the middle wireframe is input into the visual language model, which outputs a binary risk signal. The binary risk signal is 1 to indicate that a significant structural risk has been detected, and 0 to indicate that no such risk has been detected. If no significant structural risk has been detected, the middle wireframe is accepted directly without triggering the subsequent repair process.
[0016] In one embodiment, fine-grained geometric anomaly assessment based on an energy function specifically includes: Using discrete tangent point energy function Measuring the middle wireframe The geometric energy, of which Represents a given edge Discrete tangent point energy, Indicates the total number of sides in the middle frame; when Exceeding the preset threshold When this happens, mark the middle wireframe as a geometric anomaly.
[0017] In one embodiment, fine-grained topological anomaly assessment based on an energy function specifically includes: Calculate the topological energy function based on four constraint functions. ,in Represents vertex-edge constraints. To indicate the vertex An indicator function for determining whether the constraint of connecting at least two distinct edges and typically no more than eight edges is satisfied. Represents the total number of vertices. Indicates the middle frame; Indicates edge-loop constraints. For the set of boundary rings within the middle wireframe, For indicator ring An indicator function for whether the object contains at least three vertices and no repeating edges; Indicates a toroidal constraint. For a set of faces, For indicator surface An indicator function indicating whether it is clipped by exactly one outer ring and zero or more inner rings; Represents a face-shell constraint. An indicator function that indicates whether global connectivity constraints are satisfied; when When this occurs, the intermediate wireframe is marked as a topology anomaly. The four indicator functions take a value of 0 when the corresponding constraint is satisfied and a value of 1 when the corresponding constraint is violated.
[0018] In one embodiment, adjusting the vertex coordinates of the intermediate wireframe via geometric branches to correct geometric anomalies specifically includes: The geometric anomaly is routed to the geometric branch by minimizing the discrete tangent point energy function. This allows for adjustment of the 3D vertex coordinates of the middle wireframe, and the normalization of degenerate or conflicting edge configurations.
[0019] In one embodiment, the step of adjusting the connectivity of the intermediate wireframe through topology branches to repair topology anomalies specifically includes: Topology anomalies are routed to topology branches by minimizing the topology energy function. To re-examine the suspicious connection variables in the intermediate wireframe, reduce topology constraint violations, and restore the ring-consistent wireframe structure.
[0020] In one embodiment, the geometric-topological anomaly detection module employs a cascaded detection strategy: first, a visual language model performs a rapid global screening; if no structural risks are found, the intermediate wireframe is directly accepted; if structural risks are found, fine-grained branch attribution is performed by energy function-based geometric anomaly assessment and topological anomaly assessment, routing geometric anomalies to geometric branch repair and topological anomalies to topological branch repair.
[0021] In one embodiment, when the wireframe generator is an autoregressive generation model, the energy-guided geometry-topology repair module employs an energy-guided resampling strategy: during word-by-word generation, sampling is performed at each step. Find 10 candidate lexical units and calculate the marginal energy contribution of each candidate lexical unit. Then, select the word that minimizes the sum of the negative log-likelihood given by the pre-trained autoregressive generative model and the marginal energy contribution, where For the generated word sequence, The word to be sampled in the current step. This is a function that maps a sequence of words to corresponding intermediate wireframes. It is a differentiable energy function.
[0022] In one embodiment, when the wireframe generator is a diffusion generation model, the energy-guided geometry-topology repair module employs a training-free guidance strategy: along the reverse denoising trajectory, the energy-guided target is calculated with respect to the noise data points. and denoised clean sample estimation Gradient, update This guides the generation process to a low-energy region, where For the first Noise data points at each diffusion time step Estimated using the Tweedie formula: , Here, θ represents the noise prediction function of the pre-trained diffusion generation model. These are noise scheduling parameters.
[0023] In a second aspect, the present invention provides a wireframe anomaly detection and training-free repair system oriented towards boundary representation generation, for implementing the method of any embodiment of the first aspect, including: The wireframe acquisition module is used to acquire intermediate wireframes output by the wireframe generator in the multi-stage boundary representation generation pipeline. The intermediate wireframes are composed of vertices and edges. The anomaly detection module is used to detect anomalies in the intermediate wireframe. The anomaly detection module includes a visual detection unit and an energy detection unit. The visual detection unit performs coarse-grained structural risk screening on the wireframe rendering image obtained from the intermediate wireframe based on a visual language model. The energy detection unit performs fine-grained geometric anomaly assessment and topological anomaly assessment based on an energy function. The training-free repair module is used to repair wireframes without training when anomalies are detected. The training-free repair module includes: a geometric repair unit that adjusts the vertex coordinates of the intermediate wireframes through geometric branches to repair geometric anomalies, and a topology repair unit that adjusts the connectivity of the intermediate wireframes through topology branches to repair topology anomalies. The geometry generation module is used to input the repaired intermediate wireframe into the geometry generator to generate geometric attributes, and the CAD kernel combines the repaired intermediate wireframe with the geometric attributes to construct a boundary representation model.
[0024] The system and method in this invention correspond to each other; the specific technical solutions applicable to the method are also applicable to the system.
[0025] Compared with the prior art, the beneficial technical effects of the present invention are: 1. This invention proposes a WDR framework for multi-stage boundary representation generation.
[0026] This invention directly targets intermediate wireframes in the generation process, detecting and correcting geometric and topological anomalies before curve generation, surface generation, and solid construction, thereby reducing the propagation of errors in subsequent stages. Compared to methods that mitigate anomalies by retraining or fine-tuning existing generative models, this invention does not require updating existing model parameters and can be integrated as an independent module into different multi-stage boundary representation generation pipelines. It features training-free operation, model independence, and pluggability, solving the problems of high repair costs and difficulty in adapting to different generation architectures in existing methods.
[0027] 2. This invention proposes a geometric-topological anomaly detection module.
[0028] This module combines coarse-grained screening based on a visual language model with fine-grained geometric and topological detection based on energy functions. The visual language model is used to quickly identify obvious structural risks from multi-view wireframe renderings. The geometric detection module is used to detect spatial anomalies such as edge self-intersections and edge collapses, while the topological detection module is used to check structural constraints such as vertex-edge, edge-loop, loop-face, and face-shell relationships. This cascaded detection strategy enables branching attribution of anomaly types, ensuring that subsequent repair processes only address structures with risks, thus solving the problems of complex wireframe anomaly forms and the ease with which single detection methods may miss detections.
[0029] 3. This invention proposes a geometry-topology repair module and its training-free inference stage repair strategy.
[0030] This module includes geometric repair and topology repair branches. The geometric repair branch normalizes degenerate or conflicting edge configurations by minimizing geometric energy, thereby mitigating issues such as edge collapse, self-intersection, and near-field collisions. The topology repair branch re-examines suspicious connectivity variables by minimizing topological energy, thereby reducing topological violations such as open loops, disconnected vertices, and shell structure inconsistencies. For the autoregressive boundary representation generation model, this module employs an energy-guided resampling strategy to suppress generation decisions that lead to structural anomalies during lexical generation. For the diffuse boundary representation generation model, this module introduces wireframe structure energy into the inverse denoising process, guiding the generation results to lower-energy, more efficient regions without retraining the model. These designs improve the stability of subsequent boundary representation construction while maintaining the overall stability of the wireframe structure and generation distribution. Attached Figure Description
[0031] Figure 1 This is an overall flowchart of the wireframe detection and repair method of the present invention.
[0032] Figure 2 These are the qualitative repair results of the method of the present invention on different multi-stage boundary representation generators. For each generator, each set of results, from left to right, represents the initial abnormal wireframe, the boundary representation construction result corresponding to the initial wireframe, the WDR repaired wireframe, and the boundary representation constructed after repair; N / A indicates that the initial wireframe cannot construct a boundary representation.
[0033] Figure 3 This represents the qualitative repair results of the method of this invention on the category label condition generation task. Each row, from top to bottom, corresponds to a chair, a couch, a lamp, and a sofa. Each set of results, from left to right, represents the initial abnormal wireframe, the boundary representation construction result corresponding to the initial wireframe, the WDR repaired wireframe, and the boundary representation constructed after repair. N / A indicates that the initial wireframe could not construct a boundary representation. Detailed Implementation
[0034] A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings.
[0035] Existing multi-stage boundary representation generation methods typically focus primarily on the visual quality and overall generation effect of the final boundary representation model, often neglecting the structural validity of the wireframes. In existing multi-stage generation pipelines, when wireframe anomalies occur, the errors propagate and amplify in subsequent stages, ultimately rendering the generated boundary representation model invalid. These anomalies mainly include geometric anomalies and topological anomalies. Geometric anomalies refer to situations where the wireframe's spatial positional relationships do not meet reasonable geometric constraints, such as edge self-intersections or edge collapses. Topological anomalies refer to situations where the wireframe's connection relationships do not meet valid structural constraints, such as broken vertex connections or unclosed loop structures. Edge self-intersections refer to unreasonable intersections of different edge segments in space; edge collapses refer to situations where the two endpoints of an edge are too close or coincident, causing the edge to degenerate into an invalid structure; broken vertex connections refer to situations where vertices that should participate in the connection are not correctly connected to their corresponding edges or loop structures.
[0036] One direct solution is to fine-tune or retrain existing generative models to reduce the aforementioned wireframe anomalies. However, multi-stage boundary representation generation models are typically large in scale and involve different architectures such as autoregressive generation models and diffusion generation models. Autoregressive generation models predict subsequent structural elements sequentially; diffusion generation models generate the target structure through a step-by-step denoising process. Retraining each model requires not only a large amount of training data but also significant computational costs and is difficult to adapt to different generation pipelines. Therefore, current technology still lacks a wireframe anomaly detection and repair method that does not rely on model retraining and can be directly integrated into existing multi-stage boundary representation generation pipelines.
[0037] To address the aforementioned challenges, this invention proposes a wireframe detection and repair (WDR) framework for boundary representation model generation. The method aims to explicitly detect and repair wireframes during the multi-stage boundary representation generation process without retraining the existing generative model, thereby improving the structural effectiveness and generation quality of the final boundary representation model. Specifically, "training-free" means that it does not require updating the network parameters of the original generative model; "model-independent" means that the method is not limited to a specific generative model structure; and "pluggable" means that the method can be integrated as an independent module into existing multi-stage boundary representation generation pipelines.
[0038] First, this invention proposes a Geometric-Topology Anomaly Detector (GTAD) module. This module combines a visual-language model-based detection module and an energy-based detection module to identify anomalies within wireframes. The visual-language model (VLM) is a model capable of simultaneously understanding image and text information, and can be used to identify obvious structural risks from wireframe renderings. The energy-based detection module measures the geometric or topological risks of the wireframe using a preset energy function. By combining these two modules, the GTAD module can more accurately identify complex geometric and topological anomalies within wireframes, thus solving the problem of difficult anomaly detection.
[0039] Secondly, this invention proposes an Energy-Guided Geometric-Topology Repair (EGGTR) module. The EGGTR module comprises a geometric repair branch and a topology repair branch. The geometric repair branch is used to regularize degenerate or conflicting edge configurations to alleviate geometric problems such as edge collapse and edge self-intersection; the topology repair branch is used to re-examine suspicious connectivity variables to reduce topological constraint violations and restore a loop-consistent wireframe structure. Loop consistency refers to the ability of edges in the wireframe to form closed boundary loops according to correct connectivity relationships, thereby supporting subsequent surface generation and solid construction.
[0040] Finally, for different types of generative models, this invention further designs corresponding training-free inference stage repair strategies. For autoregressive generative models, this invention proposes an energy-guided resampling strategy, which selects or resamples candidate structures based on abnormal energy during the testing phase, making the generation process more inclined to produce structurally reasonable wireframes. For diffusion generative models, this invention adopts a training-free guided strategy, introducing wireframe structure energy into the denoising process without updating model parameters, thereby improving the structural stability of the diffusion boundary representation generation pipeline. Thus, the WDR framework can adapt to different types of multi-stage boundary representation generation architectures.
[0041] This invention proposes a WDR framework for multi-stage boundary representation generation pipeline, which can be applied to wireframes to improve the structural effectiveness of the final output model without retraining the original generation model.
[0042] This invention proposes a geometric-topological anomaly detection module that combines a detection mechanism based on a visual language model and an energy-based evaluation mechanism to detect complex geometric and topological anomalies in wireframes.
[0043] This invention proposes a geometry-topology repair module, which handles geometric anomalies and topology anomalies through geometric branches and topology branches respectively, thus maintaining the overall structural integrity of the wireframe while repairing local errors.
[0044] This invention proposes an energy-guided resampling strategy suitable for autoregressive generative models, and extends the framework of this invention to the training-free guidance process of diffusion generative models, enabling the WDR framework to access different boundary representation generation architectures in a model-independent manner.
[0045] The effectiveness of the proposed method is verified through quantitative and qualitative experiments. The results show that the method of the present invention can improve the effectiveness and quality of generated CAD models in multiple public benchmarks and various multi-stage boundary representation generation pipelines.
[0046] The present invention will be described in detail below in several parts.
[0047] 1. Multi-stage boundary representation generation and wireframe definition.
[0048] In this invention, the multi-stage boundary representation generation method refers to a generation method that breaks down the generation process of the complete boundary representation model into consecutive stages such as wireframe generation and geometry generation. Given the latent noise z and optional condition constraints c, the multi-stage boundary representation generation process can be expressed as: .
[0049] Where z represents the input potential noise, and c represents the category label, point cloud, or other optional condition constraints; This represents a wireframe generator used to generate intermediate wireframes W; This represents a geometry generator used to generate continuous geometric properties G under constraints W. The final boundary representation model M can be obtained by integrating the intermediate wireframe W and geometric properties G through the OpenCASCADE Technology (OCCT) CAD kernel, i.e.: .
[0050] In this invention, the aforementioned wireframe is defined as a spatial graph consisting of vertices and edges: ; ; .
[0051] Where V represents the set of three-dimensional vertex coordinates, and V represents the vertices in V, n represents the number of vertices; E represents the set of topological connectivity relationships between vertices, i.e. the set of edges in the wireframe.
[0052] Furthermore, the geometric property G can be expressed as: ; Here, C represents the set of parametric curves corresponding to the topological edges in E, and F represents the set of interfaces jointly defined by the boundary lines and the underlying surface geometry. Thus, the wireframe W not only provides the early topological skeleton of the boundary representation model but also determines the constraint basis for subsequent curve, surface, and solid construction. If anomalies such as edge self-intersection, edge collapse, broken vertex connections, or unclosed loop structures appear in W, these anomalies will affect subsequent... The process continues through the phases of wireframe generation and CAD kernel construction. Therefore, this invention uses W as the primary target of the WDR framework, performing anomaly detection and training-free repair on the wireframe before geometry generation. When WDR is integrated, the geometry generator generates geometric attributes based on the wireframe detected and repaired by WDR. The CAD kernel then combines the wireframe and geometric attributes to construct the final boundary representation model. WDR operates on the intermediate wireframe generation phase, rather than filtering the final boundary representation model. The effective boundary representation model, as referred to in this paper, is a closed entity verified by the CAD kernel as watertight and manifold, where each edge is shared by two adjacent faces and there are no open boundaries; the face boundary loops are aligned and do not self-intersect; and the shell contains no collapsed edges, zero-area faces, or non-manifold vertices.
[0053] 2. Overview of the plan.
[0054] The structural diagram of the method of this invention is as follows: Figure 1As shown, this invention proposes a wireframe detection and repair (WDR) framework. This framework is simple, effective, training-free, and model-independent, aiming to improve the effectiveness of the generated boundary representation model. The overall process is as follows: Figure 1 As shown. Specifically, the framework of this invention comprises two coupled stages. First, this invention introduces a geometry-topology anomaly detection module, which systematically examines intermediate wireframes to accurately identify geometric and topological anomalies. Second, for these different anomalies, this invention proposes a geometry-topology repair module. The geometry-topology repair module does not directly change the network weights, but rather dynamically guides the generation process of the pre-trained multi-stage boundary representation model. It achieves this goal by defining customized energy functions for geometry and topology respectively, and minimizing the generated guided energy.
[0055] 3. Geometric-topological anomaly detection module.
[0056] The geometry-topology anomaly detection module is designed to systematically identify wireframes. This module addresses geometric and topological anomalies. To this end, a hierarchical, multimodal detection mechanism is designed, consisting of three different detection modules: a visual language model-based detection module, a fine-grained geometric detection module, and a topological detection module.
[0057] Visual Language Model-Based Detection Module: Recent advances have demonstrated the strong capabilities of Visual Language Models (VLMs) in complex visual understanding and spatial reasoning. This module uses a Visual Language Model as a preliminary coarse-grained visual detection module. Specifically, this module denotes it as... It is with The multi-view rendered image is used as input, and a binary risk signal is returned. In this system, a binary risk signal of 1 indicates that a significant structural risk has been detected, while a value of 0 indicates that no such risk has been detected. This signal marks structural anomalies in the rendered wireframe that are clearly related to validity, such as severe intersections, collapses, inconsistent connectivity, or broken components, rather than verifying the final CAD validity. In this implementation, this module uses GPT-5.4-mini.
[0058] Geometric Detection Module: To provide detailed analysis of geometric anomalies such as edge collapse and self-intersections, this module introduces an energy-based geometric detection module. This module uses discrete tangent-point energy to calculate the geometric energy of the wireframe. ; in, Represents a given edge Discrete tangent point energy, This represents the total number of sides in the wireframe. Energy Term Close-contact interactions between non-adjacent curve points are severely penalized. Therefore, a larger energy value indicates a higher risk of self-intersection. This module sets a user-defined threshold. ;if If so, the wireframe will be marked as a geometric anomaly.
[0059] Topology Detection Module: For practical relevance, this module restricts its scope to closed, manifold boundary representation models, where each boundary edge is shared by exactly two different faces. This module constructs four strict constraint functions based on the standard boundary representation definition to evaluate... Topological integrity: Vertex-edge constraint ( To avoid dangling elements and overly complex vertices, each vertex must be connected to at least two distinct edges, and typically no more than eight edges. Definition: ; in, It is an indicator function; if the vertex If the constraint is satisfied, return. .
[0060] Edge-loop constraints ( To ensure unambiguous topological reconstruction, each cycle must contain at least three vertices and contain no repeated edges. Definition: ; in, express The set of boundary rings in the [context].
[0061] Toroidal constraints ( Each face must be trimmed by exactly one outer loop and zero or more inner loops (holes). These closed and directed loops are essential for defining the effective, visible region on the underlying parametric surface. Definition: ; in, Represents a set of faces.
[0062] Surface-shell constraints ( For an object consisting of a single solid shell, its edge-face adjacency graph must form a single, fully connected component. Definition: ; Among them, indicator function Take when the global connectivity constraint is satisfied. Otherwise take The indicator functions for the above four constraints all take the value 0 when the corresponding constraint is satisfied and 1 when the corresponding constraint is violated.
[0063] The final topological energy calculation is as follows: ; Since ideal topology validity requires all constraint criteria to be fully satisfied, i.e., the minimum score is... Therefore when When this happens, this module marks the wireframe as a topology defect.
[0064] In practice, the geometric-topological anomaly detection module follows a cascaded detection strategy. The visual language model-based detection module first performs a rapid global screening. If no obvious structural risks are found, the wireframe is accepted directly without repair. Otherwise, the sample is further subjected to fine-grained branching attribution by the energy-based geometric and topological detection modules. Geometric anomalies are routed to geometric repair, topological anomalies to topological repair, and samples with both types of anomalies activate both branches. This hierarchical structure combines the zero-shot reasoning capability of the visual language model with the deterministic energy / graph metric, enabling robust anomaly detection without model retraining.
[0065] 4. Energy-guided geometry-topology repair module.
[0066] Once the geometry-topology anomaly detection module detects invalid or high-risk wireframes, the geometry-topology repair module performs targeted test-time repairs before downstream boundary representation construction. Geometry-side repair adjusts continuous vertex coordinates to address spatial anomalies such as edge collapse and self-intersections; topology-side repair re-examines discrete connectivity variables that determine loop and shell consistency. Since the autoregressive boundary representation generator serializes geometry and topology into a structured sequence of terms for predicting the next term, the geometry-topology repair module extends test-time computation in this discrete setting; to maintain model independence, it also supports diffusion-based generation.
[0067] (1) Energy-guided resampling for autoregressive generation: For autoregressive generators, this invention aims to improve wireframe effectiveness by extending test-time computation. A direct baseline is Best-of- Resampling involves sampling multiple complete wireframe candidates and selecting the candidate with the lowest energy. However, this global resampling is costly and may degrade generation quality. Inspired by test-time computational expansion and progressive autoregressive decoding, this invention proposes energy-guided resampling to progressively explore generation paths and guide computation towards low-energy continuations under boundary representation structural constraints. Here, N represents the number of complete wireframe candidates.
[0068] Specifically, autoregressive generative models exist Perform the prediction of the next word and define the sequence likelihood as: ; in, It is a length of The word sequence, It is a condition. Indicates model parameters.
[0069] Objective: In the plug-and-play condition generation setting of this invention, given a pre-trained model... Differentiable energy function The objective of this invention is to sample from the following distribution: .
[0070] Process: This invention does not employ whole-sample reordering, but instead injects energy at the lexical level through a progressive generation method. This is to achieve the following in the first... Step generation Define an asymptotic sampling distribution: ; in, Map the generated lexical units to the corresponding wireframes. Evaluate the marginal energy contribution of the current decoded word.
[0071] By generating at each step Different candidates The final lexical units are selected using the following formula: ; This strategy, while penalizing decisions that increase structural anomalies, aims to make the repair results as close as possible to the original sample distribution. This invention sets word-level resampling as... .
[0072] Here, the energy function Based on the detected anomaly definition: minimize It can suppress spatial intersections and near-collisions in geometric side repair; minimize This can reduce residual violations of discrete validity constraints in topology-side repair.
[0073] (2) Generalization to the diffusion generation model: For direct boundary representation generation methods based on diffusion generation models, this invention treats the repair process as a training-free conditional sampling problem along the inverse denoising trajectory, thereby expanding the applicability of the method; this approach follows recent controllable generation frameworks such as Training-Free Guidance (TFG).
[0074] Given clean data and diffusion time step The forward noise addition process constructs noisy data points. ,in , Noise control scheduling. Pre-trained diffusion generation model. It is trained to predict this added noise. During inference, the first... Clean sample after denoising It can be estimated using the Tweedie formula: .
[0075] To impose structural constraints without retraining the generator, this invention uses an energy-guided target to guide noisy intermediate states. Specifically, in each noise reduction step This invention uses TFG to update potential states: ; ; in, This represents the sampling steps of the standard Denoising Diffusion Implicit Models (DDIM). Optimization term. and The smoothed energy-guided target is calculated respectively regarding and The gradient is obtained, thus biasing the generation process towards regions with lower energy and higher efficiency.
[0076] Example: (1) Dataset and Metrics: To verify the effectiveness of the wireframe anomaly detection and training-free repair method proposed in this invention in boundary representation generation tasks, this embodiment conducts experimental verification on commonly used CAD generation benchmarks, including DeepCAD, ABC, and Furniture datasets. DeepCAD and ABC are used for unconditional boundary representation generation tasks, while Furniture is used for boundary representation generation tasks with category label conditions.
[0077] In the experiments, the method of this invention was integrated as a plug-and-play inference stage module into existing multi-stage boundary representation generators, including DTGprepGen, Stitch-A-Shape, and BrepForge. For autoregressive generators, this embodiment employs an energy-guided resampling strategy; for diffusion generators, this embodiment employs a training-free guided strategy. All of the above settings do not change the network structure and model parameters of the original generative model; only anomaly detection and repair are performed on intermediate wireframes after the wireframe generation stage and before geometry generation and boundary representation construction.
[0078] This embodiment uses CAD-level metrics and distribution-level metrics to comprehensively evaluate the generated results. CAD-level metrics include Valid, Novel, and Unique. Valid measures whether the generated result can be constructed into a valid closed entity by the CAD kernel; Novel measures whether the generated sample does not appear in the training set; and Unique measures the degree of non-repetition of the generated result. Distribution-level metrics include Coverage (COV), Minimum Matching Distance (MMD), and Jensen-Shannon Divergence (JSD), used to evaluate the coverage and similarity between the generated shape distribution and the reference shape distribution.
[0079] (2) Unconditionally generate tasks: This embodiment conducts unconditional boundary representation generation experiments on the DeepCAD and ABC datasets. Following the evaluation protocol of existing direct boundary representation generation methods, 3,000 boundary representation samples are generated for each dataset, and distribution metrics are calculated using 1,000 reference models. Comparison methods include representative boundary representation generation methods such as DeepCAD, BrepGen, DTGprepGen, Stitch-A-Shape, and BrepForge.
[0080] In the unconditional generation experiment, the method of this invention was integrated into the intermediate wireframe generation stage of DTGprepGen, Stitch-A-Shape, and BrepForge. The base generator first generates the wireframe structure; then, the geometry-topology anomaly detection module performs geometry and topology anomaly detection on the generated wireframe; when anomalies such as edge self-intersection, edge collapse, broken vertex connections, or unclosed loop structures are detected, the geometry-topology repair module repairs the corresponding geometric coordinates or topology connection variables; finally, the repaired wireframe continues to enter the subsequent curve, surface, and solid construction process.
[0081] Quantitative results are shown in Table 1. After incorporating the method of this invention, the Validity metrics of each basic generator were improved, indicating that this invention can effectively reduce invalid boundary representation outputs caused by intermediate wireframe anomalies. Meanwhile, the Novel, Unique, COV, MMD, and JSD metrics remained generally stable, indicating that this invention, while improving structural validity, did not significantly limit the diversity and distribution coverage of the generated results. Qualitative results are shown in Table 1. Figure 2 As shown, after being repaired by the method of the present invention, the self-intersection, collapsed edges and disconnected vertices in the initial wireframe are alleviated, and the subsequent CAD kernel can more stably construct a complete boundary representation model.
[0082] Table 1: Unconditional boundary representations on the DeepCAD and ABC datasets generate quantitative evaluation results; the reported values for MMD and JSD are both magnified by 100 times.
[0083]
[0084] (3) Category label generation task: This embodiment further conducts boundary representation generation experiments under category label conditions on the Furniture dataset. This dataset includes multiple furniture categories such as Bathtub, Bed, Bench, Bookshelf, Cabinet, Chair, Couch, Lamp, Sofa, and Table. During the experiment, the original generator's category condition input interface remains unchanged; only the method of this invention is attached to the exposed intermediate wireframes to detect and repair abnormal wireframes generated during category condition sampling.
[0085] The quantitative results are shown in Table 2. In the category label conditional generation scenario, the method of the present invention can also improve the structural effectiveness of the generated boundary representation model, and this improvement can be observed in multiple furniture categories. The above results show that the method of the present invention does not depend on a specific category or a specific conditional encoding method, but can be directly applied to the wireframe structure itself, and therefore can be transferred to boundary representation generation tasks under different category conditions.
[0086] Qualitative results of the category label condition generation task, such as Figure 3 As shown.
[0087] Table 2: Comparison of Validity Indicators Generated by Category Boundary Representations in the Furniture Dataset
[0088] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0089] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple steps or stages, which are not necessarily completed at the same time, but may be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0090] This invention also provides a system. The system can be a system that uses software (applications), modules, components, servers, clients, etc., employing the methods described in the embodiments of this specification, combined with necessary hardware implementation. Since the implementation schemes and methods for solving the problem are similar, the specific system implementations in the embodiments of this specification can be found in the implementations of the foregoing methods, and repeated details will not be elaborated upon. Although the system is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0091] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0092] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.
[0093] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A wireframe anomaly detection and training-free repair method based on boundary representation generation, characterized in that, include: Obtain the intermediate wireframes output by the wireframe generator in the multi-stage boundary representation generation pipeline. The intermediate wireframes are composed of vertices and edges. Anomaly detection is performed on the intermediate wireframe using a geometric-topological anomaly detection module: coarse-grained structural risk screening is performed on the wireframe rendering image obtained from the intermediate wireframe based on a visual language model, and fine-grained geometric anomaly and topological anomaly assessment is performed based on an energy function. When an anomaly is detected, the energy-guided geometry-topology repair module is used to repair the wireframe without training: the vertex coordinates of the intermediate wireframe are adjusted by the geometric branch to repair geometric anomalies, and the connectivity of the intermediate wireframe is adjusted by the topology branch to repair topological anomalies. The repaired intermediate wireframe is input into the geometry generator to generate geometric properties, and the CAD kernel combines the repaired intermediate wireframe with the geometric properties to construct a boundary representation model.
2. The wireframe anomaly detection and training-free repair method based on boundary representation generation according to claim 1, characterized in that, The coarse-grained structural risk screening of the wireframe rendering image obtained from the intermediate wireframe rendering based on the visual language model specifically includes: The multi-view rendering of the intermediate wireframe is input into the visual language model, which outputs a binary risk signal. The binary risk signal is 1 to indicate that a structural risk has been detected and 0 to indicate that no structural risk has been detected. If no structural risk is detected, the intermediate wireframe is accepted directly without triggering the subsequent repair process.
3. The wireframe anomaly detection and training-free repair method based on boundary representation generation according to claim 1, characterized in that, Fine-grained geometric anomaly assessment based on energy functions specifically includes: Using discrete tangent point energy function Measuring the middle wireframe The geometric energy, of which Represents a given edge Discrete tangent point energy, Indicates the total number of sides in the middle frame; when Exceeding the preset threshold When this happens, mark the middle wireframe as a geometric anomaly.
4. The wireframe anomaly detection and training-free repair method based on boundary representation generation according to claim 1, characterized in that, Fine-grained topological anomaly assessment based on energy functions specifically includes: Calculate the topological energy function based on four constraint functions. ,in Represents vertex-edge constraints. To indicate the vertex An indicator function to determine whether the constraint of connecting at least two distinct edges and no more than eight edges is satisfied. Represents the total number of vertices. Indicates the middle frame; Indicates edge-loop constraints. For the set of boundary rings within the middle wireframe, For indicator ring An indicator function for whether the object contains at least three vertices and no repeating edges; Indicates a toroidal constraint. For a set of faces, For indicator surface An indicator function indicating whether it is clipped by exactly one outer ring and zero or more inner rings; Represents a face-shell constraint. An indicator function that indicates whether global connectivity constraints are satisfied; when When the condition is met, the intermediate wireframe is marked as a topology anomaly; among them, the four indicator functions take the value 0 when the corresponding constraint is satisfied and 1 when the corresponding constraint is violated.
5. The wireframe anomaly detection and training-free repair method based on boundary representation generation according to claim 1, characterized in that, The method of adjusting the vertex coordinates of the intermediate wireframe through geometric branching to fix geometric anomalies specifically includes: The geometric anomaly is routed to the geometric branch by minimizing the discrete tangent point energy function. This allows for adjustment of the 3D vertex coordinates of the middle wireframe, and the normalization of degenerate or conflicting edge configurations.
6. The wireframe anomaly detection and training-free repair method based on boundary representation generation according to claim 1, characterized in that, The method of adjusting the connectivity of intermediate wireframes through topology branching to repair topology anomalies specifically includes: Topology anomalies are routed to topology branches by minimizing the topology energy function. To re-examine the suspicious connection variables in the intermediate wireframe, reduce topology constraint violations, and restore the ring-consistent wireframe structure.
7. The wireframe anomaly detection and training-free repair method based on boundary representation generation according to claim 1, characterized in that, The geometric-topological anomaly detection module adopts a cascaded detection strategy: first, a visual language model performs a rapid global screening, and if no structural risks are found, the intermediate wireframe is directly accepted. If structural risks are detected, fine-grained branch attribution is performed using geometric anomaly assessment and topological anomaly assessment based on energy functions. Geometric anomalies are routed to geometric branch repair, and topological anomalies are routed to topological branch repair.
8. The wireframe anomaly detection and training-free repair method according to claim 1, characterized in that, When the wireframe generator is an autoregressive generation model, the energy-guided geometry-topology repair module employs an energy-guided resampling strategy: during word-by-word generation, sampling is performed at each step. Find 10 candidate lexical units and calculate the marginal energy contribution of each candidate lexical unit. Then, select the word that minimizes the sum of the negative log-likelihood given by the pre-trained autoregressive generative model and the marginal energy contribution, where For the generated word sequence, The word to be sampled in the current step. This is a function that maps a sequence of words to corresponding intermediate wireframes. It is a differentiable energy function.
9. The wireframe anomaly detection and training-free repair method based on boundary representation generation according to claim 1, characterized in that, When the wireframe generator is a diffusion generation model, the energy-guided geometry-topology repair module adopts a training-free guidance strategy: along the reverse denoising trajectory, the energy-guided target is calculated with respect to the noise data points. and denoised clean sample estimation Gradient, update This guides the generation process to a low-energy region, where For the first Noise data points at each diffusion time step Estimated using the Tweedie formula: , Here, θ represents the noise prediction function of the pre-trained diffusion generation model. These are noise scheduling parameters.
10. A wireframe anomaly detection and training-free repair system oriented towards boundary representation generation, used to implement the method of any one of claims 1 to 9, characterized in that, include: The wireframe acquisition module is used to acquire intermediate wireframes output by the wireframe generator in the multi-stage boundary representation generation pipeline. The intermediate wireframes are composed of vertices and edges. The anomaly detection module is used to detect anomalies in the intermediate wireframe. The anomaly detection module includes a visual detection unit and an energy detection unit. The visual detection unit performs coarse-grained structural risk screening on the wireframe rendering image obtained from the intermediate wireframe based on a visual language model. The energy detection unit performs fine-grained geometric anomaly assessment and topological anomaly assessment based on an energy function. The training-free repair module is used to repair wireframes without training when anomalies are detected. The training-free repair module includes: a geometric repair unit that adjusts the vertex coordinates of the intermediate wireframes through geometric branches to repair geometric anomalies, and a topology repair unit that adjusts the connectivity of the intermediate wireframes through topology branches to repair topology anomalies. The geometry generation module is used to input the repaired intermediate wireframe into the geometry generator to generate geometric attributes, and the CAD kernel combines the repaired intermediate wireframe with the geometric attributes to construct a boundary representation model.