Index: /cpp/README.txt
===================================================================
--- /cpp/README.txt	(revision 1055)
+++ /cpp/README.txt	(revision 1056)
@@ -38,2 +38,13 @@
       +- vm            - virtual machine programming: FramScript grammar (lex and yacc/bison)
           +- classes   - C++ interfaces and implementations of basic FramScript objects
+
+
+______________________ Source formatting guidelines _____________________
+
+File names: all letters are lower case, with '-' as word separator if needed.
+Indents: tab
+Scopes
+{
+	ClassName variable_lower_case;
+	variable_lower_case.camelCaseMathodOrFunction();
+}
Index: /cpp/frams/genetics/fS/fS_general.cpp
===================================================================
--- /cpp/frams/genetics/fS/fS_general.cpp	(revision 1055)
+++ /cpp/frams/genetics/fS/fS_general.cpp	(revision 1056)
@@ -12,5 +12,5 @@
 #include "../genooperators.h"
 #include "common/nonstd_math.h"
-#include "../../model/geometry/part_distance_estimator.h"
+#include <frams/model/geometry/part_distance_estimator.h>
 
 int fS_Genotype::precision = 4;
@@ -482,5 +482,5 @@
 	Pt3D scale;
 	calculateScale(scale);
-	return GeometryUtils::isSolidPartScaleValid(partShape, scale);
+	return GeometryUtils::isSolidPartScaleValid(partShape, scale, true); //2020-12: mac->JS: I set the last argument to true because this is how the original code worked, but I think it should be ensureCircleSection?
 }
 
@@ -910,8 +910,6 @@
 	Part *parentTmpPart = PartDistanceEstimator::buildTemporaryPart(parent->partShape, parentScale, parent->getRotation());
 
-	double result;
 	tmpPart->p = state->v;
-	result = PartDistanceEstimator::calculateDistance(*tmpPart, *parentTmpPart, genotypeParams.distanceTolerance, genotypeParams.relativeDensity);
-
+	double result = PartDistanceEstimator::calculateDistance(*tmpPart, *parentTmpPart, genotypeParams.distanceTolerance, genotypeParams.relativeDensity);
 
 	delete tmpPart;
Index: /cpp/frams/genetics/fS/fS_oper.cpp
===================================================================
--- /cpp/frams/genetics/fS/fS_oper.cpp	(revision 1055)
+++ /cpp/frams/genetics/fS/fS_oper.cpp	(revision 1056)
@@ -339,5 +339,5 @@
 	{
 		geno.getState(false);
-		mutateScaleParam(newNode, SCALE_X, true);
+		mutateScaleParam(newNode, SCALE_X, true); //TODO 2020-12: mac->JS: should be true or rather ensureCircleSection?
 		mutateScaleParam(newNode, SCALE_Y, true);
 		mutateScaleParam(newNode, SCALE_Z, true);
Index: /cpp/frams/genetics/fS/fS_oper.h
===================================================================
--- /cpp/frams/genetics/fS/fS_oper.h	(revision 1055)
+++ /cpp/frams/genetics/fS/fS_oper.h	(revision 1056)
@@ -142,10 +142,10 @@
 
 	/**
-	 * Change the value of the scale parameter by given multiplier
-	 * Do not change the value if any of the scale restrictions is not satisfied
+	 * Change the value of the scale parameter by a given multiplier.
+	 * Do not change the value if any of the scale restrictions is not satisfied.
 	 * @param paramKey
 	 * @param multiplier
 	 * @param ensureCircleSection
-	 * @return True if the parameter value was change, false otherwise
+	 * @return True if the parameter value was changed, false otherwise
 	 */
 	bool mutateScaleParam(Node *node, string key, bool ensureCircleSection);
Index: /cpp/frams/model/geometry/geometryutils.cpp
===================================================================
--- /cpp/frams/model/geometry/geometryutils.cpp	(revision 1055)
+++ /cpp/frams/model/geometry/geometryutils.cpp	(revision 1056)
@@ -369,5 +369,5 @@
 }
 
-double GeometryUtils::calculateSolidVolume(Part * part)
+double GeometryUtils::calculateSolidVolume(const Part * part)
 {
 	double radiiProduct = part->scale.x * part->scale.y * part->scale.z;
@@ -386,5 +386,5 @@
 }
 
-bool GeometryUtils::isSolidPartScaleValid(const Part::Shape &partShape, const Pt3D &scale)
+bool GeometryUtils::isSolidPartScaleValid(const Part::Shape &partShape, const Pt3D &scale, bool ensureCircleSection)
 {
 	Part *tmpPart = new Part(partShape);
@@ -402,8 +402,11 @@
 		return false;
 
-	if (partShape == Part::Shape::SHAPE_ELLIPSOID && scale.maxComponentValue() != scale.minComponentValue()) // When any radius has a different value than the others
-		return false;
-	if (partShape == Part::Shape::SHAPE_CYLINDER && scale.y != scale.z) // If base radii have different values
-		return false;
+	if (ensureCircleSection)
+	{
+		if (partShape == Part::Shape::SHAPE_ELLIPSOID && scale.maxComponentValue() != scale.minComponentValue()) // Any radius has a different value than the other ones?
+			return false;
+		if (partShape == Part::Shape::SHAPE_CYLINDER && scale.y != scale.z) // Base radii have different values?
+			return false;
+	}
 	return true;
 }
Index: /cpp/frams/model/geometry/geometryutils.h
===================================================================
--- /cpp/frams/model/geometry/geometryutils.h	(revision 1055)
+++ /cpp/frams/model/geometry/geometryutils.h	(revision 1056)
@@ -178,6 +178,6 @@
 	double ellipsePerimeter(const double a, const double b);
 
-	double calculateSolidVolume(Part *part);
-	bool isSolidPartScaleValid(const Part::Shape &partShape, const Pt3D &scale);
+	double calculateSolidVolume(const Part *part);
+	bool isSolidPartScaleValid(const Part::Shape &partShape, const Pt3D &scale, bool ensureCircleSection);
 
     /**
Index: /cpp/frams/model/geometry/part_distance_estimator.h
===================================================================
--- /cpp/frams/model/geometry/part_distance_estimator.h	(revision 1055)
+++ /cpp/frams/model/geometry/part_distance_estimator.h	(revision 1056)
@@ -7,4 +7,5 @@
 
 #include "frams/model/geometry/meshbuilder.h"
+#include <cmath>
 
 class PartDistanceEstimator
@@ -54,9 +55,9 @@
 	static double calculateDistance(Part tmpPart1, Part tmpPart2, double distanceTolerance, double relativeDensity)
 	{
-		/// tmpPart1 and tmpPart2 are copied for purpose and should not be passed as reference
-		/// This function can change some of the properties of those parts
+		/// tmpPart1 and tmpPart2 are copied for purpose and should not be passed as reference.
+		/// This function can change some of the properties of those parts.
 		/// tmpPart1 will be approximated by surface points.
-		/// The collision between the parts is detected when any of those points is inside tmpPart2
-		/// If tmpPart1 and tmpPart2 are swapped, the calculated distance may slightly differ
+		/// The collision between the parts is detected when any of these points is inside tmpPart2.
+		/// If tmpPart1 and tmpPart2 are swapped, the calculated distance may slightly differ.
 		Pt3D directionVersor = tmpPart1.p - tmpPart2.p;
 		directionVersor.normalize();
