 Timestamp:
 03/01/14 22:38:45 (10 years ago)
 Location:
 cpp/frams/genetics
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/genetics/f9/conv_f9.cpp
r139 r157 52 52 setColors(m); 53 53 m.close(); 54 if (m.getPartCount() < 2) //only one part <=> there were no valid turtle commands in the input genotype 55 return ""; //so we return an invalid f0 genotype 54 56 return m.getF0Geno().getGene(); 55 57 } … … 57 59 int GenoConv_f90::addSegment(Model &m,vector<XYZ_LOC> &vertices,const XYZ_LOC &new_vertex,int recently_added) 58 60 { 59 if (vertices.size()<1) 61 if (vertices.size()<1) //empty model? 60 62 { 61 63 return addNewVertex(m,vertices,new_vertex); 
cpp/frams/genetics/fF/conv_fF.cpp
r140 r157 19 19 { 20 20 fF_growth_params gp; 21 gp.load(in); 21 if (!gp.load(in)) //invalid input genotype? 22 return ""; //so we return an invalid f0 genotype 22 23 Model m; 23 24 m.open(); … … 31 32 rotation.rotate(Pt3D(0, gp.angle1, gp.angle2)); //assumed rotation around x is 0, which is limiting if we use assymetrical shapes (i.e., not spheres). But the original model had only two angles... 32 33 33 for (int i = 0; i < gp.number_of_chambers; i++, p1 = p2)34 for (int i = 1; i < gp.number_of_chambers; i++, p1 = p2) 34 35 { 35 36 p2 = m.addNewPart(Part::SHAPE_ELLIPSOID);
Note: See TracChangeset
for help on using the changeset viewer.