Skip to content
Snippets Groups Projects
Commit febe88a3 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Simplex boundary display

parent 4ae413c6
Branches
Tags
No related merge requests found
......@@ -449,6 +449,8 @@ StringXNumber ViewOptions_Number[] = {
"Type of interval display (1=iso, 2=discrete, 3=continuous, 4=numeric)" },
{ F|O, "NbIso" , opt_view_nb_iso , 15. ,
"Number of intervals" },
{ F|O, "Boundary" , opt_view_boundary , 0 ,
"Draw the N-b dimensional boundary of the simplex (N=dimension, b=option value" },
{ F|O, "Light" , opt_view_light , 0. ,
"Enable light sources?" },
{ F|O, "ShowElement" , opt_view_show_element , 0. ,
......
// $Id: Options.cpp,v 1.28 2001-06-25 13:05:16 geuzaine Exp $
// $Id: Options.cpp,v 1.29 2001-06-26 16:47:23 geuzaine Exp $
#include "Gmsh.h"
#include "GmshUI.h"
......@@ -1735,6 +1735,19 @@ double opt_view_nb_iso(OPT_ARGS_NUM){
#endif
return v->NbIso;
}
double opt_view_boundary(OPT_ARGS_NUM){
GET_VIEW(0.) ;
if(action & GMSH_SET){
v->Boundary = (int)val;
v->Changed = 1;
}
#ifdef _FLTK
if(WID && (action & GMSH_GUI) && (num == WID->view_number)){
WID->view_value[11]->value(v->Boundary);
}
#endif
return v->Boundary;
}
double opt_view_light(OPT_ARGS_NUM){
GET_VIEW(0.) ;
if(action & GMSH_SET){
......
......@@ -187,9 +187,6 @@ double opt_solver_getdp_mergeviews(OPT_ARGS_NUM);
double opt_post_scales(OPT_ARGS_NUM);
double opt_post_link(OPT_ARGS_NUM);
double opt_post_smooth(OPT_ARGS_NUM);
double opt_post_initial_visibility(OPT_ARGS_NUM);
double opt_post_initial_intervals(OPT_ARGS_NUM);
double opt_post_initial_nbiso(OPT_ARGS_NUM);
double opt_post_anim_delay(OPT_ARGS_NUM);
double opt_post_nb_views(OPT_ARGS_NUM);
double opt_post_color_scheme(OPT_ARGS_NUM);
......@@ -209,6 +206,7 @@ double opt_view_arrow_scale(OPT_ARGS_NUM);
double opt_view_visible(OPT_ARGS_NUM);
double opt_view_intervals_type(OPT_ARGS_NUM);
double opt_view_nb_iso(OPT_ARGS_NUM);
double opt_view_boundary(OPT_ARGS_NUM);
double opt_view_light(OPT_ARGS_NUM);
double opt_view_show_element(OPT_ARGS_NUM);
double opt_view_show_time(OPT_ARGS_NUM);
......
// $Id: Views.cpp,v 1.38 2001-05-24 10:11:28 geuzaine Exp $
// $Id: Views.cpp,v 1.39 2001-06-26 16:47:23 geuzaine Exp $
#include <set>
#include "Gmsh.h"
......@@ -402,6 +402,7 @@ void CopyViewOptions(Post_View *src, Post_View *dest){
dest->ArrowScale = src->ArrowScale;
dest->Visible = src->Visible;
dest->IntervalsType = src->IntervalsType;
dest->Boundary = src->Boundary ;
dest->NbIso = src->NbIso;
dest->Light = src->Light ;
dest->ShowElement = src->ShowElement;
......
......@@ -37,6 +37,7 @@ class Post_View{
int TimeStep;
int DrawPoints, DrawLines, DrawTriangles, DrawTetrahedra;
int DrawScalars, DrawVectors, DrawTensors;
int Boundary;
ColorTable CT;
// dynamic
......
// $Id: Callbacks.cpp,v 1.62 2001-06-06 09:39:49 geuzaine Exp $
// $Id: Callbacks.cpp,v 1.63 2001-06-26 16:47:23 geuzaine Exp $
#include <sys/types.h>
#include <signal.h>
......@@ -1691,6 +1691,7 @@ void view_options_ok_cb(CALLBACK_ARGS){
opt_view_raise2(i, GMSH_SET, WID->view_value[8]->value());
opt_view_timestep(i, GMSH_SET, WID->view_value[9]->value());
opt_view_arrow_scale(i, GMSH_SET, WID->view_value[10]->value());
opt_view_boundary(i, GMSH_SET, WID->view_value[11]->value());
opt_view_name(i, GMSH_SET, (char*)WID->view_input[0]->value());
opt_view_format(i, GMSH_SET, (char*)WID->view_input[1]->value());
......
// $Id: GUI.cpp,v 1.84 2001-06-13 11:04:23 geuzaine Exp $
// $Id: GUI.cpp,v 1.85 2001-06-26 16:47:23 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.
......@@ -1969,6 +1969,13 @@ void GUI::create_view_options_window(int num){
view_butt[i]->labelsize(CTX.fontsize);
view_butt[i]->selection_color(FL_YELLOW);
}
view_value[11] = new Fl_Value_Input(2*WB, 2*WB+ 6*BH, IW, BH, "Boundary operator");
view_value[11]->labelsize(CTX.fontsize);
view_value[11]->textsize(CTX.fontsize);
view_value[11]->type(FL_HORIZONTAL);
view_value[11]->align(FL_ALIGN_RIGHT);
view_value[11]->minimum(0);
view_value[11]->maximum(3);
o->end();
}
// Offset and Raise
......@@ -2123,6 +2130,7 @@ void GUI::update_view_window(int num){
// intervals
opt_view_nb_iso(num, GMSH_GUI, 0);
opt_view_intervals_type(num, GMSH_GUI, 0);
opt_view_boundary(num, GMSH_GUI, 0);
// offset/raise
opt_view_offset0(num, GMSH_GUI, 0);
......
// $Id: PostSimplex.cpp,v 1.16 2001-04-22 18:13:02 geuzaine Exp $
// $Id: PostSimplex.cpp,v 1.17 2001-06-26 16:47:23 geuzaine Exp $
#include "Gmsh.h"
#include "GmshUI.h"
......@@ -257,9 +257,28 @@ void Draw_ScalarTetrahedron(Post_View *View,
double *V){
int k;
double d, xx[4], yy[4], zz[4];
double d, xx[4], yy[4], zz[4], vv[4];
char Num[100];
if(View->Boundary == 2){
// boundary == 0 should draw the tet
// boundary == 1 should draw the faces
// boundary == 2 should draw the edges
// boundary == 3 should draw the vertices
Draw_ScalarLine(View, ValMin, ValMax, Raise, &X[0], &Y[0], &Z[0], &V[0]);//01
Draw_ScalarLine(View, ValMin, ValMax, Raise, &X[1], &Y[1], &Z[1], &V[1]);//12
Draw_ScalarLine(View, ValMin, ValMax, Raise, &X[2], &Y[2], &Z[2], &V[2]);//23
// beeek...
xx[0] = X[0]; yy[0] = Y[0]; zz[0] = Z[0]; vv[0] = V[0];
xx[1] = X[2]; yy[1] = Y[2]; zz[1] = Z[2]; vv[1] = V[2];
Draw_ScalarLine(View, ValMin, ValMax, Raise, xx, yy, zz, vv);//02
xx[1] = X[3]; yy[1] = Y[3]; zz[1] = Z[3]; vv[1] = V[3];
Draw_ScalarLine(View, ValMin, ValMax, Raise, xx, yy, zz, vv);//03
xx[0] = X[1]; yy[0] = Y[1]; zz[0] = Z[1]; vv[0] = V[1];
Draw_ScalarLine(View, ValMin, ValMax, Raise, xx, yy, zz, vv);//13
return;
}
for(k=0 ; k<4 ; k++)
RaiseFill(k, V[4*View->TimeStep+k], ValMin, Raise);
......@@ -298,7 +317,6 @@ void Draw_ScalarTetrahedron(Post_View *View,
}
else{
for(k=0 ; k<View->NbIso ; k++){
if(!preproNormals)Palette(View,View->NbIso,k);
IsoSimplex(View,preproNormals,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment