Index: cpp/frams/genetics/fS/fS_general.h
===================================================================
--- cpp/frams/genetics/fS/fS_general.h	(revision 1017)
+++ cpp/frams/genetics/fS/fS_general.h	(revision 1030)
@@ -43,8 +43,8 @@
 #define FRICTION "f"
 #define STIFFNESS "st"
-#define SIZE "s"
-#define SIZE_X "x"
-#define SIZE_Y "y"
-#define SIZE_Z "z"
+#define SCALE "s"
+#define SCALE_X "x"
+#define SCALE_Y "y"
+#define SCALE_Z "z"
 #define ROT_X "tx"
 #define ROT_Y "ty"
@@ -83,7 +83,7 @@
 const int JOINT_COUNT = JOINTS.length();
 const string MODIFIERS = "IFS";
-const char SIZE_MODIFIER = 's';
-const vector<string> PARAMS {INGESTION, FRICTION, ROT_X, ROT_Y, ROT_Z, RX, RY, RZ, SIZE, SIZE_X, SIZE_Y, SIZE_Z};
-const vector<string> SIZE_PARAMS {SIZE, SIZE_X, SIZE_Y, SIZE_Z};
+const char SCALE_MODIFIER = 's';
+const vector<string> PARAMS {INGESTION, FRICTION, ROT_X, ROT_Y, ROT_Z, RX, RY, RZ, SCALE, SCALE_X, SCALE_Y, SCALE_Z};
+const vector<string> SCALE_PARAMS {SCALE, SCALE_X, SCALE_Y, SCALE_Z};
 
 /** @name Default values of node parameters*/
@@ -247,4 +247,13 @@
 struct GenotypeParams{
 	double modifierMultiplier;	// Every modifier changes the underlying value by this multiplier
+	/// When calculating the distance between parts, the internal result is a range of numbers
+	/// distanceTolerance is the maximal allowed size of this range
+	double distanceTolerance;
+	/// Used for deriving density for MeshBuilder
+	double relativeDensity;
+	///
+	bool turnWithRotation;
+	///
+	double paramMutationStrength;
 };
 
@@ -265,5 +274,7 @@
 	Part *part;     /// A part object built from node. Used in building the Model
 	int partCodeLen; /// The length of substring that directly describes the corresponding part
-	GenotypeParams genotypeParams;
+	static std::map<string, double> minValues;	/// Min parameter values
+	static std::map<string, double> defaultValues;	/// Default parameter values
+	static std::map<string, double> maxValues;	/// Max parameter values
 
 	vector<Node *> children;    /// Vector of all direct children
@@ -273,15 +284,13 @@
 	void prepareParams();
 
-	double getDistance();
-
 	void cleanUp();
 
+	/// Get part's  rotation
 	Pt3D getRotation();
 
+	/// Get the rotation of vector
 	Pt3D getVectorRotation();
 
-	bool isPartSizeValid();
-
-	bool hasPartSizeParam();
+	bool isPartScaleValid();
 
 	/**
@@ -362,11 +371,9 @@
 
 public:
-	static std::map<string, double> minValues;
-	static std::map<string, double> defaultValues;
-	static std::map<string, double> maxValues;
 	char joint = DEFAULT_JOINT;           /// Set of all joints
-	Part::Shape partType;  /// The type of the part
+	Part::Shape partShape;  /// The type of the part
 	State *state = nullptr; /// The phenotypic state that inherits from ancestors
 	std::map<string, double> params; /// The map of all the node params
+	GenotypeParams genotypeParams; /// Parameters that affect the whole genotype
 
 	Node(Substring &genotype, Node *parent, GenotypeParams genotypeParams);
@@ -381,8 +388,8 @@
 
 	/**
-	 * Calculate the effective size of the part (after applying all multipliers and params)
-	 * @return The effective size
-	 */
-	void calculateSize(Pt3D &scale);
+	 * Calculate the effective scale of the part (after applying all multipliers and params)
+	 * @return The effective scales
+	 */
+	void calculateScale(Pt3D &scale);
 
 	/**
@@ -404,4 +411,7 @@
 	double getParam(const string &key);
 	double getParam(const string &key, double defaultValue);
+
+	/// Calculate distance between the part its parent
+	double calculateDistanceFromParent();
 };
 
@@ -439,6 +449,5 @@
 
 
-	static int precision;
-	static bool TURN_WITH_ROTATION;
+	static int precision; /// Number of decimal places for numbers in genotype
 
 	/**
@@ -450,4 +459,5 @@
 	~fS_Genotype();
 
+	/// Calculate the State field for all the nodes
 	void getState(bool calculateLocation);
 
@@ -495,5 +505,5 @@
 
 	/**
-	 * Check if sizes of all parts in genotype are valid
+	 * Check if scales of all parts in genotype are valid
 	\retval error_position 1-based
 	\retval 0 when all part sizes are valid
