Changeset 157 for cpp/frams/genetics/f9


Ignore:
Timestamp:
03/01/14 22:38:45 (10 years ago)
Author:
sz
Message:

f9 and Ff converters can now detect an invalid input genotype and react appropriately

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f9/conv_f9.cpp

    r139 r157  
    5252        setColors(m);
    5353        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
    5456        return m.getF0Geno().getGene();
    5557}
     
    5759int GenoConv_f90::addSegment(Model &m,vector<XYZ_LOC> &vertices,const XYZ_LOC &new_vertex,int recently_added)
    5860{
    59         if (vertices.size()<1)
     61        if (vertices.size()<1) //empty model?
    6062        {
    6163                return addNewVertex(m,vertices,new_vertex);
Note: See TracChangeset for help on using the changeset viewer.