Index: cpp/frams/model/model.cpp
===================================================================
--- cpp/frams/model/model.cpp	(revision 988)
+++ cpp/frams/model/model.cpp	(revision 999)
@@ -17,5 +17,5 @@
 }
 
-void Model::init(ShapeType sh)
+void Model::init(ShapeType shtype)
 {
 	partmappingchanged = 0;
@@ -29,11 +29,11 @@
 	f0map = 0;
 	f0genoknown = 1;
-	shape = SHAPE_UNKNOWN;
-	declared_shape = sh;
-}
-
-void Model::declareShapeType(ShapeType sh)
-{
-	declared_shape = sh;
+	shapetype = SHAPETYPE_UNKNOWN;
+	declared_shapetype = shtype;
+}
+
+void Model::declareShapeType(ShapeType shtype)
+{
+	declared_shapetype = shtype;
 }
 
@@ -56,6 +56,6 @@
 	geno = mod.geno;
 	f0genoknown = 0;
-	shape = mod.shape;
-	declared_shape = mod.declared_shape;
+	shapetype = mod.shapetype;
+	declared_shapetype = mod.declared_shapetype;
 	startenergy = mod.startenergy;
 	modelfromgenotype = mod.modelfromgenotype;
@@ -117,5 +117,5 @@
 	:autobuildmaps(buildmaps)
 {
-	init(mod.declared_shape);
+	init(mod.declared_shapetype);
 	open(_using_checkpoints, _is_checkpoint);
 	internalCopy(mod);
@@ -169,5 +169,5 @@
 	delMap();
 	delF0Map();
-	init(declared_shape);
+	init(declared_shapetype);
 	geno = Geno();
 	f0geno = Geno();
@@ -340,8 +340,8 @@
 	f0warnposition = -1;
 	MultiMap *convmap = autobuildmaps ? new MultiMap() : NULL;
-	if (declared_shape == SHAPE_UNKNOWN)
+	if (declared_shapetype == SHAPETYPE_UNKNOWN)
 		f0geno = geno.getConverted(Geno::F0_FORMAT_LIST, convmap, using_checkpoints);
 	else
-		f0geno = geno.getConverted(genoFormatForShapeType(declared_shape), convmap, using_checkpoints);
+		f0geno = geno.getConverted(genoFormatForShapeType(declared_shapetype), convmap, using_checkpoints);
 	f0genoknown = 1;
 	if (f0geno.isInvalid())
@@ -351,5 +351,5 @@
 		return;
 	}
-	if (declared_shape == SHAPE_UNKNOWN)
+	if (declared_shapetype == SHAPETYPE_UNKNOWN)
 		declareShapeType(shapeTypeForGenoFormat(f0geno.getFormat()));
 	SString f0txt = f0geno.getGenes();
