Newer
Older

Christophe Geuzaine
committed
TheSymbol.Name = yyvsp[-2].c;

Christophe Geuzaine
committed
*(double*)List_Pointer_Fast(pSymbol->val, 0) += yyvsp[-1].i;
Symbol TheSymbol;
TheSymbol.Name = yyvsp[-5].c;
Symbol *pSymbol;
if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)yyvsp[-3].d)))
yymsg(GERROR, "Uninitialized variable '%s[%d]'", yyvsp[-5].c, (int)yyvsp[-3].d);
char* (*pStrOpt)(int num, int action, char *value);
StringXString *pStrCat;

Christophe Geuzaine
committed
if(!(pStrCat = Get_StringOptionCategory(yyvsp[-5].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option class '%s'", yyvsp[-5].c);

Christophe Geuzaine
committed
if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-3].c, pStrCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option '%s.%s'", yyvsp[-5].c, yyvsp[-3].c);
char* (*pStrOpt)(int num, int action, char *value);
StringXString *pStrCat;

Christophe Geuzaine
committed
if(!(pStrCat = Get_StringOptionCategory(yyvsp[-8].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option class '%s'", yyvsp[-8].c);

Christophe Geuzaine
committed
if(!(pStrOpt = (char *(*) (int, int, char *))Get_StringOption(yyvsp[-3].c, pStrCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown string option '%s[%d].%s'", yyvsp[-8].c, (int)yyvsp[-6].d, yyvsp[-3].c);
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;

Christophe Geuzaine
committed
if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-5].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-5].c);

Christophe Geuzaine
committed
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption(yyvsp[-3].c, pNumCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option '%s.%s'", yyvsp[-5].c, yyvsp[-3].c);

Christophe Geuzaine
committed
switch(yyvsp[-2].i){
case 0 : d = yyvsp[-1].d; break;
case 1 : d = pNumOpt(0, GMSH_GET, 0) + yyvsp[-1].d; break;
case 2 : d = pNumOpt(0, GMSH_GET, 0) - yyvsp[-1].d; break;
case 3 : d = pNumOpt(0, GMSH_GET, 0) * yyvsp[-1].d; break;

Christophe Geuzaine
committed
case 4 :

Christophe Geuzaine
committed
else yymsg(GERROR, "Division by zero in '%s.%s /= %g'", yyvsp[-5].c, yyvsp[-3].c, yyvsp[-1].d);

Christophe Geuzaine
committed
break;
}
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;

Christophe Geuzaine
committed
if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-8].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-8].c);

Christophe Geuzaine
committed
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption(yyvsp[-3].c, pNumCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option '%s[%d].%s'", yyvsp[-8].c, (int)yyvsp[-6].d, yyvsp[-3].c);

Christophe Geuzaine
committed
switch(yyvsp[-2].i){
case 0 : d = yyvsp[-1].d; break;
case 1 : d = pNumOpt((int)yyvsp[-6].d, GMSH_GET, 0) + yyvsp[-1].d; break;
case 2 : d = pNumOpt((int)yyvsp[-6].d, GMSH_GET, 0) - yyvsp[-1].d; break;
case 3 : d = pNumOpt((int)yyvsp[-6].d, GMSH_GET, 0) * yyvsp[-1].d; break;

Christophe Geuzaine
committed
case 4 :
if(yyvsp[-1].d) d = pNumOpt((int)yyvsp[-6].d, GMSH_GET, 0) / yyvsp[-1].d;

Christophe Geuzaine
committed
else yymsg(GERROR, "Division by zero in '%s[%d].%s /= %g'",
yyvsp[-8].c, (int)yyvsp[-6].d, yyvsp[-3].c, yyvsp[-1].d);

Christophe Geuzaine
committed
break;
}
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;

Christophe Geuzaine
committed
if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-4].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-4].c);

Christophe Geuzaine
committed
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption(yyvsp[-2].c, pNumCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option '%s.%s'", yyvsp[-4].c, yyvsp[-2].c);

Christophe Geuzaine
committed
else
pNumOpt(0, GMSH_SET|GMSH_GUI, pNumOpt(0, GMSH_GET, 0)+yyvsp[-1].i);
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;

Christophe Geuzaine
committed
if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-7].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-7].c);

