Index: src/Actions/FillAction/FillRegularGridAction.def
===================================================================
--- src/Actions/FillAction/FillRegularGridAction.def	(revision 7951b9d3df66de816abcb21f059cd10414a9d20a)
+++ src/Actions/FillAction/FillRegularGridAction.def	(revision 2382d72bc0cc499741c93764b5eb9ecfa0eff0e4)
@@ -15,5 +15,5 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
-#define paramtypes (Vector)(Vector)(double)(double)(double)(double)(bool)
+#define paramtypes (std::vector< unsigned int >)(Vector)(double)(double)(double)(double)(bool)
 #define paramtokens ("mesh-size")("mesh-offset")("min-distance")("tesselation-radius")("random-atom-displacement")("random-molecule-displacement")("DoRotate")
 #define paramdescriptions ("number of points per axis")("offset to start of partition, must be in [0,1)")("Minimum distance to other atoms")("radius of rolling sphere in tesselating selected molecule's surfaces")("magnitude of random atom displacement")("magnitude of random molecule displacement")("whether to rotate or not")
Index: src/Filling/Mesh/CubeMesh.cpp
===================================================================
--- src/Filling/Mesh/CubeMesh.cpp	(revision 7951b9d3df66de816abcb21f059cd10414a9d20a)
+++ src/Filling/Mesh/CubeMesh.cpp	(revision 2382d72bc0cc499741c93764b5eb9ecfa0eff0e4)
@@ -41,7 +41,4 @@
 CubeMesh::CubeMesh(const Vector &counts, const Vector &offset, const RealSpaceMatrix &M)
 {
-  RealSpaceMatrix partition;
-  int n[NDIM];
-
 #ifndef NDEBUG
   for (size_t i=0;i<NDIM;++i) {
@@ -49,8 +46,39 @@
         "CubeMesh::CubeMesh() - offset coordinates must be in [0,1) but offset["
         +toString(i)+"] is "+toString(offset[i])+".");
-    ASSERT(counts[i] != 0.,
-        "CubeMesh::CubeMesh() - counts["+toString(i)+"] must be != "+toString(counts[i])+".");
+    ASSERT(counts[i] == (int)counts[i],
+        "CubeMesh::CubeMesh() - counts["+toString(i)+"] must be integer: != "+toString(counts[i])+".");
   }
 #endif
+
+  std::vector< unsigned int> size_counts;
+  for (size_t i=0;i<NDIM;++i) {
+    size_counts.push_back( (int)counts[i] );
+  }
+  init(size_counts, offset, M);
+}
+
+/** Constructor for class CubeMesh.
+ *
+ * Here, we generate nodes homogeneously distributed over a cuboid.
+ *
+ * \a offset shifts the coordinates, e.g. if counts = 2, we would set nodes at
+ * 0 and 0.5 with offset = 0 and 0.4999... and 0.9999.. with offset = 0.999...
+ *
+ * @param counts number of points per axis
+ * @param offset offset Vector (coordinates in [0,1))
+ * @param M matrix to transform the default cuboid from (0,0,0) to (1,1,1).
+ */
+CubeMesh::CubeMesh(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M)
+{
+  ASSERT(counts.size() == 3,
+      "CubeMesh::CubeMesh() - counts does not have three but "
+      +toString(counts.size())+" entries.");
+
+  init(counts, offset, M);
+}
+
+void CubeMesh::init(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M)
+{
+  RealSpaceMatrix partition;
 
   partition.setZero();
@@ -59,6 +87,6 @@
   LOG(1, "INFO: partition is " << partition << ".");
 
-
   // go over [0,1]^3 filler grid
+  int n[NDIM];
   for (n[0] = 0; n[0] < counts[0]; n[0]++)
     for (n[1] = 0; n[1] < counts[1]; n[1]++)
Index: src/Filling/Mesh/CubeMesh.hpp
===================================================================
--- src/Filling/Mesh/CubeMesh.hpp	(revision 7951b9d3df66de816abcb21f059cd10414a9d20a)
+++ src/Filling/Mesh/CubeMesh.hpp	(revision 2382d72bc0cc499741c93764b5eb9ecfa0eff0e4)
@@ -25,6 +25,8 @@
 public:
   CubeMesh(const Vector &counts, const Vector &offset, const RealSpaceMatrix &M);
+  CubeMesh(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M);
   virtual ~CubeMesh();
 
+  void init(const std::vector< unsigned int > &counts, const Vector &offset, const RealSpaceMatrix &M);
 };
 
