int main(int argc, char const** argv) { SHOWDF("Created using\n%s",CreateHeader(argc,argv)); Options opts; OPTSDC(opts,filename, "name : point data (can be -)"); OPTSDC(opts,mfilename, "name : initial mesh (can be -)"); OPTSPC(opts,crep, "v: set constant for representation energy"); OPTSDC(opts,reconstruct,": apply surface reconstruction schedule"); OPTSDC(opts,simplify, ": apply mesh simplification schedule"); opts.c("",":"); OPTSPC(opts,spring, "tension : set spring constant"); opts.c("",":"); OPTSDC(opts,gfit, "niter : do global fit (0=until convergence)"); OPTSDC(opts,fgfit, "niter : use conjugate gradients"); OPTSDC(opts,stoc, ": do local stochastic mesh operations"); OPTSDC(opts,lfit, "ni nli : do ni iters, each nli local fits"); OPTSDC(opts,four1split, ": do global four-to-one split"); OPTSDC(opts,outmesh, "filename : output current mesh to file"); opts.c("",":"); OPTSDC(opts,pclp, ": print projections onto mesh (lines)"); OPTSDC(opts,record, ": print mesh changes on cout, -noout"); OPTSDC(opts,spawn, "'command': send record to popen"); OPTSFC(opts,nooutput, ": don't print final mesh on stdout"); OPTSPC(opts,verb, "i : verbosity level (1=avg,2=more,3=lots)"); opts.c("",":"); OPTSPC(opts,crbf, "ratio : set repr. energy boundary factor"); OPTSPC(opts,spbf, "ratio : set spring constant boundary factor"); OPTSPC(opts,fliter, "factor : modify # local iters done in stoc"); OPTSPC(opts,feswaasym, "f : set drss threshold (fraction of crep)"); signal(SIGUSR1,HHSIG_PF(sigUSR1)); signal(SIGUSR2,HHSIG_PF(sigUSR2)); TIMER(Meshfit); opts.allmustparse(); if (!opts.parse(argc,argv)) { opts.problem(argc,argv); return 1; } perhapsinitialize(); SHOWDF("\n"); analyzemesh("FINAL"); ETIMER(Meshfit); CleanUp(); SHOWDF("\n"),SHOWDF("EndMeshfit\n"); if (!nooutput) { meshtransform(xformi); mesh.write(cout); } if (filespawn) { delete ospawn; pclose(filespawn); } mesh.clear(); pt.clear(); return 0; }