Christophe Geuzaine
committed
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption(yyvsp[-2].c, pNumCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown numeric option '%s[%d].%s'", yyvsp[-7].c, (int)yyvsp[-5].d, yyvsp[-2].c);

Christophe Geuzaine
committed
else
pNumOpt((int)yyvsp[-5].d, GMSH_SET|GMSH_GUI, pNumOpt((int)yyvsp[-5].d, GMSH_GET, 0)+yyvsp[-1].i);
unsigned int (*pColOpt)(int num, int action, unsigned int value);
StringXColor *pColCat;

Christophe Geuzaine
committed
if(!(pColCat = Get_ColorOptionCategory(yyvsp[-7].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown color option class '%s'", yyvsp[-7].c);

Christophe Geuzaine
committed
if(!(pColOpt = (unsigned int (*) (int, int, unsigned int))Get_ColorOption(yyvsp[-3].c, pColCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown color option '%s.Color.%s'", yyvsp[-7].c, yyvsp[-3].c);

Christophe Geuzaine
committed
else
unsigned int (*pColOpt)(int num, int action, unsigned int value);
StringXColor *pColCat;

Christophe Geuzaine
committed
if(!(pColCat = Get_ColorOptionCategory(yyvsp[-10].c)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown color option class '%s'", yyvsp[-10].c);

Christophe Geuzaine
committed
if(!(pColOpt = (unsigned int (*) (int, int, unsigned int))Get_ColorOption(yyvsp[-3].c, pColCat)))

Christophe Geuzaine
committed
yymsg(GERROR, "Unknown color option '%s[%d].Color.%s'", yyvsp[-10].c, (int)yyvsp[-8].d, yyvsp[-3].c);

Christophe Geuzaine
committed
else
}
GmshColorTable *ct = Get_ColorTable(0);

Christophe Geuzaine
committed
yymsg(GERROR, "View[%d] does not exist", 0);
else{
ct->size = List_Nbr(yyvsp[-1].l);
if(ct->size > COLORTABLE_NBMAX_COLOR)

Christophe Geuzaine
committed
yymsg(GERROR, "Too many (%d>%d) colors in View[%d].ColorTable",
ct->size, COLORTABLE_NBMAX_COLOR, 0);
for(int i = 0; i < ct->size; i++) List_Read(yyvsp[-1].l, i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
GmshColorTable *ct = Get_ColorTable((int)yyvsp[-6].d);

Christophe Geuzaine
committed
if(!ct)

Christophe Geuzaine
committed
yymsg(GERROR, "View[%d] does not exist", (int)yyvsp[-6].d);

Christophe Geuzaine
committed
ct->size = List_Nbr(yyvsp[-1].l);
if(ct->size > COLORTABLE_NBMAX_COLOR)

Christophe Geuzaine
committed
yymsg(GERROR, "Too many (%d>%d) colors in View[%d].ColorTable",

Christophe Geuzaine
committed
ct->size, COLORTABLE_NBMAX_COLOR, (int)yyvsp[-6].d);
else
for(int i = 0; i < ct->size; i++) List_Read(yyvsp[-1].l, i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
}
try {
GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].d);
}
catch (...) {
yymsg(GERROR, "Unknown option '%s' or plugin '%s'", yyvsp[-3].c, yyvsp[-6].c);
try {
GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].c);
}
catch (...) {
yymsg(GERROR, "Unknown option '%s' or plugin '%s'", yyvsp[-3].c, yyvsp[-6].c);
int num = (int)yyvsp[-4].d;
if(FindPoint(num, THEM)){
yymsg(GERROR, "Point %d already exists", num);
}
else{
Vertex *v = Create_Vertex(num, CTX.geom.scaling_factor * yyvsp[-1].v[0],
CTX.geom.scaling_factor * yyvsp[-1].v[1],
CTX.geom.scaling_factor * yyvsp[-1].v[2],
CTX.geom.scaling_factor * yyvsp[-1].v[3], 1.0);
Tree_Add(THEM->Points, &v);
}

Christophe Geuzaine
committed
yyval.s.Type = MSH_POINT;
int num = (int)yyvsp[-4].d;
if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT, THEM)){
yymsg(GERROR, "Physical point %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
List_Delete(temp);
List_Add(THEM->PhysicalGroups, &p);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_PHYSICAL_POINT;
Attractor *a = Create_Attractor(List_Nbr(THEM->Metric->Attractors)+1,
yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d, v, NULL, NULL);
List_Delete(yyvsp[-9].l);
// dummy values
yyval.s.Type = 0;
yyval.s.Num = 0;
List_Read(yyvsp[-3].l, i, &d);
Vertex *v = FindPoint((int)d, THEM);
else
v->lc = yyvsp[-1].d;
}
List_Delete(yyvsp[-3].l);
// dummy values
yyval.s.Type = 0;
yyval.s.Num = 0;
int num = (int)yyvsp[-4].d;
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
Curve *c = Create_Curve(num, MSH_SEGM_LINE, 1, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_LINE;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
Curve *c = Create_Curve(num, MSH_SEGM_SPLN, 3, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_SPLN;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
Curve *c = Create_Curve(num, MSH_SEGM_CIRC, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_CIRC;
yyval.s.Num = num;
int num = (int)yyvsp[-6].d;
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-3].l);
Curve *c = Create_Curve(num, MSH_SEGM_CIRC, 2, temp, NULL,
-1, -1, 0., 1.);
c->Circle.n[0] = yyvsp[-1].v[0];
c->Circle.n[1] = yyvsp[-1].v[1];
c->Circle.n[2] = yyvsp[-1].v[2];
End_Curve(c);
Tree_Add(THEM->Curves, &c);
Curve *rc = CreateReversedCurve(THEM, c);
rc->Circle.n[0] = yyvsp[-1].v[0];
rc->Circle.n[1] = yyvsp[-1].v[1];
rc->Circle.n[2] = yyvsp[-1].v[2];
End_Curve(rc);
List_Delete(temp);
List_Delete(yyvsp[-3].l);
yyval.s.Type = MSH_SEGM_CIRC;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
Curve *c = Create_Curve(num, MSH_SEGM_ELLI, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_ELLI;
yyval.s.Num = num;
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
int num = (int)yyvsp[-6].d;
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-3].l);
Curve *c = Create_Curve(num, MSH_SEGM_ELLI, 2, temp, NULL,
-1, -1, 0., 1.);
c->Circle.n[0] = yyvsp[-1].v[0];
c->Circle.n[1] = yyvsp[-1].v[1];
c->Circle.n[2] = yyvsp[-1].v[2];
End_Curve(c);
Tree_Add(THEM->Curves, &c);
Curve *rc = CreateReversedCurve(THEM, c);
rc->Circle.n[0] = yyvsp[-1].v[0];
rc->Circle.n[1] = yyvsp[-1].v[1];
rc->Circle.n[2] = yyvsp[-1].v[2];
End_Curve(c);
List_Delete(temp);
}
List_Delete(yyvsp[-3].l);
yyval.s.Type = MSH_SEGM_ELLI;
yyval.s.Num = num;
int num = (int)yyvsp[-14].d;
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_PARAMETRIC, 2, NULL, NULL,
-1, -1, yyvsp[-10].d, yyvsp[-8].d);
strcpy(c->functu, yyvsp[-6].c);
strcpy(c->functv, yyvsp[-4].c);
strcpy(c->functw, yyvsp[-2].c);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
}
yyval.s.Type = MSH_SEGM_PARAMETRIC;
yyval.s.Num = num;
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
int num = (int)yyvsp[-4].d;
if(List_Nbr(yyvsp[-1].l) < 4){
yymsg(GERROR, "Too few control points for BSpline %d (%d < 4)", num,
List_Nbr(yyvsp[-1].l));
}
else{
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
Curve *c = Create_Curve(num, MSH_SEGM_BSPLN, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_BSPLN;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(List_Nbr(yyvsp[-1].l) < 4){
yymsg(GERROR, "Too few control points for Bezier curve %d (%d < 4)", num,

Christophe Geuzaine
committed
List_Nbr(yyvsp[-1].l));
}
else{
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
Curve *c = Create_Curve(num, MSH_SEGM_BEZIER, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_BEZIER;
yyval.s.Num = num;
int num = (int)yyvsp[-8].d;
if(List_Nbr(yyvsp[-5].l) + (int)yyvsp[-1].d + 1 != List_Nbr(yyvsp[-3].l)){
yymsg(GERROR, "Wrong definition of Nurbs Curve %d: "
"got %d knots, need N + D + 1 = %d + %d + 1 = %d",
(int)yyvsp[-8].d, List_Nbr(yyvsp[-3].l), List_Nbr(yyvsp[-5].l), (int)yyvsp[-1].d, List_Nbr(yyvsp[-5].l) + (int)yyvsp[-1].d + 1);
else{
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-5].l);
Curve *c = Create_Curve(num, MSH_SEGM_NURBS, (int)yyvsp[-1].d, temp, yyvsp[-3].l,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
}
List_Delete(yyvsp[-5].l);
List_Delete(yyvsp[-3].l);
yyval.s.Type = MSH_SEGM_NURBS;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindEdgeLoop(num, THEM)){
yymsg(GERROR, "Line loop %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
sortEdgesInLoop(num, temp);
EdgeLoop *l = Create_EdgeLoop(num, temp);
Tree_Add(THEM->EdgeLoops, &l);
List_Delete(temp);
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_LOOP;
yyval.s.Num = num;
for(int i = 0; i < List_Nbr(yyvsp[-9].l); i++){
double p;
List_Read(yyvsp[-9].l, i, &p);
Curve *c = FindCurve((int)p, THEM);
if(!c)
else{
Attractor *a = Create_Attractor(List_Nbr(THEM->Metric->Attractors)+1,
yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d, NULL, c, NULL);
List_Add(THEM->Metric->Attractors, &a);
}
}
// dummy values
yyval.s.Type = 0;
yyval.s.Num = 0;
int num = (int)yyvsp[-4].d;
if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE, THEM)){
yymsg(GERROR, "Physical line %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_LINE, temp);
List_Delete(temp);
List_Add(THEM->PhysicalGroups, &p);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_PHYSICAL_LINE;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindSurface(num, THEM)){
yymsg(GERROR, "Surface %d already exists", num);
}
else{
Surface *s = Create_Surface(num, MSH_SURF_PLAN);
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
setSurfaceGeneratrices(s, temp);
List_Delete(temp);
s->Support = s;
End_Surface(s);
Tree_Add(THEM->Surfaces, &s);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SURF_PLAN;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d, type = 0;
if(FindSurface(num, THEM)){
yymsg(GERROR, "Surface %d already exists", num);
}
else{
double d;
List_Read(yyvsp[-1].l, 0, &d);
EdgeLoop *el = FindEdgeLoop((int)d, THEM);
if(!el){
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
}
else{
int j = List_Nbr(el->Curves);
if(j == 4){
type = MSH_SURF_REGL;
}
else if(j == 3){
type = MSH_SURF_TRIC;
}
else{
yymsg(GERROR, "Wrong definition of Ruled Surface %d: "
"%d borders instead of 3 or 4", num, j);
type = MSH_SURF_PLAN;
}
Surface *s = Create_Surface(num, type);
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
setSurfaceGeneratrices(s, temp);
List_Delete(temp);
s->Support = s;
End_Surface(s);
Tree_Add(THEM->Surfaces, &s);
}
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = type;
yyval.s.Num = num;
int num = (int)yyvsp[-8].d;
Surface *support = FindSurface((int)yyvsp[-4].d, THEM);
if(!support){
yymsg(GERROR, "Unknown support surface %d", (int)yyvsp[-4].d);
}
else{
if(FindSurface(num, THEM)){
yymsg(GERROR, "Surface %d already exists", num);
}
Surface *s = Create_Surface(num, MSH_SURF_TRIMMED);
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-2].l);
setSurfaceGeneratrices(s, temp);
List_Delete(temp);
s->Support = support;
}
List_Delete(yyvsp[-2].l);
yyval.s.Type = MSH_SURF_TRIMMED;
yyval.s.Num = num;
int num = (int)yyvsp[-10].d, type = 0;
Surface *s = FindSurface(num, THEM);
if(!s) {
yymsg(GERROR, "Unknown surface %d", num);
}
else{
// FIXME: parameters not used; undocumented
POLY_rep *rep = new POLY_rep(yyvsp[-2].l, yyvsp[-1].l);
s->thePolyRep = rep;
type = s->Typ;
}
//FIXME: do you copy the data?
//List_Delete($12);
//List_Delete($13);
yyval.s.Type = type;
yyval.s.Num = (int)yyvsp[-10].d;
int num = (int)yyvsp[-10].d, type = 0;
Surface *s = FindSurface(num, THEM);
if(!s) {
yymsg(GERROR, "Unknown surface %d", num);
}
POLY_rep *rep = new POLY_rep(yyvsp[-2].l, yyvsp[-1].l);
s->thePolyRep = rep;
type = s->Typ;
int num = (int)yyvsp[-16].d;
if(FindSurface(num, THEM)){
yymsg(GERROR, "Surface %d already exists", num);
}
else{
CreateNurbsSurface(num, (int)yyvsp[-4].d, (int)yyvsp[-2].d, yyvsp[-13].l, yyvsp[-10].l, yyvsp[-8].l);
}
for(int i = 0; i < List_Nbr(yyvsp[-13].l); i++)
List_Delete((List_T*)List_Pointer(yyvsp[-13].l, i));
List_Delete(yyvsp[-13].l);
List_Delete(yyvsp[-10].l);
List_Delete(yyvsp[-8].l);
int num = (int)yyvsp[-16].d;
if(FindSurface(num, THEM)){
yymsg(GERROR, "Surface %d already exists", num);
}
else{
CreateNurbsSurfaceSupport(num, (int)yyvsp[-4].d, (int)yyvsp[-2].d, yyvsp[-13].l, yyvsp[-10].l, yyvsp[-8].l);
}
for(int i = 0; i < List_Nbr(yyvsp[-13].l); i++)
List_Delete((List_T*)List_Pointer(yyvsp[-13].l, i));
List_Delete(yyvsp[-13].l);
List_Delete(yyvsp[-10].l);
List_Delete(yyvsp[-8].l);
yyval.s.Type = MSH_SURF_NURBS;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindSurfaceLoop(num, THEM)){
yymsg(GERROR, "Surface loop %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
SurfaceLoop *l = Create_SurfaceLoop(num, temp);
Tree_Add(THEM->SurfaceLoops, &l);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SURF_LOOP;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE, THEM)){
yymsg(GERROR, "Physical surface %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp);
List_Delete(temp);
List_Add(THEM->PhysicalGroups, &p);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_PHYSICAL_SURFACE;
yyval.s.Num = num;
int num = (int)yyvsp[-4].d;
if(FindVolume(num, THEM)){
yymsg(GERROR, "Volume %d already exists", num);
}
else{
Volume *v = Create_Volume(num, MSH_VOLUME);
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
setVolumeSurfaces(v, temp);
List_Delete(temp);
Tree_Add(THEM->Volumes, &v);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_VOLUME;
int num = (int)yyvsp[-4].d;
if(FindVolume(num, THEM)){
yymsg(GERROR, "Volume %d already exists", num);
}
else{
Volume *v = Create_Volume(num, MSH_VOLUME);
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
setVolumeSurfaces(v, temp);
List_Delete(temp);
Tree_Add(THEM->Volumes, &v);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_VOLUME;
int num = (int)yyvsp[-4].d;
if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME, THEM)){
yymsg(GERROR, "Physical volume %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-1].l);
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_VOLUME, temp);
List_Delete(temp);
List_Add(THEM->PhysicalGroups, &p);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_PHYSICAL_VOLUME;
TranslateShapes(yyvsp[-3].v[0], yyvsp[-3].v[1], yyvsp[-3].v[2], yyvsp[-1].l, 1);
yyval.l = yyvsp[-1].l;
RotateShapes(yyvsp[-8].v[0], yyvsp[-8].v[1], yyvsp[-8].v[2], yyvsp[-6].v[0], yyvsp[-6].v[1], yyvsp[-6].v[2], yyvsp[-4].d, yyvsp[-1].l, 1);
yyval.l = yyvsp[-1].l;
SymmetryShapes(yyvsp[-3].v[0], yyvsp[-3].v[1], yyvsp[-3].v[2], yyvsp[-3].v[3], yyvsp[-1].l, 1);
yyval.l = yyvsp[-1].l;
DilatShapes(yyvsp[-6].v[0], yyvsp[-6].v[1], yyvsp[-6].v[2], yyvsp[-4].d, yyvsp[-1].l, 1);