internal DSObject RestoreProperDSType(DSObject d) { Geometry g = Geometry.cast(d); if (g != null) return RestoreProperType(g); Vector v = Vector.cast(d); if (v != null) return v; CoordinateSystem cs = CoordinateSystem.cast(d); if (cs != null) return cs; return d; }