diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 8d6d5a68389be02fdc5f4c1d547d8b0ce95e7cae..308e6ed96f1f7191c7ced71692f1c49a121ab26c 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -946,7 +946,7 @@ StringXNumber PostProcessingOptions_Number[] = { { F|0, "Format" , opt_post_file_format , 0. , "Default file format for post-processing views" }, - { F|O, "HorizontalScales" , opt_post_horizontal_scales , 0. , + { F|O, "HorizontalScales" , opt_post_horizontal_scales , 1. , "Display value scales horizontally" }, { F|O, "Link" , opt_post_link , 0. , @@ -1058,6 +1058,8 @@ StringXNumber ViewOptions_Number[] = { "Number of intervals" }, { F, "NbTimeStep" , opt_view_nb_timestep , 1. , "Number of time steps in the view (do not change this!)" }, + { F|O, "Normals" , opt_view_normals , 0. , + "Display size of normal vectors (in pixels)" }, { F, "OffsetX" , opt_view_offset0 , 0. , "Translation of the view along X-axis (in model coordinates)" }, @@ -1096,6 +1098,9 @@ StringXNumber ViewOptions_Number[] = { "Show time value in the scale? (1=only if NbTimeStep>1, 2=always)" }, { F|O, "SmoothNormals" , opt_view_smooth_normals , 0. , "Smooth the normals?" }, + + { F|0, "Tangents" , opt_view_normals , 0. , + "Display size of tangent vectors (in pixels)" }, { F|O, "TensorType" , opt_view_tensor_type , 0. , "Tensor Visualization Type" }, { F, "TimeStep" , opt_view_timestep , 0. , diff --git a/Common/Options.cpp b/Common/Options.cpp index fc52f03d75e0d1c637e9ce73cc4f1d7cc2dce102..d57bc8069c4f702ae01b6ee5b9860d53fdf95b76 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.203 2004-11-09 16:27:49 remacle Exp $ +// $Id: Options.cpp,v 1.204 2004-11-13 22:52:44 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -4558,6 +4558,32 @@ double opt_view_arrow_stem_radius(OPT_ARGS_NUM) return v->ArrowRelStemRadius; } +double opt_view_normals(OPT_ARGS_NUM) +{ + GET_VIEW(0.); + if(action & GMSH_SET) { + v->Normals = val; + } +#if defined(HAVE_FLTK) + if(_gui_action_valid(action, num)) + WID->view_value[0]->value(v->Normals); +#endif + return v->Normals; +} + +double opt_view_tangents(OPT_ARGS_NUM) +{ + GET_VIEW(0.); + if(action & GMSH_SET) { + v->Tangents = val; + } +#if defined(HAVE_FLTK) + if(_gui_action_valid(action, num)) + WID->view_value[1]->value(v->Tangents); +#endif + return v->Tangents; +} + double opt_view_displacement_factor(OPT_ARGS_NUM) { GET_VIEW(0.); diff --git a/Common/Options.h b/Common/Options.h index 3ecac1fcab71559b606c247dc9bf882c593689cb..9001b6573d3f495e90cb5242e3ffa65dbd056e32 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -469,6 +469,8 @@ double opt_view_arrow_size_proportional(OPT_ARGS_NUM); double opt_view_arrow_head_radius(OPT_ARGS_NUM); double opt_view_arrow_stem_length(OPT_ARGS_NUM); double opt_view_arrow_stem_radius(OPT_ARGS_NUM); +double opt_view_normals(OPT_ARGS_NUM); +double opt_view_tangents(OPT_ARGS_NUM); double opt_view_displacement_factor(OPT_ARGS_NUM); double opt_view_explode(OPT_ARGS_NUM); double opt_view_visible(OPT_ARGS_NUM); diff --git a/Common/Views.cpp b/Common/Views.cpp index 0552f4cc6e5570f711d6373277d18c9451b0a634..a810bff5dae1ecdc5a7d6b680a51c15b24cd1f10 100644 --- a/Common/Views.cpp +++ b/Common/Views.cpp @@ -1,4 +1,4 @@ -// $Id: Views.cpp,v 1.144 2004-10-30 15:23:44 geuzaine Exp $ +// $Id: Views.cpp,v 1.145 2004-11-13 22:52:44 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -624,6 +624,8 @@ void CopyViewOptions(Post_View * src, Post_View * dest) dest->ArrowRelHeadRadius = src->ArrowRelHeadRadius; dest->ArrowRelStemLength = src->ArrowRelStemLength; dest->ArrowRelStemRadius = src->ArrowRelStemRadius; + dest->Normals = src->Normals; + dest->Tangents = src->Tangents; dest->DisplacementFactor = src->DisplacementFactor; dest->Explode = src->Explode; dest->Visible = src->Visible; @@ -1241,81 +1243,6 @@ void Post_View::smooth() xyzv::eps = old_eps; } -// Transformation - -static void transform(double mat[3][3], double v[3], - double *x, double *y, double *z) -{ - *x = mat[0][0] * v[0] + mat[0][1] * v[1] + mat[0][2] * v[2]; - *y = mat[1][0] * v[0] + mat[1][1] * v[1] + mat[1][2] * v[2]; - *z = mat[2][0] * v[0] + mat[2][1] * v[1] + mat[2][2] * v[2]; -} - -static void transform_list(Post_View *view, List_T *list, int nbList, - int nbVert, double mat[3][3]) -{ - double *x, *y, *z, v[3]; - int i, j; - - if(!nbList) return; - - int nb = List_Nbr(list) / nbList; - for(i = 0; i < List_Nbr(list); i += nb) { - x = (double *)List_Pointer_Fast(list, i); - y = (double *)List_Pointer_Fast(list, i + nbVert); - z = (double *)List_Pointer_Fast(list, i + 2 * nbVert); - for(j = 0; j < nbVert; j++) { - v[0] = x[j]; - v[1] = y[j]; - v[2] = z[j]; - transform(mat, v, &x[j], &y[j], &z[j]); - if(x[j] < view->BBox[0]) view->BBox[0] = x[j]; - if(x[j] > view->BBox[1]) view->BBox[1] = x[j]; - if(y[j] < view->BBox[2]) view->BBox[2] = y[j]; - if(y[j] > view->BBox[3]) view->BBox[3] = y[j]; - if(z[j] < view->BBox[4]) view->BBox[4] = z[j]; - if(z[j] > view->BBox[5]) view->BBox[5] = z[j]; - } - } -} - -void Post_View::transform(double mat[3][3]) -{ - for(int i = 0; i < 3; i++) { - BBox[2 * i] = VAL_INF; - BBox[2 * i + 1] = -VAL_INF; - } - - transform_list(this, SP, NbSP, 1, mat); - transform_list(this, SL, NbSL, 2, mat); - transform_list(this, ST, NbST, 3, mat); - transform_list(this, SQ, NbSQ, 4, mat); - transform_list(this, SS, NbSS, 4, mat); - transform_list(this, SH, NbSH, 8, mat); - transform_list(this, SI, NbSI, 6, mat); - transform_list(this, SY, NbSY, 5, mat); - - transform_list(this, VP, NbVP, 1, mat); - transform_list(this, VL, NbVL, 2, mat); - transform_list(this, VT, NbVT, 3, mat); - transform_list(this, VQ, NbVQ, 4, mat); - transform_list(this, VS, NbVS, 4, mat); - transform_list(this, VH, NbVH, 8, mat); - transform_list(this, VI, NbVI, 6, mat); - transform_list(this, VY, NbVY, 5, mat); - - transform_list(this, TP, NbTP, 1, mat); - transform_list(this, TL, NbTL, 2, mat); - transform_list(this, TT, NbTT, 3, mat); - transform_list(this, TQ, NbTQ, 4, mat); - transform_list(this, TS, NbTS, 4, mat); - transform_list(this, TH, NbTH, 8, mat); - transform_list(this, TI, NbTI, 6, mat); - transform_list(this, TY, NbTY, 5, mat); - - Changed = 1; -} - // Combine views (merge elements or merge time steps) struct nameidx{ diff --git a/Common/Views.h b/Common/Views.h index 5330603146fe61fd7ce3a04f8a3d62241cea9b9d..183766e39adb9d12048e6211e73ceeaa6d5803fe 100644 --- a/Common/Views.h +++ b/Common/Views.h @@ -184,6 +184,7 @@ class Post_View{ double CustomMin, CustomMax; double Offset[3], Raise[3], DisplacementFactor, Explode; double ArrowSize, ArrowRelHeadRadius, ArrowRelStemRadius, ArrowRelStemLength; + double Normals, Tangents; int Visible, IntervalsType, NbIso, NbAbscissa, ArrowSizeProportional; int Light, LightTwoSide, SmoothNormals; double AngleSmoothNormals, AlphaChannel; @@ -212,8 +213,6 @@ class Post_View{ // smooth normals smooth_normals *normals; void reset_normals(); - // transform the view - void transform(double mat[3][3]); // some generic access functions int empty(); diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index e60b61e67d9e2089ca918c7c8781f05f157ae7c5..f03bf643b549e3ebc24f6db3837da480daff4529 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.296 2004-11-09 16:27:49 remacle Exp $ +// $Id: Callbacks.cpp,v 1.297 2004-11-13 22:52:45 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -3517,6 +3517,8 @@ void view_options_ok_cb(CALLBACK_ARGS) double draw_scalars = opt_view_draw_scalars(current, GMSH_GET, 0); double draw_vectors = opt_view_draw_vectors(current, GMSH_GET, 0); double draw_tensors = opt_view_draw_tensors(current, GMSH_GET, 0); + double normals = opt_view_normals(current, GMSH_GET, 0); + double tangents = opt_view_tangents(current, GMSH_GET, 0); double custom_min = opt_view_custom_min(current, GMSH_GET, 0); double custom_max = opt_view_custom_max(current, GMSH_GET, 0); @@ -3764,6 +3766,14 @@ void view_options_ok_cb(CALLBACK_ARGS) // view_values + val = WID->view_value[0]->value(); + if(force || (val != normals)) + opt_view_normals(i, GMSH_SET, val); + + val = WID->view_value[1]->value(); + if(force || (val != tangents)) + opt_view_tangents(i, GMSH_SET, val); + val = WID->view_value[31]->value(); if(force || (val != custom_min)) opt_view_custom_min(i, GMSH_SET, val); diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 9b8ed8761526df6a276762dd04a95a798f555d7f..88d4dd4989c624f05004cee89147106034cd6e34 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.379 2004-11-10 01:45:57 geuzaine Exp $ +// $Id: GUI.cpp,v 1.380 2004-11-13 22:52:45 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -2414,9 +2414,6 @@ void GUI::create_option_window() view_value[23]->maximum(1024); view_value[23]->step(1); - - - o->end(); } { @@ -2463,6 +2460,18 @@ void GUI::create_option_window() view_butt[20]->down_box(TOGGLE_BOX); view_butt[20]->selection_color(TOGGLE_COLOR); + view_value[0] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 9 * BH, IW, BH, "Normals"); + view_value[0]->minimum(0); + view_value[0]->maximum(500); + view_value[0]->step(1); + view_value[0]->align(FL_ALIGN_RIGHT); + + view_value[1] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 10 * BH, IW, BH, "Tangents"); + view_value[1]->minimum(0); + view_value[1]->maximum(500); + view_value[1]->step(1); + view_value[1]->align(FL_ALIGN_RIGHT); + view_butt[4] = new Fl_Check_Button(L + width / 2, 2 * WB + 1 * BH, BW / 2 - WB, BH, "Scale"); view_butt[4]->tooltip("(Alt+i)"); view_butt[4]->type(FL_TOGGLE_BUTTON); @@ -2811,6 +2820,8 @@ void GUI::update_view_window(int num) opt_view_draw_scalars(num, GMSH_GUI, 0); opt_view_draw_vectors(num, GMSH_GUI, 0); opt_view_draw_tensors(num, GMSH_GUI, 0); + opt_view_normals(num, GMSH_GUI, 0); + opt_view_tangents(num, GMSH_GUI, 0); if(v->NbSP) view_2d->activate(); diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp index 60683848699396b5a903833883ce854ec058928c..d4c1fbf8ff2f95fab080c2ea2dd9676aa40bd005 100644 --- a/Graphics/Post.cpp +++ b/Graphics/Post.cpp @@ -1,4 +1,4 @@ -// $Id: Post.cpp,v 1.83 2004-11-01 15:10:36 geuzaine Exp $ +// $Id: Post.cpp,v 1.84 2004-11-13 22:52:46 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -478,7 +478,7 @@ void Draw_Post(void) else{ // don't even enter the classic data path if we don't have to if(v->TriVertexArray){ - if(v->Boundary < 1 && !v->ShowElement && + if(v->Boundary < 1 && !v->ShowElement && !v->Normals && v->IntervalsType != DRAW_POST_NUMERIC && v->IntervalsType != DRAW_POST_ISO){ Msg(DEBUG, "View[%d]: skiping 2D scalar pass alltogether", v->Index); skip_2d = 1; diff --git a/Graphics/PostElement.cpp b/Graphics/PostElement.cpp index 1f29f0be5a2eb95eed6313e6007cc56937f424b3..0707f98709f9d998db9d78a8868af82c437aa163 100644 --- a/Graphics/PostElement.cpp +++ b/Graphics/PostElement.cpp @@ -1,4 +1,4 @@ -// $Id: PostElement.cpp,v 1.52 2004-11-08 23:28:48 geuzaine Exp $ +// $Id: PostElement.cpp,v 1.53 2004-11-13 22:52:46 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -295,6 +295,23 @@ void Draw_ScalarLine(Post_View * View, int preproNormals, if(View->ShowElement) Draw_ElementBoundary(LINE, View, X, Y, Z, Raise); + if(View->Tangents){ + double t[3] = { (X[1] + Raise[0][1]) - (X[0] + Raise[0][0]), + (Y[1] + Raise[1][1]) - (Y[0] + Raise[1][0]), + (Z[1] + Raise[2][1]) - (Z[0] + Raise[2][0]) }; + norme(t); + t[0] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[0]; + t[1] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[1]; + t[2] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[2]; + glColor4ubv((GLubyte *) & CTX.color.mesh.tangents); + Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, + CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, + (X[0] + Raise[0][0] + X[1] + Raise[0][1]) / 2., + (Y[0] + Raise[1][0] + Y[1] + Raise[1][1]) / 2., + (Z[0] + Raise[2][0] + Z[1] + Raise[2][1]) / 2., + t[0], t[1], t[2], NULL, View->Light); + } + if(View->IntervalsType == DRAW_POST_NUMERIC) { d = (Val[0] + Val[1]) / 2.; if(d >= ValMin && d <= ValMax) { @@ -395,7 +412,7 @@ void Draw_ScalarTriangle(Post_View * View, int preproNormals, for(int k = 0; k < 3; k++) Raise[i][k] = View->Raise[i] * Val[k]; - if(preproNormals || + if(preproNormals || View->Normals || (View->Light && (!View->TriVertexArray || (View->TriVertexArray && View->TriVertexArray->fill)))) { x1x0 = (X[1] + Raise[0][1]) - (X[0] + Raise[0][0]); @@ -413,6 +430,20 @@ void Draw_ScalarTriangle(Post_View * View, int preproNormals, if(!preproNormals && View->ShowElement) Draw_ElementBoundary(TRIANGLE, View, X, Y, Z, Raise); + if(!preproNormals && View->Normals){ + double t[3] = { nn[0], nn[1], nn[2] }; + t[0] *= View->Normals * CTX.pixel_equiv_x / CTX.s[0]; + t[1] *= View->Normals * CTX.pixel_equiv_x / CTX.s[1]; + t[2] *= View->Normals * CTX.pixel_equiv_x / CTX.s[2]; + glColor4ubv((GLubyte *) & CTX.color.mesh.normals); + Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, + CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, + (X[0] + Raise[0][0] + X[1] + Raise[0][1] + X[2] + Raise[0][2]) / 3., + (Y[0] + Raise[1][0] + Y[1] + Raise[1][1] + Y[2] + Raise[1][2]) / 3., + (Z[0] + Raise[2][0] + Z[1] + Raise[2][1] + Z[2] + Raise[2][2]) / 3., + t[0], t[1], t[2], NULL, View->Light); + } + if(!preproNormals && View->IntervalsType == DRAW_POST_NUMERIC) { d = (Val[0] + Val[1] + Val[2]) / 3.; if(d >= ValMin && d <= ValMax) { @@ -1130,29 +1161,70 @@ void Draw_VectorElement(int type, Post_View * View, int preproNormals, if(View->ShowElement) Draw_ElementBoundary(type, View, X, Y, Z, Raise); + double xc = 0., yc = 0., zc = 0.; + if(View->Normals || View->Tangents || + View->IntervalsType == DRAW_POST_NUMERIC || + View->ArrowLocation == DRAW_POST_LOCATE_COG){ + for(int k = 0; k < nbnod; k++) { + xc += X[k] + Raise[0][k]; + yc += Y[k] + Raise[1][k]; + zc += Z[k] + Raise[2][k]; + } + xc /= (double)nbnod; + yc /= (double)nbnod; + zc /= (double)nbnod; + } + + if(View->Normals && (type == TRIANGLE || type == QUADRANGLE)){ + double x1x0 = (X[1] + Raise[0][1]) - (X[0] + Raise[0][0]); + double y1y0 = (Y[1] + Raise[1][1]) - (Y[0] + Raise[1][0]); + double z1z0 = (Z[1] + Raise[2][1]) - (Z[0] + Raise[2][0]); + double x2x0 = (X[2] + Raise[0][2]) - (X[0] + Raise[0][0]); + double y2y0 = (Y[2] + Raise[1][2]) - (Y[0] + Raise[1][0]); + double z2z0 = (Z[2] + Raise[2][2]) - (Z[0] + Raise[2][0]); + double nn[3]; + nn[0] = y1y0 * z2z0 - z1z0 * y2y0; + nn[1] = z1z0 * x2x0 - x1x0 * z2z0; + nn[2] = x1x0 * y2y0 - y1y0 * x2x0; + norme(nn); + nn[0] *= View->Normals * CTX.pixel_equiv_x / CTX.s[0]; + nn[1] *= View->Normals * CTX.pixel_equiv_x / CTX.s[1]; + nn[2] *= View->Normals * CTX.pixel_equiv_x / CTX.s[2]; + glColor4ubv((GLubyte *) & CTX.color.mesh.normals); + Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, + CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, + xc, yc, zc, nn[0], nn[1], nn[2], NULL, View->Light); + } + + if(View->Tangents && (type == LINE)){ + double t[3] = { (X[1] + Raise[0][1]) - (X[0] + Raise[0][0]), + (Y[1] + Raise[1][1]) - (Y[0] + Raise[1][0]), + (Z[1] + Raise[2][1]) - (Z[0] + Raise[2][0]) }; + norme(t); + t[0] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[0]; + t[1] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[1]; + t[2] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[2]; + glColor4ubv((GLubyte *) & CTX.color.mesh.tangents); + Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, + CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, + xc, yc, zc, t[0], t[1], t[2], NULL, View->Light); + } + if(View->ArrowLocation == DRAW_POST_LOCATE_COG || View->IntervalsType == DRAW_POST_NUMERIC) { double dd = 0., ext_dd = 0., dx = 0., dy = 0., dz = 0.; - double xc = 0., yc = 0., zc = 0.; for(int k = 0; k < nbnod; k++) { dd += norm[k]; ext_dd += ext_norm[k]; dx += Val[k][0]; dy += Val[k][1]; dz += Val[k][2]; - xc += X[k] + Raise[0][k]; - yc += Y[k] + Raise[1][k]; - zc += Z[k] + Raise[2][k]; } dd /= (double)nbnod; ext_dd /= (double)nbnod; dx /= (double)nbnod; dy /= (double)nbnod; dz /= (double)nbnod; - xc /= (double)nbnod; - yc /= (double)nbnod; - zc /= (double)nbnod; - // allow for some roundoff error due to the computation at the barycenter if(ext_dd != 0.0 && ext_dd >= ext_min * (1. - 1.e-15) && diff --git a/Plugin/CutGrid.h b/Plugin/CutGrid.h index 83fe47b36aa6c3c26657d17517f6e39107e611c8..b75527f2cbcb4de2f0dcd1dfa96057fd36c7145a 100644 --- a/Plugin/CutGrid.h +++ b/Plugin/CutGrid.h @@ -1,5 +1,5 @@ #ifndef _CUT_GRID_H_ -#define _CUT_GRID_H +#define _CUT_GRID_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/CutMap.h b/Plugin/CutMap.h index 124823e9166e2ae75b057443d8dd20c72754971a..9d1166be31c46864d69da59f991d968487b3b6a0 100644 --- a/Plugin/CutMap.h +++ b/Plugin/CutMap.h @@ -1,5 +1,5 @@ #ifndef _CUT_MAP_H_ -#define _CUT_MAP_H +#define _CUT_MAP_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/CutParametric.cpp b/Plugin/CutParametric.cpp index 5b5052cbe3f94eb0abcb118b5008f86ef2ea4ac4..5ee0536d95d5e8636f0dc489ff86450993ff286d 100644 --- a/Plugin/CutParametric.cpp +++ b/Plugin/CutParametric.cpp @@ -1,4 +1,4 @@ -// $Id: CutParametric.cpp,v 1.4 2004-06-24 16:02:21 geuzaine Exp $ +// $Id: CutParametric.cpp,v 1.5 2004-11-13 22:52:46 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -41,6 +41,7 @@ StringXNumber CutParametricOptions_Number[] = { //{GMSH_FULLRC, "minW", NULL, 0.}, //{GMSH_FULLRC, "maxW", NULL, 1.}, //{GMSH_FULLRC, "nPointsW", NULL, 0.}, + {GMSH_FULLRC, "connectPoints", NULL, 0.}, {GMSH_FULLRC, "iView", NULL, -1.} }; @@ -78,8 +79,10 @@ void GMSH_CutParametricPlugin::getInfos(char *author, char *copyright, "Plugin(CutParametric) cuts a triangle/tetrahedron\n" "scalar view `iView' with the parametric function\n" "(`X'(u), `Y'(u), `Z'(u)), using `nPointsU' values of\n" - "the parameter u in [`minU', `maxU']. If `iView' < 0,\n" - "the plugin is run on the current view.\n" + "the parameter u in [`minU', `maxU']. If `connect'\n" + "is set, the plugin creates scalar line elements;\n" + "otherwise, the plugin generates scalar points. If\n" + "`iView' < 0, the plugin is run on the current view.\n" "\n" "Plugin(CutParametric) creates one new view.\n"); } @@ -111,7 +114,7 @@ void GMSH_CutParametricPlugin::catchErrorMessage(char *errorMessage) const Post_View *GMSH_CutParametricPlugin::execute(Post_View * v) { - int iView = (int)CutParametricOptions_Number[3].def; + int iView = (int)CutParametricOptions_Number[4].def; if(iView < 0) iView = v ? v->Index : 0; @@ -131,6 +134,8 @@ Post_View *GMSH_CutParametricPlugin::execute(Post_View * v) double minU = CutParametricOptions_Number[0].def; double maxU = CutParametricOptions_Number[1].def; int nbU = (int)CutParametricOptions_Number[2].def; + int connect = (int)CutParametricOptions_Number[3].def; + if(nbU < 2) connect = 0; char *exprx = CutParametricOptions_String[0].def; char *expry = CutParametricOptions_String[1].def; @@ -160,22 +165,46 @@ Post_View *GMSH_CutParametricPlugin::execute(Post_View * v) Post_View *v2 = BeginView(1); Post_View *v1 = (Post_View*)List_Pointer(CTX.post.list, iView); OctreePost o(v1); - double *res = new double[9*v1->NbTimeStep]; - + double *res0 = new double[v1->NbTimeStep]; + double *res = new double[v1->NbTimeStep]; + double x, y, z, x0, y0, z0; for(int i = 0; i < nbU; ++i){ + if(i && connect){ + x0 = x; + y0 = y; + z0 = z; + for(int k = 0; k < v1->NbTimeStep; ++k) res0[k] = res[k]; + } double u = minU + (double)(i)/(double)(nbU-1) * (maxU - minU); char *names[] = { "u" }; double values[] = { u }; - double x = evaluator_evaluate(fx, sizeof(names)/sizeof(names[0]), names, values); - double y = evaluator_evaluate(fy, sizeof(names)/sizeof(names[0]), names, values); - double z = evaluator_evaluate(fz, sizeof(names)/sizeof(names[0]), names, values); + x = evaluator_evaluate(fx, sizeof(names)/sizeof(names[0]), names, values); + y = evaluator_evaluate(fy, sizeof(names)/sizeof(names[0]), names, values); + z = evaluator_evaluate(fz, sizeof(names)/sizeof(names[0]), names, values); o.searchScalar(x, y, z, res); - List_Add(v2->SP, &x); - List_Add(v2->SP, &y); - List_Add(v2->SP, &z); - for(int k = 0; k < v1->NbTimeStep; ++k) - List_Add(v2->SP, &res[k]); - v2->NbSP++; + if(connect){ + if(i){ + List_Add(v2->SL, &x0); + List_Add(v2->SL, &x); + List_Add(v2->SL, &y0); + List_Add(v2->SL, &y); + List_Add(v2->SL, &z0); + List_Add(v2->SL, &z); + for(int k = 0; k < v1->NbTimeStep; ++k){ + List_Add(v2->SL, &res0[k]); + List_Add(v2->SL, &res[k]); + } + v2->NbSL++; + } + } + else{ + List_Add(v2->SP, &x); + List_Add(v2->SP, &y); + List_Add(v2->SP, &z); + for(int k = 0; k < v1->NbTimeStep; ++k) + List_Add(v2->SP, &res[k]); + v2->NbSP++; + } } char name[1024], filename[1024]; @@ -186,6 +215,7 @@ Post_View *GMSH_CutParametricPlugin::execute(Post_View * v) evaluator_destroy(fx); evaluator_destroy(fy); evaluator_destroy(fz); + delete [] res0; delete [] res; return v2; diff --git a/Plugin/CutParametric.h b/Plugin/CutParametric.h index 442894c3f99813dcf77592a0c21e8343700a6538..a20deea1014a9ec45fe63ecd75d8e3f83e104436 100644 --- a/Plugin/CutParametric.h +++ b/Plugin/CutParametric.h @@ -1,5 +1,5 @@ #ifndef _CUT_PARAMETRIC_H_ -#define _CUT_PARAMETRIC_H +#define _CUT_PARAMETRIC_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/CutPlane.h b/Plugin/CutPlane.h index 434828345ae8b04a0352bfa532266fb6834b7fc2..a3e232972351ab556704136d8ea8bc06ba7774a7 100644 --- a/Plugin/CutPlane.h +++ b/Plugin/CutPlane.h @@ -1,5 +1,5 @@ #ifndef _CUT_PLANE_H_ -#define _CUT_PLANE_H +#define _CUT_PLANE_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/CutSphere.h b/Plugin/CutSphere.h index d4889b20d9be898789c4854d7b07826eeb8adc4e..59dff513dbe11782e72d6f3959ce044d57ddb98a 100644 --- a/Plugin/CutSphere.h +++ b/Plugin/CutSphere.h @@ -1,5 +1,5 @@ #ifndef _CUT_SPHERE_H_ -#define _CUT_SPHERE_H +#define _CUT_SPHERE_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/DisplacementRaise.h b/Plugin/DisplacementRaise.h index 52e33e0f92b3049e83e2ae413f6cf7478f8d9035..a9d181130aa3dbcca02044986138267c1728083a 100644 --- a/Plugin/DisplacementRaise.h +++ b/Plugin/DisplacementRaise.h @@ -1,5 +1,5 @@ #ifndef _DISPLACEMENT_RAISE_H_ -#define _DISPLACEMENT_RAISE_H +#define _DISPLACEMENT_RAISE_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/Evaluate.h b/Plugin/Evaluate.h index 73564af9477962cd49f8b5c5ba5afd387e517571..5f42c2c5ec1d1b170d5495a55dd9adf49b06b16a 100644 --- a/Plugin/Evaluate.h +++ b/Plugin/Evaluate.h @@ -1,5 +1,5 @@ #ifndef _EVALUATE_H_ -#define _EVALUATE_H +#define _EVALUATE_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/HarmonicToTime.h b/Plugin/HarmonicToTime.h index b5f1e87b9b539817c66f6550f535ac1bb978762f..41fff715d2c4417ed8ef741225f6c653aeab741e 100644 --- a/Plugin/HarmonicToTime.h +++ b/Plugin/HarmonicToTime.h @@ -1,5 +1,5 @@ #ifndef _HARMONIC_2_TIME_H_ -#define _HARMONIC_2_TIME_H +#define _HARMONIC_2_TIME_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/Makefile b/Plugin/Makefile index 3fb428e3f112d6b404841f3353f2d985bfaeaf9b..6f9c86118b4f588f39e09db3497e8fd74c8d1c7f 100644 --- a/Plugin/Makefile +++ b/Plugin/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.59 2004-11-09 16:27:53 remacle Exp $ +# $Id: Makefile,v 1.60 2004-11-13 22:52:46 geuzaine Exp $ # # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle # @@ -41,6 +41,7 @@ SRC = Plugin.cpp\ Extract.cpp\ DecomposeInSimplex.cpp\ Evaluate.cpp\ + Integrate.cpp\ HarmonicToTime.cpp OBJ = ${SRC:.cpp=.o} @@ -72,7 +73,7 @@ Plugin.o: Plugin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Common/GmshMatrix.h PluginManager.h CutMap.h Levelset.h CutGrid.h \ StreamLines.h CutPlane.h CutParametric.h CutSphere.h Skin.h \ ../DataStr/Tree.h ../DataStr/avl.h Extract.h HarmonicToTime.h \ - DecomposeInSimplex.h Smooth.h Transform.h Triangulate.h \ + Integrate.h DecomposeInSimplex.h Smooth.h Transform.h Triangulate.h \ SphericalRaise.h DisplacementRaise.h StructuralSolver.h ../Geo/Geo.h \ ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \ ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \ @@ -181,6 +182,11 @@ Evaluate.o: Evaluate.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h \ ../Common/GmshMatrix.h Evaluate.h ../Common/Context.h \ ../Numeric/Numeric.h +Integrate.o: Integrate.cpp Plugin.h ../Common/Options.h \ + ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \ + ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \ + ../Common/GmshMatrix.h Integrate.h ../Common/Context.h \ + ../Numeric/Numeric.h ShapeFunctions.h HarmonicToTime.o: HarmonicToTime.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \ ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \ diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp index 423c05de93b9db6a0f5c8724a15c6241e4d6a81b..5f3a0954fa0e022ca31957b50822bfb744fa5a2b 100644 --- a/Plugin/Plugin.cpp +++ b/Plugin/Plugin.cpp @@ -1,4 +1,4 @@ -// $Id: Plugin.cpp,v 1.63 2004-11-09 16:27:53 remacle Exp $ +// $Id: Plugin.cpp,v 1.64 2004-11-13 22:52:46 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -41,6 +41,7 @@ #include "Skin.h" #include "Extract.h" #include "HarmonicToTime.h" +#include "Integrate.h" #include "DecomposeInSimplex.h" #include "Smooth.h" #include "Transform.h" @@ -155,8 +156,9 @@ GMSH_PluginManager *GMSH_PluginManager::instance() void GMSH_PluginManager::registerDefaultPlugins() { - // SOLVE PLUGINS char *homeplugins = getenv("GMSHPLUGINSHOME"); + + // SOLVE PLUGINS if(CTX.solver.plugins){ allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("StructuralSolver", GMSH_RegisterStructuralSolverPlugin())); @@ -190,6 +192,8 @@ void GMSH_PluginManager::registerDefaultPlugins() ("DisplacementRaise", GMSH_RegisterDisplacementRaisePlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("HarmonicToTime", GMSH_RegisterHarmonicToTimePlugin())); + allPlugins.insert(std::pair < char *, GMSH_Plugin * > + ("Integrate", GMSH_RegisterIntegratePlugin())); #if defined(HAVE_TRIANGLE) allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("Triangulate", GMSH_RegisterTriangulatePlugin())); diff --git a/Plugin/Smooth.h b/Plugin/Smooth.h index a59390516b3808fabae4d66393375e03733ada79..a1a5fa13584e6211271db55a3017faa65e6ac5dd 100644 --- a/Plugin/Smooth.h +++ b/Plugin/Smooth.h @@ -1,5 +1,5 @@ #ifndef _SMOOTH_H_ -#define _SMOOTH_H +#define _SMOOTH_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/SphericalRaise.h b/Plugin/SphericalRaise.h index 9526588ddef2bd298899a13ddceb4490b3a9bd43..b97f45d1fa3b4346353b8bb6d6fedcc9bf505982 100644 --- a/Plugin/SphericalRaise.h +++ b/Plugin/SphericalRaise.h @@ -1,5 +1,5 @@ #ifndef _SPHERICAL_RAISE_H_ -#define _SPHERICAL_RAISE_H +#define _SPHERICAL_RAISE_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/Transform.cpp b/Plugin/Transform.cpp index 3f1c46295d7424f742603e8421ce034d3556bcc7..0b84326cab786c5555a1511311b894a6c079d0fb 100644 --- a/Plugin/Transform.cpp +++ b/Plugin/Transform.cpp @@ -1,4 +1,4 @@ -// $Id: Transform.cpp,v 1.24 2004-05-16 20:04:43 geuzaine Exp $ +// $Id: Transform.cpp,v 1.25 2004-11-13 22:52:46 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -37,6 +37,7 @@ StringXNumber TransformOptions_Number[] = { {GMSH_FULLRC, "A31", NULL, 0.}, {GMSH_FULLRC, "A32", NULL, 0.}, {GMSH_FULLRC, "A33", NULL, 1.}, + {GMSH_FULLRC, "swapOrientation", NULL, 0.}, {GMSH_FULLRC, "iView", NULL, -1.} }; @@ -65,13 +66,14 @@ void GMSH_TransformPlugin::getInfos(char *author, char *copyright, strcpy(author, "C. Geuzaine (geuz@geuz.org)"); strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, - "Plugin(Transform) transforms the coordinates of\n" - "the nodes of the view `iView' by the matrix\n" + "Plugin(Transform) transforms the node coordinates\n" + "of the elements in the view `iView' by the matrix\n" "[`A11' `A12' `A13']\n" "[`A21' `A22' `A23']\n" "[`A31' `A32' `A33'].\n" - "If `iView' < 0, the plugin is run on the current\n" - "view.\n" + "If `swapOrientation' is set, the orientation of the\n" + "elements is reversed. If `iView' < 0, the plugin\n" + "is run on the current view.\n" "\n" "Plugin(Transform) is executed in-place.\n"); } @@ -91,6 +93,61 @@ void GMSH_TransformPlugin::catchErrorMessage(char *errorMessage) const strcpy(errorMessage, "Transform failed..."); } +// Transformation + +static void transform(double mat[3][3], double v[3], + double *x, double *y, double *z) +{ + *x = mat[0][0] * v[0] + mat[0][1] * v[1] + mat[0][2] * v[2]; + *y = mat[1][0] * v[0] + mat[1][1] * v[1] + mat[1][2] * v[2]; + *z = mat[2][0] * v[0] + mat[2][1] * v[1] + mat[2][2] * v[2]; +} + +static void transform_list(Post_View *view, List_T *list, int nbList, + int nbVert, int nbComp, double mat[3][3], int swap) +{ + if(!nbList) return; + + int nb = List_Nbr(list) / nbList; + double *copy = NULL; + if(swap) copy = new double[nb]; + + for(int i = 0; i < List_Nbr(list); i += nb) { + double *x = (double *)List_Pointer_Fast(list, i); + double *y = (double *)List_Pointer_Fast(list, i + nbVert); + double *z = (double *)List_Pointer_Fast(list, i + 2 * nbVert); + for(int j = 0; j < nbVert; j++) { + double v[3] = { x[j], y[j], z[j] }; + transform(mat, v, &x[j], &y[j], &z[j]); + if(x[j] < view->BBox[0]) view->BBox[0] = x[j]; + if(x[j] > view->BBox[1]) view->BBox[1] = x[j]; + if(y[j] < view->BBox[2]) view->BBox[2] = y[j]; + if(y[j] > view->BBox[3]) view->BBox[3] = y[j]; + if(z[j] < view->BBox[4]) view->BBox[4] = z[j]; + if(z[j] > view->BBox[5]) view->BBox[5] = z[j]; + } + if(copy){ + for(int j = 0; j < nb; j++) + copy[j] = x[j]; + for(int j = 0; j < nbVert; j++){ + x[j] = copy[nbVert-j-1]; + x[nbVert+j] = copy[2*nbVert-j-1]; + x[2*nbVert+j] = copy[3*nbVert-j-1]; + } + for(int ts = 0; ts < view->NbTimeStep; ts++){ + for(int j = 0; j < nbVert; j++){ + for(int k = 0; k < nbComp; k++){ + x[3*nbVert+nbComp*nbVert*ts+nbComp*j+k] = + copy[3*nbVert+nbComp*nbVert*ts+nbComp*(nbVert-j-1)+k]; + } + } + } + } + } + + if(copy) delete [] copy; +} + Post_View *GMSH_TransformPlugin::execute(Post_View * v) { double mat[3][3]; @@ -105,7 +162,9 @@ Post_View *GMSH_TransformPlugin::execute(Post_View * v) mat[2][1] = TransformOptions_Number[7].def; mat[2][2] = TransformOptions_Number[8].def; - int iView = (int)TransformOptions_Number[9].def; + int swap = (int)TransformOptions_Number[9].def; + + int iView = (int)TransformOptions_Number[10].def; if(iView < 0) iView = v ? v->Index : 0; @@ -117,8 +176,39 @@ Post_View *GMSH_TransformPlugin::execute(Post_View * v) Post_View *v1 = (Post_View*)List_Pointer(CTX.post.list, iView); - v1->transform(mat); + for(int i = 0; i < 3; i++) { + v1->BBox[2 * i] = VAL_INF; + v1->BBox[2 * i + 1] = -VAL_INF; + } + + transform_list(v1, v1->SP, v1->NbSP, 1, 1, mat, swap); + transform_list(v1, v1->SL, v1->NbSL, 2, 1, mat, swap); + transform_list(v1, v1->ST, v1->NbST, 3, 1, mat, swap); + transform_list(v1, v1->SQ, v1->NbSQ, 4, 1, mat, swap); + transform_list(v1, v1->SS, v1->NbSS, 4, 1, mat, swap); + transform_list(v1, v1->SH, v1->NbSH, 8, 1, mat, swap); + transform_list(v1, v1->SI, v1->NbSI, 6, 1, mat, swap); + transform_list(v1, v1->SY, v1->NbSY, 5, 1, mat, swap); + + transform_list(v1, v1->VP, v1->NbVP, 1, 3, mat, swap); + transform_list(v1, v1->VL, v1->NbVL, 2, 3, mat, swap); + transform_list(v1, v1->VT, v1->NbVT, 3, 3, mat, swap); + transform_list(v1, v1->VQ, v1->NbVQ, 4, 3, mat, swap); + transform_list(v1, v1->VS, v1->NbVS, 4, 3, mat, swap); + transform_list(v1, v1->VH, v1->NbVH, 8, 3, mat, swap); + transform_list(v1, v1->VI, v1->NbVI, 6, 3, mat, swap); + transform_list(v1, v1->VY, v1->NbVY, 5, 3, mat, swap); + + transform_list(v1, v1->TP, v1->NbTP, 1, 9, mat, swap); + transform_list(v1, v1->TL, v1->NbTL, 2, 9, mat, swap); + transform_list(v1, v1->TT, v1->NbTT, 3, 9, mat, swap); + transform_list(v1, v1->TQ, v1->NbTQ, 4, 9, mat, swap); + transform_list(v1, v1->TS, v1->NbTS, 4, 9, mat, swap); + transform_list(v1, v1->TH, v1->NbTH, 8, 9, mat, swap); + transform_list(v1, v1->TI, v1->NbTI, 6, 9, mat, swap); + transform_list(v1, v1->TY, v1->NbTY, 5, 9, mat, swap); + + v1->Changed = 1; return v1; } - diff --git a/Plugin/Transform.h b/Plugin/Transform.h index b281caa0434b424e3544fc07f6cf7340d8d81892..5e064630932fd18bb5733eac0db1911ef4e2f6f1 100644 --- a/Plugin/Transform.h +++ b/Plugin/Transform.h @@ -1,5 +1,5 @@ #ifndef _TRANSFORM_H_ -#define _TRANSFORM_H +#define _TRANSFORM_H_ // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // diff --git a/TODO b/TODO index e3f780f8bf00bea868d3a8d45b8d842b9116432e..a2fb5ba6a90eb264732abbadf5c572027d101e5e 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,11 @@ -$Id: TODO,v 1.66 2004-10-26 00:43:21 geuzaine Exp $ +$Id: TODO,v 1.67 2004-11-13 22:52:44 geuzaine Exp $ + +******************************************************************** + +add a "non-formatted" view->save mode; would enable to exploit results +from plugins in gnuplot & co. + +******************************************************************** add an interactive way to choose the orientation of surfaces in surface loops and lines in line loops diff --git a/doc/VERSIONS b/doc/VERSIONS index 9081f49a365186981981f6a954c2572d3bcc7ff8..5111ef7e5c78f316437ca12f2c678d419ad0a230 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,4 +1,4 @@ -$Id: VERSIONS,v 1.264 2004-10-30 15:23:45 geuzaine Exp $ +$Id: VERSIONS,v 1.265 2004-11-13 22:52:46 geuzaine Exp $ New since 1.56: generalized displacement maps to display arbitrary view types; the arrows representing a vector field can now also be @@ -6,8 +6,8 @@ colored by the values from other scalar, vector or tensor fields; new adaptive high order visualization mode; new options for solvers (SocketCommand and NameCommand) and views (ArrowSizeProportional); fixed display of undesired solver plugin popups; enhanced interactive -plugin behaviour; new Plugin(HarmonicToTime); various small bug fixes -and enhancements; +plugin behaviour; new Plugin(HarmonicToTime); new Plugin(Integrate); +various small bug fixes and enhancements; New in 1.56: new post-processing option to draw a scalar view raised by a displacement view without using Plugin(DisplacementRaise) (makes diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi index cdf735bd4fa00bad39bdffba59b92e4a2a5136b5..4d9650d4c9bcd16f53d3fe87bfbeefcd2fad6703 100644 --- a/doc/texinfo/opt_plugin.texi +++ b/doc/texinfo/opt_plugin.texi @@ -68,8 +68,10 @@ Default value: @code{4} Plugin(CutParametric) cuts a triangle/tetrahedron scalar view `iView' with the parametric function (`X'(u), `Y'(u), `Z'(u)), using `nPointsU' values of -the parameter u in [`minU', `maxU']. If `iView' < 0, -the plugin is run on the current view. +the parameter u in [`minU', `maxU']. If `connect' +is set, the plugin creates scalar line elements; +otherwise, the plugin generates scalar points. If +`iView' < 0, the plugin is run on the current view. Plugin(CutParametric) creates one new view. @@ -90,6 +92,8 @@ Default value: @code{0} Default value: @code{6.28319} @item nPointsU Default value: @code{360} +@item connectPoints +Default value: @code{0} @item iView Default value: @code{-1} @end table @@ -270,6 +274,21 @@ Default value: @code{20} Default value: @code{-1} @end table +@item Plugin(Integrate) +Plugin(Integrate) integrates scalar fields over +all the elements in the view `iView', as well as +the circulation/flux of vector fields over +line/surface elements. If `iView' < 0, the plugin +is run on the current view. + +Plugin(Integrate) creates one new view. + +Numeric options: +@table @code +@item iView +Default value: @code{-1} +@end table + @item Plugin(Skin) Plugin(Skin) extracts the skin (the boundary) of the view `iView'. If `iView' < 0, the plugin is run @@ -383,13 +402,14 @@ Default value: @code{-1} @end table @item Plugin(Transform) -Plugin(Transform) transforms the coordinates of -the nodes of the view `iView' by the matrix +Plugin(Transform) transforms the node coordinates +of the elements in the view `iView' by the matrix [`A11' `A12' `A13'] [`A21' `A22' `A23'] [`A31' `A32' `A33']. -If `iView' < 0, the plugin is run on the current -view. +If `swapOrientation' is set, the orientation of the +elements is reversed. If `iView' < 0, the plugin +is run on the current view. Plugin(Transform) is executed in-place. @@ -413,6 +433,8 @@ Default value: @code{0} Default value: @code{0} @item A33 Default value: @code{1} +@item swapOrientation +Default value: @code{0} @item iView Default value: @code{-1} @end table diff --git a/doc/texinfo/opt_post.texi b/doc/texinfo/opt_post.texi index 093baf278225ff65e53463b0953c20c4826ae8cb..3c326d4889d213fb1f6447010c8d5ec7cf01740e 100644 --- a/doc/texinfo/opt_post.texi +++ b/doc/texinfo/opt_post.texi @@ -21,7 +21,7 @@ Saved in: @code{-} @item PostProcessing.HorizontalScales Display value scales horizontally@* -Default value: @code{0}@* +Default value: @code{1}@* Saved in: @code{General.OptionsFileName} @item PostProcessing.Link diff --git a/doc/texinfo/opt_view.texi b/doc/texinfo/opt_view.texi index a2c7eb284a6d2197ba52fe5def21c5a398d51603..01bad3bddecf73440e346b2973b9a3bcc3ddaa70 100644 --- a/doc/texinfo/opt_view.texi +++ b/doc/texinfo/opt_view.texi @@ -219,6 +219,11 @@ Number of time steps in the view (do not change this!)@* Default value: @code{1}@* Saved in: @code{-} +@item View.Normals +Display size of normal vectors (in pixels)@* +Default value: @code{0}@* +Saved in: @code{General.OptionsFileName} + @item View.OffsetX Translation of the view along X-axis (in model coordinates)@* Default value: @code{0}@* @@ -304,6 +309,11 @@ Smooth the normals?@* Default value: @code{0}@* Saved in: @code{General.OptionsFileName} +@item View.Tangents +Display size of tangent vectors (in pixels)@* +Default value: @code{0}@* +Saved in: @code{-} + @item View.TensorType Tensor Visualization Type@* Default value: @code{0}@*