基于CSG的三维CAD形状智能解析方法
An Intelligent Analysis Method for 3D CAD Shapes Based on CSG
-
摘要: CAD模型作为表达几何结构与设计逻辑的核心载体,理解其复杂形状背后的构造方式有利于设计者实现形状的复用、编辑和优化,构造几何实体(constructive solid geometry,CSG)技术则为形状解析提供了一条可行路径.为提升复杂三维CAD形状的自动解析与重建精度,学习紧凑、可解释的CSG表示,提出一种基于CSG表达的三维CAD形状解析方法.以二次曲面为基本建模基元,采用“整体-删减”双分支结构,通过布尔操作组合构造三维目标形状.首先,整体与删减两分支以输入体素或点云为输入,经过自编码器提取形状特征;其次,每个分支分别预测二次曲面基元,并通过引入旋转参数和对偶基元设计,使模型能够在固定布尔操作序列下表达更复杂的形状组合,同时通过正则化损失约束基元的多样性和几何合理性;接着,各分支按交-并固定顺序组合基元,再通过对两分支结果差集操作得到重建结果;最终,在模型训练完成后,进一步设计了基于符号距离影响力的冗余基元后处理策略,筛除无效构造单元,使生成的CSG序列更紧凑、可解释性更强.在ABC数据集上与现有主流方法进行实验的结果表明,所提方法在三维倒角距离、边缘倒角距离和法向量一致性相较SECAD-Net分别下降72.1%、下降31.1%和上升9.48%,并在视觉衡量上都取得了更好的结果.Abstract: CAD models serve as the fundamental carriers for representing geometric structures and design logic. Understanding the underlying construction logic of complex shapes facilitates the reuse, editing, and optimization of designs. Constructive Solid Geometry (CSG) offers a viable approach for shape parsing by representing complex geometries through combinations of simple primitives. This paper proposes a novel method for parsing 3D CAD shapes based on CSG representations. Leveraging quadric surfaces as the fundamental modeling primitives, our approach employs a dual-branch architecture— “composition–subtraction”—to construct target 3D shapes via Boolean operations. Each branch receives either voxel grids or point clouds as input and uses an auto-encoder to extract shape features, which are then used to predict a set of intermediate shapes. The final reconstruction is obtained through set difference operations. To enhance the model’s expressive capacity under a fixed Boolean operation sequence, we introduce rotation parameters and dual primitive designs. Moreover, we adopt a staged training framework that progressively guides the model from learning approximate signed distance functions to precise structural modeling. A regularization loss is incorporated to promote geometric diversity and plausibility of the primitives. After training, we further propose a post-processing strategy based on signed distance influence to remove redundant primitives, resulting in more compact and interpretable CSG sequences. Experimental comparisons on the ABC dataset demonstrate that our method reduces the 3D chamfer distance and edge chamfer distance by 72.1% and 31.1%, respectively, and improves the normal vector consistency by 9.48%, compared to SECAD-Net, and achieves better results in visual metrics.
下载: