diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index a00670e80be99bbd48e08e3b3d972378a0502894..b0bc6ef1488a6e30eaf1d9aa68f64a55a0d35aba 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -406,7 +406,7 @@ StringXNumber PostProcessingOptions_Number[] = { { F|O, "Scales" , opt_post_scales , 1. , "Show value scales" }, { F|O, "Link" , opt_post_link , 0. , - "Link post-processing views (0=no, 1=visible views, 2=all views)" }, + "Link post-processing views (0=none, 1,2=changes in visible/all, 3,4=everything in visible/all)" }, { F|O, "Smoothing" , opt_post_smooth , 0. , "Apply (non-reversible) smoothing to post-processing view when merged" }, { F|O, "AnimationDelay" , opt_post_anim_delay , 0.25 , diff --git a/Common/GetOptions.cpp b/Common/GetOptions.cpp index 5e5823cac0624172283cde4abb04e0effb224654..d3e92d9e7afb7b0d0cca8c097f50ec3351e7e5c1 100644 --- a/Common/GetOptions.cpp +++ b/Common/GetOptions.cpp @@ -1,4 +1,4 @@ -// $Id: GetOptions.cpp,v 1.32 2001-08-03 14:58:04 geuzaine Exp $ +// $Id: GetOptions.cpp,v 1.33 2001-08-04 01:16:58 geuzaine Exp $ #include <unistd.h> #include "Gmsh.h" @@ -54,7 +54,7 @@ void Print_Usage(char *name){ Msg(DIRECT, "Post-processing options:"); Msg(DIRECT, " -dl enable display lists"); Msg(DIRECT, " -noview hide all views on startup"); - Msg(DIRECT, " -link link all views on startup"); + Msg(DIRECT, " -link int select link mode between views (default: 0)"); Msg(DIRECT, " -convert file file convert an ascii view into a binary one"); Msg(DIRECT, "Display options:"); Msg(DIRECT, " -nodb disable double buffering"); diff --git a/Common/Options.cpp b/Common/Options.cpp index dd3c8c5b5f28300bd16205bd9b1a1655c85282ae..d76a6704002974a0c42af182927b9cce97007af9 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.38 2001-08-03 21:27:20 geuzaine Exp $ +// $Id: Options.cpp,v 1.39 2001-08-04 01:16:58 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -1522,6 +1522,8 @@ double opt_post_link(OPT_ARGS_NUM){ WID->post_butt[0]->value(CTX.post.link==0); WID->post_butt[1]->value(CTX.post.link==1); WID->post_butt[2]->value(CTX.post.link==2); + WID->post_butt[3]->value(CTX.post.link==3); + WID->post_butt[4]->value(CTX.post.link==4); } #endif return CTX.post.link; diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 6144f5976656619fc561d3a5dd0c841a06c75da6..efbf5691735ce87fb07db39cfccb71fc0dc4d99c 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.73 2001-08-04 00:37:57 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.74 2001-08-04 01:16:58 geuzaine Exp $ #include <sys/types.h> #include <signal.h> @@ -423,7 +423,12 @@ void opt_post_cb(CALLBACK_ARGS) { WID->create_post_options_window(); } void opt_post_ok_cb(CALLBACK_ARGS) { - opt_post_link(0, GMSH_SET, WID->post_butt[0]->value()?0:(WID->post_butt[1]->value()?1:2)); + opt_post_link(0, GMSH_SET, + WID->post_butt[0]->value()?0: + WID->post_butt[1]->value()?1: + WID->post_butt[2]->value()?2: + WID->post_butt[3]->value()?3: + 4); opt_post_smooth(0, GMSH_SET, WID->post_butt[3]->value()); opt_post_anim_delay(0, GMSH_SET, WID->post_value[0]->value()); @@ -1667,8 +1672,8 @@ void view_options_custom_cb(CALLBACK_ARGS){ void view_options_timestep_cb(CALLBACK_ARGS){ int links = (int)opt_post_link(0, GMSH_GET, 0); for(int i=0 ; i<List_Nbr(Post_ViewList) ; i++){ - if((links == 2) || - (links == 1 && opt_view_visible(i, GMSH_GET, 0)) || + if((links == 2 || links == 4) || + ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) || (links == 0 && i == (int)data)){ opt_view_timestep(i, GMSH_SET, (int)((Fl_Value_Input*)w)->value()); } @@ -1677,15 +1682,17 @@ void view_options_timestep_cb(CALLBACK_ARGS){ } void view_options_ok_cb(CALLBACK_ARGS){ - int i, links; + int i, links, force=0; links = (int)opt_post_link(0, GMSH_GET, 0); for(i=0 ; i<List_Nbr(Post_ViewList) ; i++){ - if((links == 2) || - (links == 1 && opt_view_visible(i, GMSH_GET, 0)) || + if((links == 2 || links == 4) || + ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) || (links == 0 && i == (int)data)){ + if(links == 3 || links == 4) force = 1; + // view_butts //not this one. if(WID->view_butt[0]->changed()) @@ -1693,7 +1700,7 @@ void view_options_ok_cb(CALLBACK_ARGS){ WID->view_butt[0]->value()?DRAW_POST_CUSTOM: DRAW_POST_DEFAULT); - if(WID->view_butt[1]->changed() || + if(force || WID->view_butt[1]->changed() || WID->view_butt[2]->changed() || WID->view_butt[3]->changed()) opt_view_scale_type(i, GMSH_SET, @@ -1701,11 +1708,11 @@ void view_options_ok_cb(CALLBACK_ARGS){ WID->view_butt[2]->value()?DRAW_POST_LOGARITHMIC: DRAW_POST_DOUBLELOGARITHMIC); - if(WID->view_butt[25]->changed()) + if(force || WID->view_butt[25]->changed()) opt_view_saturate_values(i, GMSH_SET, WID->view_butt[25]->value()); - if(WID->view_butt[3]->changed() || + if(force || WID->view_butt[3]->changed() || WID->view_butt[4]->changed() || WID->view_butt[5]->changed() || WID->view_butt[6]->changed()) @@ -1715,7 +1722,7 @@ void view_options_ok_cb(CALLBACK_ARGS){ WID->view_butt[5]->value()?DRAW_POST_CONTINUOUS: DRAW_POST_NUMERIC); - if(WID->view_butt[7]->changed() || + if(force || WID->view_butt[7]->changed() || WID->view_butt[8]->changed() || WID->view_butt[9]->changed() || WID->view_butt[10]->changed()) @@ -1725,103 +1732,103 @@ void view_options_ok_cb(CALLBACK_ARGS){ WID->view_butt[9]->value()?DRAW_POST_CONE: DRAW_POST_DISPLACEMENT); - if(WID->view_butt[11]->changed() || + if(force || WID->view_butt[11]->changed() || WID->view_butt[12]->changed()) opt_view_arrow_location(i, GMSH_SET, WID->view_butt[11]->value()?DRAW_POST_LOCATE_COG: DRAW_POST_LOCATE_VERTEX); - if(WID->view_butt[13]->changed()) + if(force || WID->view_butt[13]->changed()) opt_view_show_element(i, GMSH_SET, WID->view_butt[13]->value()); - if(WID->view_butt[14]->changed()) + if(force || WID->view_butt[14]->changed()) opt_view_show_scale(i, GMSH_SET, WID->view_butt[14]->value()); - if(WID->view_butt[15]->changed()) + if(force || WID->view_butt[15]->changed()) opt_view_show_time(i, GMSH_SET, WID->view_butt[15]->value()); - if(WID->view_butt[16]->changed()) + if(force || WID->view_butt[16]->changed()) opt_view_transparent_scale(i, GMSH_SET, WID->view_butt[16]->value()); - if(WID->view_butt[17]->changed()) + if(force || WID->view_butt[17]->changed()) opt_view_light(i,GMSH_SET,WID->view_butt[17]->value()); - if(WID->view_butt[27]->changed()) + if(force || WID->view_butt[27]->changed()) opt_view_smooth_normals(i,GMSH_SET,WID->view_butt[27]->value()); - if(WID->view_butt[18]->changed()) + if(force || WID->view_butt[18]->changed()) opt_view_draw_points(i, GMSH_SET, WID->view_butt[18]->value()); - if(WID->view_butt[19]->changed()) + if(force || WID->view_butt[19]->changed()) opt_view_draw_lines(i, GMSH_SET, WID->view_butt[19]->value()); - if(WID->view_butt[20]->changed()) + if(force || WID->view_butt[20]->changed()) opt_view_draw_triangles(i, GMSH_SET, WID->view_butt[20]->value()); - if(WID->view_butt[21]->changed()) + if(force || WID->view_butt[21]->changed()) opt_view_draw_tetrahedra(i, GMSH_SET, WID->view_butt[21]->value()); - if(WID->view_butt[22]->changed()) + if(force || WID->view_butt[22]->changed()) opt_view_draw_scalars(i, GMSH_SET, WID->view_butt[22]->value()); - if(WID->view_butt[23]->changed()) + if(force || WID->view_butt[23]->changed()) opt_view_draw_vectors(i, GMSH_SET, WID->view_butt[23]->value()); - if(WID->view_butt[24]->changed()) + if(force || WID->view_butt[24]->changed()) opt_view_draw_tensors(i, GMSH_SET, WID->view_butt[24]->value()); // view_values - if(WID->view_value[0]->changed()) + if(force || WID->view_value[0]->changed()) opt_view_custom_min(i, GMSH_SET, WID->view_value[0]->value()); - if(WID->view_value[1]->changed()) + if(force || WID->view_value[1]->changed()) opt_view_custom_max(i, GMSH_SET, WID->view_value[1]->value()); - if(WID->view_value[2]->changed()) + if(force || WID->view_value[2]->changed()) opt_view_nb_iso(i, GMSH_SET, WID->view_value[2]->value()); - if(WID->view_value[3]->changed()) + if(force || WID->view_value[3]->changed()) opt_view_offset0(i, GMSH_SET, WID->view_value[3]->value()); - if(WID->view_value[4]->changed()) + if(force || WID->view_value[4]->changed()) opt_view_offset1(i, GMSH_SET, WID->view_value[4]->value()); - if(WID->view_value[5]->changed()) + if(force || WID->view_value[5]->changed()) opt_view_offset2(i, GMSH_SET, WID->view_value[5]->value()); - if(WID->view_value[6]->changed()) + if(force || WID->view_value[6]->changed()) opt_view_raise0(i, GMSH_SET, WID->view_value[6]->value()); - if(WID->view_value[7]->changed()) + if(force || WID->view_value[7]->changed()) opt_view_raise1(i, GMSH_SET, WID->view_value[7]->value()); - if(WID->view_value[8]->changed()) + if(force || WID->view_value[8]->changed()) opt_view_raise2(i, GMSH_SET, WID->view_value[8]->value()); - if(WID->view_value[9]->changed()) + if(force || WID->view_value[9]->changed()) opt_view_timestep(i, GMSH_SET, WID->view_value[9]->value()); - if(WID->view_value[10]->changed()) + if(force || WID->view_value[10]->changed()) opt_view_arrow_scale(i, GMSH_SET, WID->view_value[10]->value()); - if(WID->view_value[11]->changed()) + if(force || WID->view_value[11]->changed()) opt_view_boundary(i, GMSH_SET, WID->view_value[11]->value()); - if(WID->view_value[12]->changed()) + if(force || WID->view_value[12]->changed()) opt_view_explode(i, GMSH_SET, WID->view_value[12]->value()); // view_inputs - if(WID->view_input[0]->changed()) + if(force || WID->view_input[0]->changed()) opt_view_name(i, GMSH_SET, (char*)WID->view_input[0]->value()); - if(WID->view_input[1]->changed()) + if(force || WID->view_input[1]->changed()) opt_view_format(i, GMSH_SET, (char*)WID->view_input[1]->value()); // colorbar window - if(WID->view_colorbar_window->changed() && i!=(int)data){ + if(force || (WID->view_colorbar_window->changed() && i!=(int)data)){ ColorTable_Copy(&((Post_View*)List_Pointer(Post_ViewList,(int)data))->CT); ColorTable_Paste(&((Post_View*)List_Pointer(Post_ViewList,i))->CT); } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index ace46f4a44c50b8c48f8637a3fd686a34ffa05f0..63747aaf4dc1422b48c8318a37f1dec891489e5a 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.102 2001-08-04 00:37:57 geuzaine Exp $ +// $Id: GUI.cpp,v 1.103 2001-08-04 01:16:58 geuzaine Exp $ // To make the interface as visually consistent as possible, please: // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc. @@ -1426,8 +1426,8 @@ void GUI::create_post_options_window(){ if(!init_post_options_window){ init_post_options_window = 1 ; - int width = 20*CTX.fontsize; - int height = 5*WB+8*BH ; + int width = 24*CTX.fontsize; + int height = 5*WB+10*BH ; post_window = new Fl_Window(width,height); post_window->box(WINDOW_BOX); @@ -1437,15 +1437,17 @@ void GUI::create_post_options_window(){ { Fl_Group* o = new Fl_Group(WB, WB+BH, width-2*WB, height-3*WB-2*BH, "Views"); o->labelsize(CTX.fontsize); - post_butt[0] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "No link between views"); - post_butt[1] = new Fl_Check_Button(2*WB, 2*WB+2*BH, BW, BH, "Link all visible views"); - post_butt[2] = new Fl_Check_Button(2*WB, 2*WB+3*BH, BW, BH, "Link all views"); - for(i=0 ; i<3 ; i++){ + post_butt[0] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "Independent views"); + post_butt[1] = new Fl_Check_Button(2*WB, 2*WB+2*BH, BW, BH, "Apply next changes to all visible views"); + post_butt[2] = new Fl_Check_Button(2*WB, 2*WB+3*BH, BW, BH, "Apply next changes to all views"); + post_butt[3] = new Fl_Check_Button(2*WB, 2*WB+4*BH, BW, BH, "Force same options for all visible views"); + post_butt[4] = new Fl_Check_Button(2*WB, 2*WB+5*BH, BW, BH, "Force same options for all views"); + for(i=0 ; i<5 ; i++){ post_butt[i]->type(FL_RADIO_BUTTON); post_butt[i]->labelsize(CTX.fontsize); post_butt[i]->selection_color(FL_YELLOW); } - Fl_Box *text = new Fl_Box(FL_NO_BOX, 2*WB, 3*WB+4*BH, width-4*WB, 2*BH, + Fl_Box *text = new Fl_Box(FL_NO_BOX, 2*WB, 3*WB+6*BH, width-4*WB, 2*BH, "Individual view options are available " "by right-clicking on each view button " "in the post-processing menu"); @@ -1456,7 +1458,7 @@ void GUI::create_post_options_window(){ { Fl_Group* o = new Fl_Group(WB, WB+BH, width-2*WB, height-3*WB-2*BH, "Smoothing"); o->labelsize(CTX.fontsize); - post_butt[3] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "Smooth"); + post_butt[3] = new Fl_Check_Button(2*WB, 2*WB+1*BH, BW, BH, "Smooth views during merge"); post_butt[3]->type(FL_TOGGLE_BUTTON); post_butt[3]->down_box(FL_DOWN_BOX); post_butt[3]->labelsize(CTX.fontsize); diff --git a/doc/VERSIONS b/doc/VERSIONS index f7780be2757811e248efe4927f3c0b516632ea41..306c602225bf882a96461a256e1fa5e84fd139a7 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,8 +1,8 @@ -$Id: VERSIONS,v 1.48 2001-08-04 00:37:57 geuzaine Exp $ +$Id: VERSIONS,v 1.49 2001-08-04 01:16:58 geuzaine Exp $ New in 1.23: Better display of displacement maps; boundary operator generalization; new explode option for post-processing views; -corrected link view behaviour (to update only the changed items); +enhanced link view behaviour (to update only the changed items); New in 1.22: Fixed (yet another) bug for 2D mesh in the mean plane; fixed surface coherence bug in extruded meshes; new double logarithmic diff --git a/tutorial/README b/tutorial/README index 2c618d53ba211cb7a267e30f76bd68fe02975980..e239e6056c72a069a39c687b2207b5c3c55f8561 100644 --- a/tutorial/README +++ b/tutorial/README @@ -1,4 +1,4 @@ -$Id: README,v 1.12 2001-05-24 10:11:29 geuzaine Exp $ +$Id: README,v 1.13 2001-08-04 01:16:58 geuzaine Exp $ Here are the examples in the Gmsh tutorial. These examples are commented (both C and C++-style comments can be used in Gmsh input @@ -88,7 +88,8 @@ menu), two view buttons will appear, respectively labeled "a scalar map" and "a vector map". A left mouse click toggles the visibility of the selected view. A right mouse click provides access to the view's options. If you want the modifications made to one view to affect also -all the other views, select the 'Link all views' option in the +all the other views, select the 'Apply next changes to all views' or +'Force same options for all views' option in the 'Options->Post-processing' menu. [NOTE: All the options specified interactively can also be directly