diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 40f7f68486f0be2abc4f639edc0877421fb7294c..6c1ae54057ce96a5b36afa66e87b7c8d1cff59e4 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -850,7 +850,7 @@ StringXNumber GeometryOptions_Number[] = { { F|O, "PointSize" , opt_geometry_point_size , 4. , "Display size of points (in pixels)" }, { F|O, "PointType" , opt_geometry_point_type , 0. , - "Display points as solid color dots (0), 3D spheres (1) or scaled spheres (2)" }, + "Display points as solid color dots (0) or 3D spheres (1)" }, { F|O, "ScalingFactor" , opt_geometry_scaling_factor , 1.0 , "Global geometry scaling factor" }, @@ -1308,7 +1308,7 @@ StringXNumber ViewOptions_Number[] = { { F|O, "PointSize" , opt_view_point_size , 3. , "Display size of points (in pixels)" }, { F|O, "PointType" , opt_view_point_type , 0. , - "Display points as solid color dots (0) or 3D spheres (1)" }, + "Display points as solid color dots (0), 3D spheres (1), scaled dots (2) or scaled spheres (3)" }, { F|O, "PositionX" , opt_view_position0 , 100. , "Horizontal position (in pixels) of the upper left corner of the scale or 2D plot" }, { F|O, "PositionY" , opt_view_position1 , 50. , diff --git a/Common/Options.cpp b/Common/Options.cpp index ed24777b8d562690e8ab35f1b64e9fbadab148a4..06ad1a4da1e651f3bf01fd2c365ad11fc7173632 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -7204,7 +7204,7 @@ double opt_view_point_type(OPT_ARGS_NUM) GET_VIEW(0.); if(action & GMSH_SET) { opt->PointType = (int)val; - if(opt->PointType < 0 || opt->PointType > 2) + if(opt->PointType < 0 || opt->PointType > 3) opt->PointType = 0; if(view) view->setChanged(true); } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index acde1e6233afc7c194137540b1bf13406018d2fc..5030cf958bded4f682d4a96643997a45c86ea5fb 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -358,7 +358,8 @@ static Fl_Menu_Item menu_point_display[] = { static Fl_Menu_Item menu_point_display_post[] = { {"Color dot", 0, 0, 0}, {"3D sphere", 0, 0, 0}, - {"Scaled sphere", 0, 0, 0}, + {"Scaled dot", 0, 0, 0}, + {"Scaled sphere", 0, 0, 0}, {0} }; diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp index f376c3d5bf0241e84378927a6e2d4dc5fa90fe23..1d23d6ae243b1846237b45499b5473ddcf7767c8 100644 --- a/Graphics/Post.cpp +++ b/Graphics/Post.cpp @@ -997,11 +997,22 @@ static void drawArrays(PView *p, VertexArray *va, GLint type, bool useNormalArra float *p = va->getVertexArray(3 * i); glColor4ubv((GLubyte *)va->getColorArray(4 * i)); double f = 1.; - if(opt->PointType == 2){ + if(opt->PointType > 1){ char *n = va->getNormalArray(3 * i); f = char2float(*n); } - Draw_Sphere(opt->PointSize * f, p[0], p[1], p[2], opt->Light); + if(opt->PointType == 2){ + int s = (int)(opt->PointSize * f); + if(s){ + glPointSize(s); + gl2psPointSize(s * CTX.print.eps_point_size_factor); + glBegin(GL_POINTS); + glVertex3d(p[0], p[1], p[2]); + glEnd(); + } + } + else + Draw_Sphere(opt->PointSize * f, p[0], p[1], p[2], opt->Light); } } else if(type == GL_LINES && opt->LineType > 0){