@@ -560,7 +560,7 @@
 	switch (st)
 	{
-	case SHAPE_BALL_AND_STICK:
+	case SHAPETYPE_BALL_AND_STICK:
 		return "0";
-	case SHAPE_SOLIDS:
+	case SHAPETYPE_SOLIDS:
 		return "0s";
 	default:
@@ -572,9 +572,9 @@
 {
 	if (format == "0")
-		return SHAPE_BALL_AND_STICK;
+		return SHAPETYPE_BALL_AND_STICK;
 	else if (format == "0s")
-		return SHAPE_SOLIDS;
+		return SHAPETYPE_SOLIDS;
 	else
-		return SHAPE_UNKNOWN;
+		return SHAPETYPE_UNKNOWN;
 
 }
@@ -584,9 +584,9 @@
 	switch (sh)
 	{
-	case SHAPE_BALL_AND_STICK: return "ball-and-stick";
-	case SHAPE_SOLIDS: return "solid shapes";
-	case SHAPE_UNKNOWN: return "unknown";
-
-	case SHAPE_ILLEGAL:
+	case SHAPETYPE_BALL_AND_STICK: return "ball-and-stick";
+	case SHAPETYPE_SOLIDS: return "solid shapes";
+	case SHAPETYPE_UNKNOWN: return "unknown";
+
+	case SHAPETYPE_ILLEGAL:
 	default:
 		return "illegal";
@@ -894,5 +894,5 @@
 	int i, k;
 	int ret = 1;
-	shape = SHAPE_UNKNOWN;
+	shapetype = SHAPETYPE_UNKNOWN;
 	updateRefno();
 	if ((parts.size() == 0) && (neurons.size() == 0)) return 0;
@@ -931,11 +931,11 @@
 			if (p->p.y + p->size > bbmax.y) bbmax.y = p->p.y + p->size;
 			if (p->p.z + p->size > bbmax.z) bbmax.z = p->p.z + p->size;
-			if (shape == SHAPE_UNKNOWN)
-				shape = (p->shape == Part::SHAPE_BALL_AND_STICK) ? SHAPE_BALL_AND_STICK : SHAPE_SOLIDS;
-			else if (shape != SHAPE_ILLEGAL)
+			if (shapetype == SHAPETYPE_UNKNOWN)
+				shapetype = (p->shape == Part::SHAPE_BALL) ? SHAPETYPE_BALL_AND_STICK : SHAPETYPE_SOLIDS;
+			else if (shapetype != SHAPETYPE_ILLEGAL)
 			{
-				if ((p->shape == Part::SHAPE_BALL_AND_STICK) ^ (shape == SHAPE_BALL_AND_STICK))
+				if ((p->shape == Part::SHAPE_BALL) ^ (shapetype == SHAPETYPE_BALL_AND_STICK))
 				{
-					shape = SHAPE_ILLEGAL;
+					shapetype = SHAPETYPE_ILLEGAL;
 					logPrintf("Model", "internalCheck", LOG_WARN, "Inconsistent part shapes (mixed ball-and-stick and solids shape types)%s", nameForErrors().c_str());
 				}
@@ -1002,5 +1002,5 @@
 				if ((check != LIVE_CHECK) && (check != CHECKPOINT_CHECK))
 				{
-					if (j->shape == Joint::SHAPE_BALL_AND_STICK)
+					if (j->shape == Joint::SHAPE_STICK)
 					{
 						if (j->d() > getMaxJoint().d.x)
@@ -1017,9 +1017,9 @@
 				ret = 0;
 			}
-			if (shape != SHAPE_ILLEGAL)
+			if (shapetype != SHAPETYPE_ILLEGAL)
 			{
-				if ((j->shape == Joint::SHAPE_BALL_AND_STICK) ^ (shape == SHAPE_BALL_AND_STICK))
+				if ((j->shape == Joint::SHAPE_STICK) ^ (shapetype == SHAPETYPE_BALL_AND_STICK))
 				{
-					shape = SHAPE_ILLEGAL;
+					shapetype = SHAPETYPE_ILLEGAL;
 					logPrintf("Model", "internalCheck", LOG_WARN, "Inconsistent joint shapes (mixed old and new shapes)%s", nameForErrors().c_str());
 				}
@@ -1109,9 +1109,9 @@
 	}
 
-	if (shape == SHAPE_ILLEGAL)
+	if (shapetype == SHAPETYPE_ILLEGAL)
 		ret = 0;
-	else if ((declared_shape != SHAPE_UNKNOWN) && (declared_shape != shape))
-	{
-		logPrintf("Model", "internalCheck", LOG_ERROR, "Model shape type '%s' does not match the declared type '%s'", getShapeTypeName(shape), getShapeTypeName(declared_shape));
+	else if ((declared_shapetype != SHAPETYPE_UNKNOWN) && (declared_shapetype != shapetype))
+	{
+		logPrintf("Model", "internalCheck", LOG_ERROR, "Model shape type '%s' does not match the declared type '%s'", getShapeTypeName(shapetype), getShapeTypeName(declared_shapetype));
 		ret = 0;
 	}
@@ -1335,5 +1335,5 @@
 {
 	using_model = converted_model = NULL;
-	if (m.getShapeType() == Model::SHAPE_BALL_AND_STICK)
+	if (m.getShapeType() == Model::SHAPETYPE_BALL_AND_STICK)
 	{
 		converted_model = new Model;
