  We present D$^2$CSG, a neural model composed of two dual and complementary
network branches, with dropouts, for unsupervised learning of compact
constructive solid geometry (CSG) representations of 3D CAD shapes. Our network
is trained to reconstruct a 3D shape by a fixed-order assembly of quadric
primitives, with both branches producing a union of primitive intersections or
inverses. A key difference between D$^2$CSG and all prior neural CSG models is
its dedicated residual branch to assemble the potentially complex shape
complement, which is subtracted from an overall shape modeled by the cover
branch. With the shape complements, our network is provably general, while the
weight dropout further improves compactness of the CSG tree by removing
redundant primitives. We demonstrate both quantitatively and qualitatively that
D$^2$CSG produces compact CSG reconstructions with superior quality and more
natural primitives than all existing alternatives, especially over complex and
high-genus CAD shapes.
