{'fraction_non_alphanumeric': 0.034676258992805756, 'fraction_numerical': 0.009611510791366906, 'mean_word_length': 4.769716088328075, 'pattern_counts': {'":': 1, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
ParSeNet: A Parametric Surface Fitting Network for 3D Point Clouds

We propose a novel, end-to-end trainable, deep network called ParSeNet that decomposes a 3D point cloud into parametric surface patches, including B-spline patches as well as basic geometric primitives. ParSeNet is trained on a large-scale dataset of man-made 3D shapes and captures high-level semantic priors for shape decomposition. It handles a much richer class of primitives than prior work, and allows us to represent surfaces with higher fidelity. It also produces repeatable and robust parametrizations of a surface compared to purely geometric approaches. We present extensive experiments to validate our approach against analytical and learning-based alternatives.


Introduction
3D point clouds can be rapidly acquired using 3D sensors or photogrammetric techniques. However, they are rarely used in this form in design and graphics applications. Observations from the computer-aided design and modeling literature [3,4,13,15] suggest that designers often model shapes by constructing several non-overlapping patches placed visually seamlessly. The advantage of using several patches over a single continuous patch is that a much more diverse variety of geometric features and surface topologies can be created. The decomposition also allows easier interaction, editing and rigging for animation. The goal of this work is to automate the time-consuming process of converting a 3D point cloud into a piecewise parametric surface representation as seen in Figure 1.
An important question is how surface patches should be represented. Patch representations in CAD and graphics are based on well-accepted geometric properties: (a) continuity in their tangents, normals, and curvature, making patches appear smooth, (b) editability, such that they can easily be modified based on a few intuitive degrees of freedom (DoFs), e.g., control points or axes, and (c) flexibility, so that a wide variety of surface geometries can be captured.
Towards this goal, we propose ParSeNet, a parametric surface fitting network architecture which produces a compact, editable representation of a point cloud as a seamless assembly of geometric primitives, including arbitrary open or closed cubic B-spline patches.
ParSeNet models a richer class of surfaces than prior work which only handles basic geometric primitives such as planes, cuboids and cylinders [11,12,16,22]. While such primitives are continuous, editable representations, they lack the richness and flexibility of spline patches which are widely used in shape design. ParSeNet includes a novel neural network (SplineNet) to estimate an open or closed B-spline model of a point cloud patch. It is part of a fitting module (Section 3.2) which can also fit other geometric primitive types. The fitting module receives input from a decomposition module, which partitions a point cloud into segments, after which the fitting module estimates shape parameters of a predicted primitive type for each segment (Section 3.1). The entire pipeline, shown in Figure 2, is fully differentiable and trained end-to-end (Section 4). An optional geometric postprocessing step further refines the output.
Compared to purely analytical approaches, ParSeNet produces decompositions that are more consistent with high-level semantic priors, and are more robust to point density and noise. To train and test ParSeNet, we leverage a recent dataset of man-made parts [8]. Extensive evaluations show that ParSeNet outperforms baselines (RANSAC and SPFN [11]) by 14.93% and 13.13% respectively for segmenting a point cloud into patches, and by 50%, and 47.64% respectively for parametrizing each patch for surface reconstruction (Section 5).
To summarize, our contributions are: -The first proposed end-to-end differentiable approach for representing a raw 3D point cloud as an assembly of parametric primitives including spline patches. -Novel decomposition and primitive fitting modules, including SplineNet, a fully-differentiable network to fit a cubic B-spline patch to a set of points. -Evaluation of our framework vs prior analytical and learning-based methods.

Related Work
Our work builds upon related research on parametric surface representations and methods for primitive fitting. We briefly review relevant work in these areas. Of course, we also leverage extensive prior work on neural networks for general shape processing: see recent surveys on the subject [1].
Parametric surfaces. A parametric surface is a (typically diffeomorphic) mapping from a (typically compact) subset of R 2 to R 3 . While most of the geometric primitives used in computer graphics (spheres, cuboids, meshes etc) can be represented parametrically, the term most commonly refers to curved surfaces used in engineering CAD modelers, represented as spline patches [3]. There are a variety of formulations -e.g. Bézier patches, B-spline patches, NURBS patcheswith slightly different characteristics, but they all construct surfaces as weighted combinations of control parameters, typically the positions of a sparse grid of points which serve as editing handles. We provide a brief introduction to B-splines used in our pipeline below.  (2) The fitting module (Section 3.2) predicts parameters of a primitive that best approximates each segment. It includes a novel SplineNet to fit B-spline patches. The two modules are jointly trained end-to-end. An optional postprocess module (Section 3.3) refines the output.
Fitting geometric primitives. A variety of analytical (i.e. not learning-based) algorithms have been devised to approximate raw 3D data as a collection of geometric primitives: dominant themes include Hough transforms, RANSAC and clustering. The literature is too vast to cover here, we recommend the comprehensive survey of Kaiser et al . [7]. In the rest of this section, we briefly review recent methods that learn how to fit primitives to 2D/3D data.
Huang et al . [6] proposed a method to decompose raster images into vectorized components. Their RNN decoder is specific to 2D data where points on a curve can be ordered sequentially. Ellis et al . [2] proposed a neural network to extract lines, circles and rectangles (but not arbitrary parametric curves) in sketches, which are then grouped into LaTeX programs. Smirnov et al . [18] use signed distance fields as a cue for vectorization in both 2D and 3D. However, their method only fits cuboids in 3D and does not handle curved patches.
Several other recent papers [20,22,25] also try to approximate 3D shapes as unions of cuboids. Paschalidou et al . [12] extended this to superquadrics. Sharma et al . [16] developed a neural parser that represents a test shape as a collection of basic primitives (spheres, cubes, cylinders) combined with boolean operations. Tian et al . [21] handled more expressive construction rules (e.g. loops) and a somewhat wider set of primitives. Because of the choice of simple primitives, such models are naturally limited in how well they align to complex input objects, and offer less flexible and intuitive parametrization for user edits.
More relevantly to our goal of modeling arbitrary curved surfaces, Gao et al . [5] parametrize 3D point clouds as extrusions or surfaces of revolution, generated by B-spline cross-sections detected by a 2D network. This method requires translational/rotational symmetry, and does not apply to general curved patches. Li et al . [11] proposed a supervised method to fit primitives to 3D point clouds, first predicting per-point segment labels, primitive types and normals, and then using a differential module to estimate primitive parameters. While we also chain segmentation with fitting in an end-to-end way, we differ from Li et al . in two important ways. First, our differentiable metric-learning segmentation produces improved results (Table 1). Second, a major goal (and technical challenge) for us is to significantly improve expressivity and generality by incorporating B-spline patches: we achieve this with a novel differentiable spline-fitting network.
In a complementary direction, Yumer et al . [24] developed a neural network for fitting a single NURBS patch to an unstructured point cloud. While the goal is similar to our spline-fitting network, it is not combined with a decomposition module that jointly learns how to express a shape with multiple patches covering different regions. Further, their fitting module has several non-trainable steps which are not obviously differentiable, and hence cannot be used in our pipeline.
Background on B-spline patches. A B-spline patch is a smoothly curved, bounded, parametric surface, whose shape is defined by a sparse grid of control points where b p (u) and b q (v) are polynomial B-spline basis functions [3]. To determine how the control points affect the B-spline, a sequence of parameter values, or knot vector, is used to divide the range of each parameter into intervals or knot spans. Whenever the parameter value enters a new knot span, a new row (or column) of control points and associated basis functions become active. A common knot setting repeats the first and last ones multiple times (specifically 4 for cubic B-splines) while keeping the interior knots uniformly spaced, so that the patch interpolates the corners of the control point grid. A closed surface is generated by matching the control points on opposite edges of the grid. There are various generalizations of B-splines e.g., with rational basis functions or non-uniform knots. We focus on predicting cubic B-splines (open or closed) with uniform interior knots, which are quite common in CAD [3,4,13,15].

Method
The goal of our method is to reconstruct an input point cloud by predicting a set of parametric patches closely approximating its underlying surface. The first stage of our architecture is a neural decomposition module ( Figure 2) whose goal is to segment the input point cloud into regions, each labeled with a parametric patch type. Next, we incorporate a fitting module ( Figure 2) that predicts each patch's shape parameters. Finally, an optional post-processing geometric optimization step refines the predicted B-spline patches to better align their boundaries for a seamless surface. The input to our pipeline is a set of points P = {p i } N i=1 , represented either as 3D positions p i = (x, y, z), or as 6D position + normal vectors p i = (x, y, z, n x , n y , n z ). The output is a set of surface patches {s k }, reconstructing the input point cloud. The number of patches is automatically determined. Each patch is labeled with a type t k , one of: sphere, plane, cone, cylinder, open/closed B-spline patch. The architecture also outputs a real-valued vector for each patch defining its geometric parameters, e.g. center and radius for spheres, or B-spline control points and knots.

Decomposition module
The first module ( Figure 2) decomposes the point cloud P into a set of segments such that each segment can be reliably approximated by one of the abovementioned surface patch types. To this end, the module first embeds the input points into a representation space used to reveal such segments. As discussed in Section 4, the representations are learned using metric learning, such that points belonging to the same patch are embedded close to each other, forming a distinct cluster.
Embedding network. To learn these point-wise representations, we incorporate edge convolution layers (EdgeConv) from DGCNN [23]. Each EdgeConv layer performs a graph convolution to extract a representation of each point with an MLP on the input features of its neighborhood. The neighborhoods are dynamically defined via nearest neighbors in the input feature space. We stack 3 EdgeConv layers, each extracting a 256-D representation per point. A max-pooling layer is also used to extract a global 1024-D representation for the whole point cloud. The global representation is tiled and concatenated with the representations from all three EdgeConv layers to form intermediate point-wise (1024 + 256)-D representations Q = {q i } encoding both local and global shape information. We found that a global representation is useful for our task, since it captures the overall geometric shape structure, which is often correlated with the number and type of expected patches. This representation is then transformed through fully connected layers and ReLUs, and finally normalized to unit length to form the point-wise embedding Y = {y i } N i=1 (128-D) lying on the unit hypersphere. Clustering. A mean-shift clustering procedure is applied on the point-wise embedding to discover segments. The advantage of mean-shift clustering over other alternatives (e.g., k-means or mixture models) is that it does not require the target number of clusters as input. Since different shapes may comprise different numbers of patches, we let mean-shift produce a cluster count tailored for each input. Like the pixel grouping of [9], we implement mean-shift iterations as differentiable recurrent functions, allowing back-propagation. Specifically, we initialize mean-shift by setting all points as seeds z Then, each mean-shift iteration t updates each point's embedding on the unit hypersphere: where the pairwise similarities g(z (t) i , y j ) are based on a von Mises-Fisher kernel with bandwidth β: g(z i , y j ) = exp(z T i y j /β 2 ) (iteration index dropped for clarity). The embeddings are normalized to unit vectors after each iteration. The bandwidth for each input point cloud is set as the average distance of each point to its 150 th neighboring point in the embedding space [17]. The mean-shift iterations are repeated until convergence (this occurs around 50 iterations in our datasets). We extract the cluster centers using non-maximum suppression: starting with the point with highest density, we remove all points within a distance β, then repeat. Points are assigned to segments based on their nearest cluster center. The point memberships are stored in a matrix W, where W[i, k] = 1 means point i belongs to segment k, and 0 means otherwise. These memberships are passed to the fitting module to determine a parametric patch for each segment.
Segment Classification. To classify each segment, we pass the per-point representation q i , encoding local and global geometry, through fully connected layers and ReLUs, followed by a softmax for a per-point probability P (t i = l), where l is a patch type (i.e., sphere, plane, cone, cylinder, open/closed B-spline patch). The segment's patch type is determined through majority voting over all its points.

Fitting module
The second module ( Figure 2) aims to fit a parametric patch to each predicted segment of the point cloud. To this end, depending on the segment type, the module estimates the shape parameters of the surface patch. Basic primitives. Following Li et al . [11], we estimate the shape of basic primitives with least-squares fitting. This includes center and radius for spheres; normal and offset for planes; center, direction and radius for cylinders; and apex, direction and angle for cones. We also follow their approach to define primitive boundaries.
B-Splines. We found that analytically parametrizing a set of points as a spline patch, in the presence of noise, sparsity and non-uniform sampling, is highly error-prone. Instead, predicting control points directly with a neural network can provide robust results. We propose a neural network SplineNet, that inputs points of a segment, and outputs a fixed size control-point grid. A stack of three EdgeConv layers produce point-wise representations concatenated with a global representation extracted from a max-pooling layer (as for decomposition, but weights are not shared). This equips each point i in a segment with a 1024-D representation φ i . A segment's representation is produced by max-pooling over its points, as identified through the membership matrix W extracted previously: Finally, two fully-connected layers with ReLUs transform φ k to an initial set of 20 × 20 control points C unrolled into a 1200-D output vector. For a segment with a small number of points, we upsample the input segment (with nearest neighbor interpolation) to 1600 points. This significantly improved performance for such segments ( Table 2). For closed B-spline patches, we wrap the first row/column of control points. Note that the network parameters to produce open and closed B-splines are not shared. Figure 5 visualizes some predicted B-spline surfaces.

Post-processing module
SplineNet produces an initial patch surface that approximates the points belonging to a segment. However, patches might not entirely cover the input point cloud, and boundaries between patches are not necessarily well-aligned. Further, the resolution of the initial control point grid (20 × 20) can be further adjusted to match the desired surface resolution. As a post-processing step, we perform an optimization to produce more coherent B-spline surfaces that better cover the input point cloud, and also refine the control points to achieve a prescribed fitting tolerance. Optimization. We first create a grid of 40 × 40 points on the initial B-spline patch by uniformly sampling its UV parameter space. We tessellate them into quads. Then we perform a maximal matching between the quad vertices and the input points of the segment, using the Hungarian algorithm with L2 distance costs. We then perform an as-rigid-as-possible (ARAP) [19] deformation of the tessellated surface towards the matched input points. ARAP is an iterative, detail-preserving method to deform a mesh so that selected vertices (pivots) achieve targets position, while promoting locally rigid transformations in one-ring neighborhoods (instead of arbitrary ones causing shearing/stretching). We use the boundary vertices of the patch as pivots so that they move close to their matched input points. Thus, we promote coverage of input points by the B-spline patches.
After the deformation, the control points are re-estimated with least-squares [13].
Refinement of B-spline control points. After the above optimization, we again perform a maximal matching between the quad vertices and the input points of the segment. As a result, the input segment points acquire 2D parameter values in the patch's UV parameter space, which can be used to re-fit any other grid of control points [13]. In our case, we iteratively upsample the control point grid by a factor of 2 until a fitting tolerance, measured via Chamfer distance, is achieved. If the tolerance is satisfied by the initial control point grid, we can similarly downsample it iteratively. In our experiments, we set the fitting tolerance to 5 × 10 −4 . In Figure 5 we show the improvements from the post-processing step.

Training
To train the neural decomposition and fitting modules of our architecture, we use supervisory signals from a dataset of 3D shapes modeled through a combination of basic geometric primitives and B-splines. Below we describe the dataset, then we discuss the loss functions and the steps of our training procedure.

Dataset
The ABC dataset [8] provides a large source of 3D CAD models of mechanical objects whose file format stores surface patches and modeling operations that designers used to create them. Since our method is focused on predicting surface patches, and in particular B-spline patches, we selected models from this dataset that contain at least one B-spline surface patch. As a result, we ended up with a dataset of 32K models (24K, 4K, 4K train, test, validation sets respectively). We call this ABCPartsDataset. All shapes are centered in the origin and scaled so they lie inside unit cube. To train SplineNet, we also extract 32K closed and open B-spline surface patches each from ABC dataset and split them into 24K, 4K, 4K train, test, validation sets respectively. We call this SplineDataset. We report the average number of different patch types in supplementary material. Preprocessing. Based on the provided metadata in ABCPartsDataset, each shape can be rendered based on the collection of surface patches and primitives it contains (Figure 4). Since we assume that the inputs to our architecture are point clouds, we first sample each shape with 10K points randomly distributed on the shape surface. We also add noise in a uniform range [−0.01, 0.01] along the normal direction. Normals are also perturbed with random noise in a uniform range of [−3, 3] degrees from their original direction.

Loss functions
We now describe the different loss functions used to train our neural modules. The training procedure involving their combination is discussed in Section 4.3.
Embedding loss. To discover clusters of points that correspond well to surface patches, we use a metric learning approach. The point-wise representations Z produced by our decomposition module after mean-shift clustering are learned such that point pairs originating from the same surface patch are embedded close to each other to favor a cluster formation. In contrast, point pairs originating from different surface patches are pushed away from each other. Given a triplet of points (a, b, c), we use the triplet loss to learn the embeddings: where τ the margin is set to 0.9. Given a triplet set T S sampled from each point set S from our dataset D, the embedding objective sums the loss over triplets: Segment classification loss. To promote correct segment classifications according to our supported types, we use the cross entropy loss: L class = − i∈S log(p t i ) where p i t is the probability of the i th point of shape S belonging to its ground truth type t, computed from our segment classification network.
Control point regression loss. This loss function is used to train SplineNet. As discussed in Section 3.2, SplineNet produces 20 × 20 control points per B-spline patch. We include a supervisory signal for this control point grid prediction. One issue is that B-spline patches have a variable number of control points in our dataset. Hence we reparametrize each patch by first sampling M = 3600 points and estimating a new 20 × 20 reparametrization using least-squares fitting [10,13], as seen in the Figure 3. In our experiments, we found that this standardization produces no practical loss in surface reconstructions our dataset. Finally, our reconstruction loss should be invariant to flips or swaps of control points grid in u and v directions. Hence we define a loss that is invariant to such permutations: where S (b) is the set of B-spline patches from shape S, C k is the predicted control point grid for patch s k (|C k | = 400 control points) , π(Ĉ k ) is permutations of the ground-truth control points from the set Π of 8 permutations for open and 160 permutations for closed B-spline.
Laplacian loss. This loss is also specific to B-Splines using SplineNet. For each ground-truth B-spline patch, we uniformly sample ground truth surface, and measure the surface Laplacian capturing its second-order derivatives. We also uniformly sample the predicted patches and measure their Laplacians. We then establish Hungarian matching between sampled points in the ground-truth and predicted patches, and compare the Laplacians of the ground-truth pointsr m and corresponding predicted ones r n to improve the agreement between their derivatives as follows: where L(·) is the Laplace operator on patch points, and M = 1600 point samples.
Patch distance loss. This loss is applied to both basic primitive and B-splines patches. Inspired by [11], the loss measures average distances between predicted primitive patch s k and uniformly sampled points from the ground truth patch as: where K S is the number of predicted patches for shape S, Mŝ k is number of sampled points r n from ground patchŝ k , D 2 (r n , s k ) is the squared distance from r n to the predicted primitive patch surface s k . These distances can be computed analytically for basic primitives [11]. For B-splines, we use an approximation based on Chamfer distance between sample points.

Training procedure
One possibility for training is to start it from scratch using a combination of all losses. Based on our experiments, we found that breaking the training procedure into the following steps leads to faster convergence and to better minima: -We first pre-train the neural networks of the decomposition module using ABCPartsDataset with the sum of embedding and classification losses: L emb + L class . Skipping either of these losses makes the decomposition of point cloud and classification impossible.
-We then pre-train the SplineNet using SplineDataset for control point prediction exclusively on B-spline patches using L cp + L lap + L dist . We note that we experimented training the B-spline patch prediction only with the patch distance loss L dist but had worse performance. Using both the L cp and L lap loss yielded better predictions as shown in Table 2. -We then jointly train the decomposition and fitting module end-to-end with all the losses. To allow backpropagation from the primitives and B-splines fitting to the embedding network, the mean shift clustering is implemented as a recurrent module (Equation 2). For efficiency, we use 5 mean-shift iterations during training. It is also important to note that during training, Equation 3 uses soft point-to-segment memberships, which enables backpropagation from the fitting module to the decomposition module and improves reconstructions. The soft memberships are computed based on the point embeddings {z i } (after the mean-shift iterations) and cluster center embedding {z k } as follows: Implementation details. We use the Adam optimizer for training with learning rate 10 −2 and reducing it by the factor of two when the hold-out validation performance saturates. For the EdgeConv layers of the decomposition module, we use 80 nearest neighbors, and 10 for the ones in the SplineNet. For pre-training SplineNet on SplineDataset, we randomly sample 2k points from the B-spline surface patches. Since ABC shapes are arbitrarily oriented, we perform PCA on them and align the direction corresponding to the smallest eigenvalue to the +x axis. This procedure does not guarantee alignment, but helps since it reduces the orientation variability in the dataset. For pre-training decomposition module and SplineNet we augment the training shapes represented as points by using random jitters, scaling, rotation and point density. More details are provided in the supplementary material.

Experiments
Our experiments compare our approach to alternatives in three parts: (a) evaluation of the quality of segmentation and segment classification (Section 5.1), (b) evaluation of B-spline patch fitting, since it is a major contribution of our work (Section 5.2), and (c) evaluation of overall reconstruction quality (Section 5.3). We include evaluation metrics and results for each of the three parts next.

Segmentation and labeling evaluation
Evaluation metrics. We use the following metrics for evaluating the point cloud segmentation and segment labeling based on the test set of ABCPartsDataset: -Segmentation mean IOU ("seg mIOU"): this metric measures the similarity of the predicted segments with ground truth segments. Given the ground-truth point-to-segment membershipsŴ for an input point cloud, and the predicted ones W, we measure: 1   Table 1: Segmentation and primitive type prediction on ABCParts-Dataset. We compare ParSeNet with nearest neighbor (NN), RANSAC [14], and SPFN [11]. We show results with points (p) and points and normals (p+n) as input. The last row indicates our method with end-to-end training.
-Segment labeling IOU ("label mIOU"): this metric measures the classification accuracy of primitive type prediction averaged over segments: 1 K K k=1 I t k =t k where t k andt k is the predicted and ground truth primitive type respectively for k th segment and I is an indicator function.
We use Hungarian matching to find correspondences between predicted segments and ground-truth segments.  Table 2: Ablation study for B-spline fitting. The error is measured using Chamfer Distance (CD is scaled by 100). The acronyms "cp": control-points regression loss, "dist" means patch distance loss, and "lap" means Laplacian loss. We also include the effect of post-processing optimization "opt". We report performance with and without upsampling ("ups") for open and closed B-splines.
Comparisons. We first compare our method with a nearest neighbor (NN) baseline: for each test shape, we find its most similar shape from the training set using Chamfer distance. Then for each point on the test shape, we transfer the labels and primitive type from its closest point in R 3 on the retrieved shape.
We also compare against efficient RANSAC algorithm [14]. The algorithm only handles basic primitives (cylinder, cone, plane, sphere, and torus), and offers poor reconstruction of B-splines patches in our dataset. Efficient RANSAC requires per point normals, which we provide as the ground-truth normals. We run RANSAC 3 times and report the performance with best coverage.
We then compare against the supervised primitive fitting (SPFN) approach [11]. Their approach produces per point segment membership, and their network is trained to maximize relaxed IOU between predicted membership and ground truth membership, whereas our approach uses learned point embeddings and clustering with mean-shift clustering to extract segments. We train SPFN network using their provided code on our training set using their proposed losses. We note that we include B-splines patches in their supported types. We train their network in two input settings: (a) the network takes only point positions as input, (b) it takes point and normals as input. We train our ParSeNet on our training set in the same two settings using our loss functions.
The performance of the above methods are shown in Table 1. The lack of B-spline fitting hampers the performance of RANSAC. The SPFN method with points and normals as input performs better compared to using only points as input. Finally, ParSeNet with only points as input performs better than all other alternatives. We observe further gains when including point normals in the input. Training ParSeNet end-to-end gives 13.13% and 8.66% improvement in segmentation mIOU and label mIOU respectively over SPFN with points and normals as input. The better performance is also reflected in Figure 4, where our method reconstructs patches that correspond to more reasonable segmentations compared to other methods. In the supplementary material we include an evaluation on all the methods on the TraceParts dataset [11], where we also outperform prior work.

B-Spline fitting evaluation
Evaluation metrics. We evaluate the quality of our predicted B-spline patches by computing the Chamfer distance between densely sampled points on the ground-truth B-spline patches and densely sampled points on predicted patches. Points are uniformly sampled based on the 2D parameter space of the patches. We use 2K samples. We use the test set of our SplineDataset for evaluation.
Ablation study. We evaluate the training of SplineNet using various loss functions while giving 700 points per patch as input, in Table 2. All losses contribute to the improvements in performance. Table 2 also shows that upsampling is effective for closed splines. Figure 5 shows the effect of 1) optimization to improve the alignment of patches and 2) the adjustment of resolution in the control point grid. We show more experiments to evaluate the robustness of SplineNet in the supplementary material.

