void generateNCCommands(Model &md){ for (int i=0; i< md.getNumElements(); ++i) { cout <<"Step"<<i+1<<". Generate:"<< md.getModelName() << ":" << md.getModelNum() << ":"; Feature* f = md.getFeature(i); switch(f->featureType()) { case SLOT: cout << "SLOT->" << f->getXLoc() << ":" << f->getYLoc() << ":" << ((SlotFeature *)f)->getLength(); break; case HOLE: cout << "HOLE->" << f->getXLoc() << ":" << f->getYLoc() << ":" << ((HoleFeature*)f)->getDiameter(); break; case CUTOUT: cout << "CUTOUT->" << f->getXLoc() << ":" << f->getYLoc() << ":" << ((CutoutFeature*)f)->getOperations(); break; case SPECIAL: cout << "SPECIAL->" << f->getXLoc() << ":" << f->getYLoc(); break; case IRREGULAR:{ cout << "IRREGULAR->" << f->getXLoc() << ":" << f->getYLoc() << ":" << ((IrregularFeature*)f)->getNumSegments(); vector<ShapeType> tmp = ((IrregularFeature*)f)->getSegments(); for(int j=0; j<(int)tmp.size(); ++j) { cout << ":" << getShape(tmp[j]); } break; } default: {} } cout << endl; } }