There is a lot of confusion by users of the gbXML schema as to what the difference is between the PlanarGeometry and ShellGeometry elements.
PlanarGeometry, as the name implies, defines a flat, 2-dimensional surface. It includes a child element, PolyLoop, that includes all of the xyz points of a surface that is located in just one plane. Use the PlanarGeometry element to define a three dimensional polygon that lies on a plane, and has no self-intersection.
ShellGeometry can define an enclosed water-tight shell (in 3D). It includes the ClosedShell child element that defines individual 3D enclosures. ShellGeometry is used to define a union of closed shells, where there is no intersection of any two of the given shells.