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

Correction selection interactive entites physiques

parent d842d239
No related branches found
No related tags found
No related merge requests found
/* $Id: Geo.cpp,v 1.6 2000-11-28 17:18:30 geuzaine Exp $ */ /* $Id: Geo.cpp,v 1.7 2000-12-01 13:38:53 geuzaine Exp $ */
#include "Gmsh.h" #include "Gmsh.h"
#include "Const.h" #include "Const.h"
...@@ -59,6 +59,7 @@ void add_infile(char *text, char *fich){ ...@@ -59,6 +59,7 @@ void add_infile(char *text, char *fich){
yyin = fopen("gmsh.tmp","w"); yyin = fopen("gmsh.tmp","w");
file = fopen(fich,"a"); file = fopen(fich,"a");
fprintf(yyin,"%s\n",text); fprintf(yyin,"%s\n",text);
Msg(SELECT,"%s",text);
fclose(yyin); fclose(yyin);
yyin = fopen("gmsh.tmp","r"); yyin = fopen("gmsh.tmp","r");
while(!feof(yyin)){ while(!feof(yyin)){
...@@ -431,14 +432,12 @@ void add_physical_entity(List_T *list, char *fich, int type, int *num){ ...@@ -431,14 +432,12 @@ void add_physical_entity(List_T *list, char *fich, int type, int *num){
if(((*num) = recognize_zone(MSH_PHYSICAL_VOLUME,list))) return; if(((*num) = recognize_zone(MSH_PHYSICAL_VOLUME,list))) return;
*num = NEWREG(); *num = NEWREG();
if (type == 1) switch(type){
sprintf(text, "Physical Line(%d) = {", *num); case ENT_POINT : sprintf(text, "Physical Point(%d) = {", *num); break;
else if (type == 2) case ENT_LINE : sprintf(text, "Physical Line(%d) = {", *num); break;
sprintf(text, "Physical Surface(%d) = {", *num); case ENT_SURFACE : sprintf(text, "Physical Surface(%d) = {", *num); break;
else if (type == 0) case ENT_VOLUME : sprintf(text, "Physical Volume(%d) = {", *num); break;
sprintf(text, "Physical Point(%d) = {", *num); }
else
sprintf(text, "Physical Volume(%d) = {", *num);
for(i=0; i<List_Nbr(list); i++){ for(i=0; i<List_Nbr(list); i++){
List_Read(list, i, &elementary_entity); List_Read(list, i, &elementary_entity);
......
/* $Id: CbGeom.cpp,v 1.5 2000-11-26 15:43:47 geuzaine Exp $ */ /* $Id: CbGeom.cpp,v 1.6 2000-12-01 13:38:58 geuzaine Exp $ */
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -483,15 +483,15 @@ void geom_event_handler (int event) { ...@@ -483,15 +483,15 @@ void geom_event_handler (int event) {
switch(event){ switch(event){
case GEOM_PHYS_ADD_POINT: case GEOM_PHYS_ADD_POINT:
Msg(STATUS,"Select Point ('e'=end, 'q'=quit)"); Msg(STATUS,"Select Point ('e'=end, 'q'=quit)");
type = 0; type = ENT_POINT;
break; break;
case GEOM_PHYS_ADD_LINE: case GEOM_PHYS_ADD_LINE:
Msg(STATUS,"Select Line ('e'=end, 'q'=quit)"); Msg(STATUS,"Select Line ('e'=end, 'q'=quit)");
type = 1; type = ENT_LINE;
break; break;
case GEOM_PHYS_ADD_SURF: case GEOM_PHYS_ADD_SURF:
Msg(STATUS,"Select Surface ('e'=end, 'q'=quit)"); Msg(STATUS,"Select Surface ('e'=end, 'q'=quit)");
type = 2; type = ENT_SURFACE;
break; break;
} }
ib = SelectEntity(type, &v,&c,&s); ib = SelectEntity(type, &v,&c,&s);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment