def getIsLayerStart(firstWord, skein, splitLine):
 if skein.isThereALayerStartWord:
  return (firstWord == '(<layer>')
 if ((firstWord != 'G1') and (firstWord != 'G2') and (firstWord != 'G3')):
  return False
 location = gcodec.getLocationFromSplitLine(skein.oldLocation, splitLine)
 if ((location.z - skein.oldZ) > 0.1):
  skein.oldZ = location.z
  return True
 return False

def getIsLayerStart ( firstWord , skein , splitLine ) : if skein . isThereALayerStartWord : return ( firstWord == '(<layer>' ) if ( ( firstWord != 'G1' ) and ( firstWord != 'G2' ) and ( firstWord != 'G3' ) ) : return False location = gcodec . getLocationFromSplitLine ( skein . oldLocation , splitLine ) if ( ( location . z - skein . oldZ ) > 0.1 ) : skein . oldZ = location . z return True return False
determine if the line is the start of a layer .