Reconstruction evaluation
Evaluation metrics. Given a point cloud P = {p i } N i=1 , ground-truth patches {∪ K k=1ŝ k } and predicted patches {∪ K k=1 s k } for a test shape in ABCParts-Dataset, we evaluate the patch-based surface reconstruction using the following: -Residual error ("res") measures the average distance of input points from the predicted primitives following [11]: L dist = K k=1 1 M k n∈ŝ k D(r n , s k ) where K is the number of segments, M k is number of sampled points r n from ground patchŝ k , D(r n , s k ) is the distance of r n from predicted primitive patch s k . -P-coverage ("P-cover") measures the coverage of predicted surface by the input surface also following [11]: 1 N N i=1 I min K k=1 D(p i , s k ) < ( = 0.01).  Table 3: Reconstruction results on ABCPartsDataset. ParSeNet outperforms efficient RANSAC [14], and SPFN [11] using point (p) and points and normal (p+n) as input. The last two rows shows our method with end-to-end training and post-process optimization. We report the residual error (res) on all, geometric and spline primitives, as well as the coverage metric.
We note that we use the matched segments after applying Hungarian matching algorithm, as in Section 5.1, to compute these metrics.
Comparisons. We report the performance of RANSAC for geometric primitive fitting tasks. Note that RANSAC produces a set of geometric primitives, along with their primitive type and parameters, which we use to compute the above metrics. Here we compare with the SPFN network [11] trained on our dataset using their proposed loss functions. We augment their per point primitive type prediction to also include open/closed B-spline type. Then for classified segments as B-splines, we use our SplineNet to fit B-splines. For segments classified as geometric primitives, we use their geometric primitive fitting algorithm. Table 3 reports the performance of our method, SPFN and RANSAC. The residual error and P-coverage follows the trend of segmentation metrics shown in Table 1. Interestingly, our method outperforms SPFN even for geometric primitive predictions (even without considering B-splines and our adaptation). Using points and normals, along with joint end-to-end training, and post-processing optimization offers the best performance for our method by giving 47.64% and 50% reduction in relative error in comparison to SPFN and RANSAC respectively.

Conclusion
We presented a method to reconstruct point clouds by predicting geometric primitives and surface patches common in CAD design. Our method effectively marries 3D deep learning with CAD modeling practices. Our architecture predictions are editable and interpretable. Modelers can refine our results based on standard CAD modeling operations for patch manipulation and deformation. We believe that our method can further inspire future work on editable and interpretable reconstruction. Improving patch boundaries by learning to trim them, and including post-processing in the architecture are also useful extensions.