Skip to content
Snippets Groups Projects
Commit fe4b05ab authored by Akash Anand's avatar Akash Anand
Browse files

*** empty log message ***

parent 8a15b0f9
No related branches found
No related tags found
No related merge requests found
...@@ -762,20 +762,21 @@ void action_cb(Fl_Widget *w, void *data) ...@@ -762,20 +762,21 @@ void action_cb(Fl_Widget *w, void *data)
delete_fourier(faces[i]); delete_fourier(faces[i]);
} }
else{ else{
char *filename = "patches.fm"; if(file_chooser(0, 1, "Save Fourier Model", "*.fm")){
FILE *fp = fopen(filename, "w+"); FILE *fp = fopen(file_chooser_get_name(1), "w");
if(!fp){ if(!fp){
printf("Unable to open file '%s'\n", filename); Msg(GERROR, "Unable to open file `%s'", file_chooser_get_name(1));
return; return;
} }
fprintf(fp, "%d\n", (int)faces.size()); fprintf(fp, "%d\n", (int)faces.size());
for(unsigned int i = 0; i < faces.size(); i++){ for(unsigned int i = 0; i < faces.size(); i++){
FFace* ff = (FFace*)faces[i]; FFace* ff = (FFace*)faces[i];
ff->GetFMFace()->GetPatch()->Export(fp); ff->GetFMFace()->GetPatch()->Export(fp);
}
fclose(fp);
} }
fclose(fp);
} }
Draw(); Draw();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment