diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index b011dd59b6c3d1f865a73772429eefd2261483b9..1ae58754722c7b7d3a7f85c0308067f610307a0d 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -927,7 +927,8 @@ void OCC_Internals::addVolume(int tag, std::vector<int> shellTags) } void OCC_Internals::addSphere(int tag, double xc, double yc, double zc, - double radius, double angle) + double radius, double angle1, double angle2, + double angle3) { if(tag > 0 && _tagSolid.IsBound(tag)){ Msg::Error("OpenCASCADE region with tag %d already exists", tag); @@ -937,7 +938,7 @@ void OCC_Internals::addSphere(int tag, double xc, double yc, double zc, TopoDS_Solid result; try{ gp_Pnt p(xc, yc, zc); - BRepPrimAPI_MakeSphere s(p, radius, angle); + BRepPrimAPI_MakeSphere s(p, radius, angle1, angle2, angle3); s.Build(); if(!s.IsDone()){ Msg::Error("Could not create sphere"); diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h index b99f58d076475c4e51bc93ebffb2fa529f5e061e..1543fe4f1b9b5bbcf4335be15696f790ba278607 100644 --- a/Geo/GModelIO_OCC.h +++ b/Geo/GModelIO_OCC.h @@ -148,7 +148,7 @@ class OCC_Internals { void addSurfaceLoop(int tag, std::vector<int> faceTags); void addVolume(int tag, std::vector<int> shellTags); void addSphere(int tag, double xc, double yc, double zc, double radius, - double angle); + double angle1, double angle2, double angle3); void addBlock(int tag, double x1, double y1, double z1, double x2, double y2, double z2); void addCylinder(int tag, double x1, double y1, double z1, double x2, double y2, @@ -293,7 +293,7 @@ public: void addSurfaceLoop(int tag, std::vector<int> faceTags){ _error("add surface loop"); } void addVolume(int tag, std::vector<int> shellTags){ _error("add volume"); } void addSphere(int tag, double xc, double yc, double zc, double radius, - double angle){ _error("add sphere"); } + double angle1, double angle2, double angle3){ _error("add sphere"); } void addBlock(int tag, double x1, double y1, double z1, double x2, double y2, double z2){ _error("add block"); } void addCylinder(int tag, double x1, double y1, double z1, double x2, double y2, diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 0aeb47590b18fd2540a6fe2fb86c451e611370b1..5b4f0f5b9394d65c7f45fda25a874c77469394d1 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1391,45 +1391,45 @@ static const yytype_uint16 yyrline[] = 1681, 1687, 1695, 1699, 1705, 1713, 1717, 1723, 1732, 1735, 1742, 1745, 1752, 1773, 1787, 1801, 1836, 1874, 1888, 1902, 1922, 1931, 1945, 1960, 1974, 1993, 2003, 2009, 2015, 2022, - 2049, 2064, 2084, 2105, 2126, 2147, 2169, 2191, 2212, 2235, - 2244, 2265, 2280, 2294, 2309, 2324, 2333, 2343, 2353, 2363, - 2378, 2389, 2402, 2414, 2426, 2438, 2475, 2486, 2502, 2503, - 2508, 2511, 2515, 2526, 2537, 2548, 2564, 2583, 2604, 2619, - 2635, 2653, 2704, 2725, 2747, 2770, 2875, 2891, 2926, 2940, - 2946, 2961, 2989, 3006, 3012, 3023, 3037, 3043, 3049, 3055, - 3061, 3067, 3078, 3151, 3169, 3186, 3201, 3234, 3246, 3270, - 3274, 3279, 3286, 3291, 3301, 3306, 3312, 3320, 3324, 3328, - 3337, 3401, 3417, 3434, 3451, 3473, 3495, 3530, 3538, 3546, - 3552, 3559, 3566, 3586, 3612, 3624, 3636, 3652, 3668, 3677, - 3676, 3691, 3690, 3705, 3704, 3719, 3718, 3731, 3744, 3758, - 3772, 3791, 3794, 3800, 3812, 3832, 3836, 3840, 3844, 3848, - 3852, 3856, 3860, 3869, 3882, 3883, 3884, 3885, 3886, 3890, - 3891, 3892, 3895, 3913, 3930, 3947, 3950, 3966, 3969, 3986, - 3989, 3995, 3998, 4005, 4008, 4015, 4032, 4073, 4117, 4156, - 4181, 4190, 4220, 4246, 4272, 4304, 4331, 4357, 4383, 4409, - 4435, 4457, 4463, 4469, 4475, 4481, 4487, 4513, 4539, 4556, - 4573, 4590, 4602, 4608, 4614, 4626, 4630, 4640, 4651, 4652, - 4653, 4657, 4663, 4675, 4693, 4721, 4722, 4723, 4724, 4725, - 4726, 4727, 4728, 4729, 4736, 4737, 4738, 4739, 4740, 4741, - 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 4750, 4751, - 4752, 4753, 4754, 4755, 4756, 4757, 4758, 4759, 4760, 4761, - 4762, 4763, 4764, 4765, 4766, 4767, 4768, 4777, 4778, 4779, - 4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4792, 4791, - 4799, 4801, 4806, 4811, 4834, 4852, 4870, 4888, 4906, 4911, - 4917, 4932, 4951, 4971, 4991, 5011, 5041, 5059, 5064, 5074, - 5084, 5089, 5100, 5109, 5114, 5119, 5148, 5147, 5160, 5162, - 5167, 5176, 5178, 5187, 5191, 5195, 5199, 5203, 5210, 5214, - 5218, 5222, 5229, 5234, 5241, 5246, 5250, 5255, 5259, 5267, - 5278, 5282, 5294, 5302, 5310, 5317, 5327, 5350, 5356, 5362, - 5368, 5374, 5385, 5396, 5407, 5418, 5424, 5430, 5436, 5442, - 5452, 5462, 5472, 5484, 5497, 5509, 5513, 5517, 5521, 5525, - 5543, 5561, 5569, 5577, 5606, 5616, 5635, 5640, 5644, 5648, - 5660, 5664, 5676, 5693, 5703, 5707, 5722, 5727, 5734, 5738, - 5751, 5765, 5779, 5793, 5807, 5828, 5836, 5842, 5848, 5854, - 5863, 5867, 5871, 5879, 5885, 5891, 5899, 5907, 5914, 5922, - 5937, 5951, 5965, 5977, 5993, 6002, 6011, 6021, 6032, 6040, - 6048, 6052, 6071, 6078, 6084, 6091, 6099, 6098, 6108, 6122, - 6124, 6129, 6134, 6142, 6151, 6164, 6167, 6171 + 2051, 2066, 2086, 2107, 2128, 2149, 2171, 2193, 2214, 2237, + 2246, 2267, 2282, 2296, 2311, 2326, 2335, 2345, 2355, 2365, + 2380, 2391, 2404, 2416, 2428, 2440, 2477, 2488, 2504, 2505, + 2510, 2513, 2517, 2528, 2539, 2550, 2566, 2585, 2606, 2621, + 2637, 2655, 2706, 2727, 2749, 2772, 2877, 2893, 2928, 2942, + 2948, 2963, 2991, 3008, 3014, 3025, 3039, 3045, 3051, 3057, + 3063, 3069, 3080, 3153, 3171, 3188, 3203, 3236, 3248, 3272, + 3276, 3281, 3288, 3293, 3303, 3308, 3314, 3322, 3326, 3330, + 3339, 3403, 3419, 3436, 3453, 3475, 3497, 3532, 3540, 3548, + 3554, 3561, 3568, 3588, 3614, 3626, 3638, 3654, 3670, 3679, + 3678, 3693, 3692, 3707, 3706, 3721, 3720, 3733, 3746, 3760, + 3774, 3793, 3796, 3802, 3814, 3834, 3838, 3842, 3846, 3850, + 3854, 3858, 3862, 3871, 3884, 3885, 3886, 3887, 3888, 3892, + 3893, 3894, 3897, 3915, 3932, 3949, 3952, 3968, 3971, 3988, + 3991, 3997, 4000, 4007, 4010, 4017, 4034, 4075, 4119, 4158, + 4183, 4192, 4222, 4248, 4274, 4306, 4333, 4359, 4385, 4411, + 4437, 4459, 4465, 4471, 4477, 4483, 4489, 4515, 4541, 4558, + 4575, 4592, 4604, 4610, 4616, 4628, 4632, 4642, 4653, 4654, + 4655, 4659, 4665, 4677, 4695, 4723, 4724, 4725, 4726, 4727, + 4728, 4729, 4730, 4731, 4738, 4739, 4740, 4741, 4742, 4743, + 4744, 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753, + 4754, 4755, 4756, 4757, 4758, 4759, 4760, 4761, 4762, 4763, + 4764, 4765, 4766, 4767, 4768, 4769, 4770, 4779, 4780, 4781, + 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 4794, 4793, + 4801, 4803, 4808, 4813, 4836, 4854, 4872, 4890, 4908, 4913, + 4919, 4934, 4953, 4973, 4993, 5013, 5043, 5061, 5066, 5076, + 5086, 5091, 5102, 5111, 5116, 5121, 5150, 5149, 5162, 5164, + 5169, 5178, 5180, 5189, 5193, 5197, 5201, 5205, 5212, 5216, + 5220, 5224, 5231, 5236, 5243, 5248, 5252, 5257, 5261, 5269, + 5280, 5284, 5296, 5304, 5312, 5319, 5329, 5352, 5358, 5364, + 5370, 5376, 5387, 5398, 5409, 5420, 5426, 5432, 5438, 5444, + 5454, 5464, 5474, 5486, 5499, 5511, 5515, 5519, 5523, 5527, + 5545, 5563, 5571, 5579, 5608, 5618, 5637, 5642, 5646, 5650, + 5662, 5666, 5678, 5695, 5705, 5709, 5724, 5729, 5736, 5740, + 5753, 5767, 5781, 5795, 5809, 5830, 5838, 5844, 5850, 5856, + 5865, 5869, 5873, 5881, 5887, 5893, 5901, 5909, 5916, 5924, + 5939, 5953, 5967, 5979, 5995, 6004, 6013, 6023, 6034, 6042, + 6050, 6054, 6073, 6080, 6086, 6093, 6101, 6100, 6110, 6124, + 6126, 6131, 6136, 6144, 6153, 6166, 6169, 6173 }; #endif @@ -8289,11 +8289,13 @@ yyreduce: std::vector<int> tags; ListOfDouble2Vector((yyvsp[(6) - (7)].l), tags); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); (yyval.s).Type = 0; - if(param.size() == 4 || param.size() == 5){ + if(param.size() >= 4 && param.size() <= 7){ if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ - double alpha = (param.size() == 5) ? param[4] : 2.*M_PI; + double a1 = (param.size() >= 5) ? param[4] : -M_PI/2; + double a2 = (param.size() >= 6) ? param[5] : M_PI/2; + double a3 = (param.size() >= 7) ? param[6] : 2.*M_PI; GModel::current()->getOCCInternals()->addSphere - (num, param[0], param[1], param[2], param[3], alpha); + (num, param[0], param[1], param[2], param[3], a1, a2, a3); } else{ yymsg(0, "Sphere only available with OpenCASCADE factory"); @@ -8305,7 +8307,7 @@ yyreduce: (num, tags[0], tags[1]); } else{ - yymsg(0, "Sphere requires 2 points or 4 or 5 parameters"); + yymsg(0, "Sphere requires 2 points or from 4 to 7 parameters"); } List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Num = num; @@ -8313,7 +8315,7 @@ yyreduce: break; case 190: -#line 2050 "Gmsh.y" +#line 2052 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<int> tags; ListOfDouble2Vector((yyvsp[(6) - (7)].l), tags); @@ -8331,7 +8333,7 @@ yyreduce: break; case 191: -#line 2065 "Gmsh.y" +#line 2067 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8354,7 +8356,7 @@ yyreduce: break; case 192: -#line 2085 "Gmsh.y" +#line 2087 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8378,7 +8380,7 @@ yyreduce: break; case 193: -#line 2106 "Gmsh.y" +#line 2108 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8402,7 +8404,7 @@ yyreduce: break; case 194: -#line 2127 "Gmsh.y" +#line 2129 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8426,7 +8428,7 @@ yyreduce: break; case 195: -#line 2148 "Gmsh.y" +#line 2150 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8451,7 +8453,7 @@ yyreduce: break; case 196: -#line 2170 "Gmsh.y" +#line 2172 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8476,7 +8478,7 @@ yyreduce: break; case 197: -#line 2192 "Gmsh.y" +#line 2194 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8500,7 +8502,7 @@ yyreduce: break; case 198: -#line 2213 "Gmsh.y" +#line 2215 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<double> param; ListOfDouble2Vector((yyvsp[(6) - (7)].l), param); @@ -8526,7 +8528,7 @@ yyreduce: break; case 199: -#line 2236 "Gmsh.y" +#line 2238 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); std::vector<int> tags; ListOfDouble2Vector((yyvsp[(7) - (8)].l), tags); @@ -8538,7 +8540,7 @@ yyreduce: break; case 200: -#line 2246 "Gmsh.y" +#line 2248 "Gmsh.y" { int num = (int)(yyvsp[(4) - (12)].d); std::vector<int> tags; ListOfDouble2Vector((yyvsp[(7) - (12)].l), tags); @@ -8561,7 +8563,7 @@ yyreduce: break; case 201: -#line 2266 "Gmsh.y" +#line 2268 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); std::vector<int> tags; ListOfDouble2Vector((yyvsp[(7) - (8)].l), tags); @@ -8579,7 +8581,7 @@ yyreduce: break; case 202: -#line 2281 "Gmsh.y" +#line 2283 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<int> tags; ListOfDouble2Vector((yyvsp[(6) - (7)].l), tags); @@ -8596,7 +8598,7 @@ yyreduce: break; case 203: -#line 2295 "Gmsh.y" +#line 2297 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); std::vector<int> wires, out[4]; ListOfDouble2Vector((yyvsp[(6) - (7)].l), wires); @@ -8614,7 +8616,7 @@ yyreduce: break; case 204: -#line 2310 "Gmsh.y" +#line 2312 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); std::vector<int> wires, out[4]; ListOfDouble2Vector((yyvsp[(7) - (8)].l), wires); @@ -8632,7 +8634,7 @@ yyreduce: break; case 205: -#line 2325 "Gmsh.y" +#line 2327 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); std::vector<int> tags; ListOfDouble2Vector((yyvsp[(7) - (8)].l), tags); @@ -8644,7 +8646,7 @@ yyreduce: break; case 206: -#line 2334 "Gmsh.y" +#line 2336 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); int op = (yyvsp[(6) - (8)].i); @@ -8657,7 +8659,7 @@ yyreduce: break; case 207: -#line 2344 "Gmsh.y" +#line 2346 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); int op = (yyvsp[(6) - (8)].i); @@ -8670,7 +8672,7 @@ yyreduce: break; case 208: -#line 2354 "Gmsh.y" +#line 2356 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); int op = (yyvsp[(6) - (8)].i); @@ -8683,7 +8685,7 @@ yyreduce: break; case 209: -#line 2364 "Gmsh.y" +#line 2366 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); int op = (yyvsp[(6) - (8)].i); @@ -8696,7 +8698,7 @@ yyreduce: break; case 210: -#line 2379 "Gmsh.y" +#line 2381 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -8710,7 +8712,7 @@ yyreduce: break; case 211: -#line 2390 "Gmsh.y" +#line 2392 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(10) - (11)].l), tags); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -8726,7 +8728,7 @@ yyreduce: break; case 212: -#line 2403 "Gmsh.y" +#line 2405 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); if(factory == "OpenCASCADE"){ @@ -8741,7 +8743,7 @@ yyreduce: break; case 213: -#line 2415 "Gmsh.y" +#line 2417 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(8) - (9)].l), tags); if(factory == "OpenCASCADE"){ @@ -8756,7 +8758,7 @@ yyreduce: break; case 214: -#line 2427 "Gmsh.y" +#line 2429 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(8) - (9)].l), tags); if(factory == "OpenCASCADE"){ @@ -8771,7 +8773,7 @@ yyreduce: break; case 215: -#line 2439 "Gmsh.y" +#line 2441 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); std::string action((yyvsp[(1) - (4)].c)); @@ -8811,7 +8813,7 @@ yyreduce: break; case 216: -#line 2476 "Gmsh.y" +#line 2478 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE"){ @@ -8825,7 +8827,7 @@ yyreduce: break; case 217: -#line 2487 "Gmsh.y" +#line 2489 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape*)); if(factory == "OpenCASCADE"){ @@ -8841,31 +8843,31 @@ yyreduce: break; case 218: -#line 2502 "Gmsh.y" +#line 2504 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 219: -#line 2503 "Gmsh.y" +#line 2505 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 220: -#line 2508 "Gmsh.y" +#line 2510 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); ;} break; case 221: -#line 2512 "Gmsh.y" +#line 2514 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); ;} break; case 222: -#line 2516 "Gmsh.y" +#line 2518 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -8879,7 +8881,7 @@ yyreduce: break; case 223: -#line 2527 "Gmsh.y" +#line 2529 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -8893,7 +8895,7 @@ yyreduce: break; case 224: -#line 2538 "Gmsh.y" +#line 2540 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -8907,7 +8909,7 @@ yyreduce: break; case 225: -#line 2549 "Gmsh.y" +#line 2551 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -8921,7 +8923,7 @@ yyreduce: break; case 226: -#line 2565 "Gmsh.y" +#line 2567 "Gmsh.y" { if(List_Nbr((yyvsp[(7) - (8)].l)) == 4){ int t = (int)(yyvsp[(4) - (8)].d); @@ -8943,7 +8945,7 @@ yyreduce: break; case 227: -#line 2584 "Gmsh.y" +#line 2586 "Gmsh.y" { int t = (int)(yyvsp[(4) - (10)].d); if(gLevelset::find(t)){ @@ -8967,7 +8969,7 @@ yyreduce: break; case 228: -#line 2606 "Gmsh.y" +#line 2608 "Gmsh.y" { int t = (int)(yyvsp[(4) - (14)].d); if(gLevelset::find(t)){ @@ -8984,7 +8986,7 @@ yyreduce: break; case 229: -#line 2621 "Gmsh.y" +#line 2623 "Gmsh.y" { int t = (int)(yyvsp[(4) - (16)].d); if(gLevelset::find(t)){ @@ -9002,7 +9004,7 @@ yyreduce: break; case 230: -#line 2636 "Gmsh.y" +#line 2638 "Gmsh.y" { if(List_Nbr((yyvsp[(10) - (12)].l)) == 1){ int t = (int)(yyvsp[(4) - (12)].d); @@ -9023,7 +9025,7 @@ yyreduce: break; case 231: -#line 2655 "Gmsh.y" +#line 2657 "Gmsh.y" { if(List_Nbr((yyvsp[(12) - (14)].l)) == 1){ int t = (int)(yyvsp[(4) - (14)].d); @@ -9076,7 +9078,7 @@ yyreduce: break; case 232: -#line 2706 "Gmsh.y" +#line 2708 "Gmsh.y" { if(List_Nbr((yyvsp[(12) - (14)].l)) == 1){ int t = (int)(yyvsp[(4) - (14)].d); @@ -9099,7 +9101,7 @@ yyreduce: break; case 233: -#line 2727 "Gmsh.y" +#line 2729 "Gmsh.y" { if(List_Nbr((yyvsp[(12) - (14)].l)) == 3){ int t = (int)(yyvsp[(4) - (14)].d); @@ -9123,7 +9125,7 @@ yyreduce: break; case 234: -#line 2749 "Gmsh.y" +#line 2751 "Gmsh.y" { if(List_Nbr((yyvsp[(12) - (14)].l)) == 5){ int t = (int)(yyvsp[(4) - (14)].d); @@ -9148,7 +9150,7 @@ yyreduce: break; case 235: -#line 2771 "Gmsh.y" +#line 2773 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (8)].c), "Union")){ int t = (int)(yyvsp[(4) - (8)].d); @@ -9256,7 +9258,7 @@ yyreduce: break; case 236: -#line 2876 "Gmsh.y" +#line 2878 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (8)].c), "MathEval")){ int t = (int)(yyvsp[(4) - (8)].d); @@ -9275,7 +9277,7 @@ yyreduce: break; case 237: -#line 2892 "Gmsh.y" +#line 2894 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "CutMesh")){ int t = (int)(yyvsp[(4) - (6)].d); @@ -9308,7 +9310,7 @@ yyreduce: break; case 238: -#line 2927 "Gmsh.y" +#line 2929 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(3) - (4)].l), tags); for(int dim = 0; dim < 4; dim++){ @@ -9325,7 +9327,7 @@ yyreduce: break; case 239: -#line 2941 "Gmsh.y" +#line 2943 "Gmsh.y" { #if defined(HAVE_MESH) GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d)); @@ -9334,7 +9336,7 @@ yyreduce: break; case 240: -#line 2947 "Gmsh.y" +#line 2949 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -9352,7 +9354,7 @@ yyreduce: break; case 241: -#line 2962 "Gmsh.y" +#line 2964 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ ClearProject(); @@ -9383,7 +9385,7 @@ yyreduce: break; case 242: -#line 2990 "Gmsh.y" +#line 2992 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ @@ -9398,7 +9400,7 @@ yyreduce: break; case 243: -#line 3007 "Gmsh.y" +#line 3009 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); setColor(tags, (yyvsp[(2) - (5)].u), false); @@ -9407,7 +9409,7 @@ yyreduce: break; case 244: -#line 3013 "Gmsh.y" +#line 3015 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(5) - (6)].l), tags); setColor(tags, (yyvsp[(3) - (6)].u), true); @@ -9416,7 +9418,7 @@ yyreduce: break; case 245: -#line 3024 "Gmsh.y" +#line 3026 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -9428,7 +9430,7 @@ yyreduce: break; case 246: -#line 3038 "Gmsh.y" +#line 3040 "Gmsh.y" { std::string what = (yyvsp[(2) - (3)].c); setVisibility(-1, 1, false); @@ -9437,7 +9439,7 @@ yyreduce: break; case 247: -#line 3044 "Gmsh.y" +#line 3046 "Gmsh.y" { std::string what = (yyvsp[(2) - (3)].c); setVisibility(-1, 0, false); @@ -9446,7 +9448,7 @@ yyreduce: break; case 248: -#line 3050 "Gmsh.y" +#line 3052 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(3) - (4)].l), tags); setVisibility(tags, 1, false); @@ -9455,7 +9457,7 @@ yyreduce: break; case 249: -#line 3056 "Gmsh.y" +#line 3058 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); setVisibility(tags, 1, true); @@ -9464,7 +9466,7 @@ yyreduce: break; case 250: -#line 3062 "Gmsh.y" +#line 3064 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(3) - (4)].l), tags); setVisibility(tags, 0, false); @@ -9473,7 +9475,7 @@ yyreduce: break; case 251: -#line 3068 "Gmsh.y" +#line 3070 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); setVisibility(tags, 0, true); @@ -9482,7 +9484,7 @@ yyreduce: break; case 252: -#line 3079 "Gmsh.y" +#line 3081 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c)); @@ -9558,7 +9560,7 @@ yyreduce: break; case 253: -#line 3152 "Gmsh.y" +#line 3154 "Gmsh.y" { int n = List_Nbr((yyvsp[(3) - (5)].l)); if(n == 1){ @@ -9579,7 +9581,7 @@ yyreduce: break; case 254: -#line 3170 "Gmsh.y" +#line 3172 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ @@ -9599,7 +9601,7 @@ yyreduce: break; case 255: -#line 3187 "Gmsh.y" +#line 3189 "Gmsh.y" { #if defined(HAVE_POST) && defined(HAVE_MESH) if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){ @@ -9617,7 +9619,7 @@ yyreduce: break; case 256: -#line 3202 "Gmsh.y" +#line 3204 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -9653,7 +9655,7 @@ yyreduce: break; case 257: -#line 3235 "Gmsh.y" +#line 3237 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -9668,7 +9670,7 @@ yyreduce: break; case 258: -#line 3247 "Gmsh.y" +#line 3249 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) @@ -9695,14 +9697,14 @@ yyreduce: break; case 259: -#line 3271 "Gmsh.y" +#line 3273 "Gmsh.y" { Msg::Exit(0); ;} break; case 260: -#line 3275 "Gmsh.y" +#line 3277 "Gmsh.y" { gmsh_yyerrorstate = 999; // this will be checked when yyparse returns YYABORT; @@ -9710,7 +9712,7 @@ yyreduce: break; case 261: -#line 3280 "Gmsh.y" +#line 3282 "Gmsh.y" { // force sync if(GModel::current()->getOCCInternals()) @@ -9720,7 +9722,7 @@ yyreduce: break; case 262: -#line 3287 "Gmsh.y" +#line 3289 "Gmsh.y" { new GModel(); GModel::current(GModel::list.size() - 1); @@ -9728,7 +9730,7 @@ yyreduce: break; case 263: -#line 3292 "Gmsh.y" +#line 3294 "Gmsh.y" { CTX::instance()->forcedBBox = 0; if(GModel::current()->getOCCInternals() && @@ -9741,7 +9743,7 @@ yyreduce: break; case 264: -#line 3302 "Gmsh.y" +#line 3304 "Gmsh.y" { CTX::instance()->forcedBBox = 1; SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d)); @@ -9749,7 +9751,7 @@ yyreduce: break; case 265: -#line 3307 "Gmsh.y" +#line 3309 "Gmsh.y" { #if defined(HAVE_OPENGL) drawContext::global()->draw(); @@ -9758,7 +9760,7 @@ yyreduce: break; case 266: -#line 3313 "Gmsh.y" +#line 3315 "Gmsh.y" { #if defined(HAVE_OPENGL) CTX::instance()->mesh.changed = ENT_ALL; @@ -9769,21 +9771,21 @@ yyreduce: break; case 267: -#line 3321 "Gmsh.y" +#line 3323 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); ;} break; case 268: -#line 3325 "Gmsh.y" +#line 3327 "Gmsh.y" { GModel::current()->createTopologyFromMesh(1); ;} break; case 269: -#line 3329 "Gmsh.y" +#line 3331 "Gmsh.y" { if(GModel::current()->getOCCInternals() && GModel::current()->getOCCInternals()->getChanged()) @@ -9795,7 +9797,7 @@ yyreduce: break; case 270: -#line 3339 "Gmsh.y" +#line 3341 "Gmsh.y" { int lock = CTX::instance()->lock; CTX::instance()->lock = 0; @@ -9856,7 +9858,7 @@ yyreduce: break; case 271: -#line 3402 "Gmsh.y" +#line 3404 "Gmsh.y" { #if defined(HAVE_POPPLER) std::vector<int> is; @@ -9871,7 +9873,7 @@ yyreduce: break; case 272: -#line 3418 "Gmsh.y" +#line 3420 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -9891,7 +9893,7 @@ yyreduce: break; case 273: -#line 3435 "Gmsh.y" +#line 3437 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -9911,7 +9913,7 @@ yyreduce: break; case 274: -#line 3452 "Gmsh.y" +#line 3454 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -9936,7 +9938,7 @@ yyreduce: break; case 275: -#line 3474 "Gmsh.y" +#line 3476 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -9961,7 +9963,7 @@ yyreduce: break; case 276: -#line 3496 "Gmsh.y" +#line 3498 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(0, "Invalid For/EndFor loop"); @@ -9999,7 +10001,7 @@ yyreduce: break; case 277: -#line 3531 "Gmsh.y" +#line 3533 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction (std::string((yyvsp[(2) - (2)].c)), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10010,7 +10012,7 @@ yyreduce: break; case 278: -#line 3539 "Gmsh.y" +#line 3541 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction (std::string((yyvsp[(2) - (2)].c)), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10021,7 +10023,7 @@ yyreduce: break; case 279: -#line 3547 "Gmsh.y" +#line 3549 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10030,7 +10032,7 @@ yyreduce: break; case 280: -#line 3553 "Gmsh.y" +#line 3555 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction (std::string((yyvsp[(2) - (3)].c)), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10040,7 +10042,7 @@ yyreduce: break; case 281: -#line 3560 "Gmsh.y" +#line 3562 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction (std::string((yyvsp[(2) - (3)].c)), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10050,7 +10052,7 @@ yyreduce: break; case 282: -#line 3567 "Gmsh.y" +#line 3569 "Gmsh.y" { ImbricatedTest++; if(ImbricatedTest > MAX_RECUR_TESTS-1){ @@ -10073,7 +10075,7 @@ yyreduce: break; case 283: -#line 3587 "Gmsh.y" +#line 3589 "Gmsh.y" { if(ImbricatedTest > 0){ if (statusImbricatedTests[ImbricatedTest]){ @@ -10102,7 +10104,7 @@ yyreduce: break; case 284: -#line 3613 "Gmsh.y" +#line 3615 "Gmsh.y" { if(ImbricatedTest > 0){ if(statusImbricatedTests[ImbricatedTest]){ @@ -10117,7 +10119,7 @@ yyreduce: break; case 285: -#line 3625 "Gmsh.y" +#line 3627 "Gmsh.y" { ImbricatedTest--; if(ImbricatedTest < 0) @@ -10126,7 +10128,7 @@ yyreduce: break; case 286: -#line 3637 "Gmsh.y" +#line 3639 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10145,7 +10147,7 @@ yyreduce: break; case 287: -#line 3653 "Gmsh.y" +#line 3655 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10164,7 +10166,7 @@ yyreduce: break; case 288: -#line 3669 "Gmsh.y" +#line 3671 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), @@ -10175,7 +10177,7 @@ yyreduce: break; case 289: -#line 3677 "Gmsh.y" +#line 3679 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10184,7 +10186,7 @@ yyreduce: break; case 290: -#line 3683 "Gmsh.y" +#line 3685 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), @@ -10195,7 +10197,7 @@ yyreduce: break; case 291: -#line 3691 "Gmsh.y" +#line 3693 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10204,7 +10206,7 @@ yyreduce: break; case 292: -#line 3697 "Gmsh.y" +#line 3699 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), @@ -10215,7 +10217,7 @@ yyreduce: break; case 293: -#line 3705 "Gmsh.y" +#line 3707 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10224,7 +10226,7 @@ yyreduce: break; case 294: -#line 3711 "Gmsh.y" +#line 3713 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), @@ -10235,7 +10237,7 @@ yyreduce: break; case 295: -#line 3719 "Gmsh.y" +#line 3721 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10244,7 +10246,7 @@ yyreduce: break; case 296: -#line 3725 "Gmsh.y" +#line 3727 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., @@ -10254,7 +10256,7 @@ yyreduce: break; case 297: -#line 3732 "Gmsh.y" +#line 3734 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10270,7 +10272,7 @@ yyreduce: break; case 298: -#line 3745 "Gmsh.y" +#line 3747 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10287,7 +10289,7 @@ yyreduce: break; case 299: -#line 3759 "Gmsh.y" +#line 3761 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10304,7 +10306,7 @@ yyreduce: break; case 300: -#line 3773 "Gmsh.y" +#line 3775 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10323,19 +10325,19 @@ yyreduce: break; case 301: -#line 3792 "Gmsh.y" +#line 3794 "Gmsh.y" { ;} break; case 302: -#line 3795 "Gmsh.y" +#line 3797 "Gmsh.y" { ;} break; case 303: -#line 3801 "Gmsh.y" +#line 3803 "Gmsh.y" { int n = (int)fabs((yyvsp[(3) - (5)].d)); if(n){ // we accept n==0 to easily disable layers @@ -10350,7 +10352,7 @@ yyreduce: break; case 304: -#line 3813 "Gmsh.y" +#line 3815 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l)); @@ -10373,56 +10375,56 @@ yyreduce: break; case 305: -#line 3833 "Gmsh.y" +#line 3835 "Gmsh.y" { extr.mesh.ScaleLast = true; ;} break; case 306: -#line 3837 "Gmsh.y" +#line 3839 "Gmsh.y" { extr.mesh.Recombine = true; ;} break; case 307: -#line 3841 "Gmsh.y" +#line 3843 "Gmsh.y" { extr.mesh.Recombine = (yyvsp[(2) - (3)].d) ? true : false; ;} break; case 308: -#line 3845 "Gmsh.y" +#line 3847 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1; ;} break; case 309: -#line 3849 "Gmsh.y" +#line 3851 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1_RECOMB; ;} break; case 310: -#line 3853 "Gmsh.y" +#line 3855 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_NOVERTS_1; ;} break; case 311: -#line 3857 "Gmsh.y" +#line 3859 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_NOVERTS_1_RECOMB; ;} break; case 312: -#line 3861 "Gmsh.y" +#line 3863 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(6) - (9)].l), tags); int num = (int)(yyvsp[(3) - (9)].d); @@ -10434,7 +10436,7 @@ yyreduce: break; case 313: -#line 3870 "Gmsh.y" +#line 3872 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "Index")) extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d); @@ -10445,47 +10447,47 @@ yyreduce: break; case 314: -#line 3882 "Gmsh.y" +#line 3884 "Gmsh.y" { (yyval.i) = OCC_Internals::Union; ;} break; case 315: -#line 3883 "Gmsh.y" +#line 3885 "Gmsh.y" { (yyval.i) = OCC_Internals::Intersection; ;} break; case 316: -#line 3884 "Gmsh.y" +#line 3886 "Gmsh.y" { (yyval.i) = OCC_Internals::Difference; ;} break; case 317: -#line 3885 "Gmsh.y" +#line 3887 "Gmsh.y" { (yyval.i) = OCC_Internals::Section; ;} break; case 318: -#line 3886 "Gmsh.y" +#line 3888 "Gmsh.y" { (yyval.i) = OCC_Internals::Fragments; ;} break; case 319: -#line 3890 "Gmsh.y" +#line 3892 "Gmsh.y" { (yyval.i) = 0; ;} break; case 320: -#line 3891 "Gmsh.y" +#line 3893 "Gmsh.y" { (yyval.i) = 1; ;} break; case 321: -#line 3892 "Gmsh.y" +#line 3894 "Gmsh.y" { (yyval.i) = (yyvsp[(2) - (3)].d); ;} break; case 322: -#line 3897 "Gmsh.y" +#line 3899 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10505,7 +10507,7 @@ yyreduce: break; case 323: -#line 3914 "Gmsh.y" +#line 3916 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10522,7 +10524,7 @@ yyreduce: break; case 324: -#line 3932 "Gmsh.y" +#line 3934 "Gmsh.y" { if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ std::vector<int> shape[4], tool[4], out[4]; @@ -10537,14 +10539,14 @@ yyreduce: break; case 325: -#line 3947 "Gmsh.y" +#line 3949 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; ;} break; case 326: -#line 3951 "Gmsh.y" +#line 3953 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) (yyval.v)[0] = 1.; @@ -10560,14 +10562,14 @@ yyreduce: break; case 327: -#line 3966 "Gmsh.y" +#line 3968 "Gmsh.y" { (yyval.i) = -1; // left ;} break; case 328: -#line 3970 "Gmsh.y" +#line 3972 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) (yyval.i) = 1; @@ -10584,49 +10586,49 @@ yyreduce: break; case 329: -#line 3986 "Gmsh.y" +#line 3988 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; case 330: -#line 3990 "Gmsh.y" +#line 3992 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; case 331: -#line 3995 "Gmsh.y" +#line 3997 "Gmsh.y" { (yyval.i) = 45; ;} break; case 332: -#line 3999 "Gmsh.y" +#line 4001 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); ;} break; case 333: -#line 4005 "Gmsh.y" +#line 4007 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; case 334: -#line 4009 "Gmsh.y" +#line 4011 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; case 335: -#line 4016 "Gmsh.y" +#line 4018 "Gmsh.y" { // mesh sizes at vertices are stored in internal CAD data, as they can be // specified during vertex creation and copied around during CAD @@ -10646,7 +10648,7 @@ yyreduce: break; case 336: -#line 4033 "Gmsh.y" +#line 4035 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10690,7 +10692,7 @@ yyreduce: break; case 337: -#line 4074 "Gmsh.y" +#line 4076 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10737,7 +10739,7 @@ yyreduce: break; case 338: -#line 4118 "Gmsh.y" +#line 4120 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10779,7 +10781,7 @@ yyreduce: break; case 339: -#line 4157 "Gmsh.y" +#line 4159 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10807,7 +10809,7 @@ yyreduce: break; case 340: -#line 4182 "Gmsh.y" +#line 4184 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (8)].l)); i++){ double d; @@ -10819,7 +10821,7 @@ yyreduce: break; case 341: -#line 4191 "Gmsh.y" +#line 4193 "Gmsh.y" { // recombine constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10852,7 +10854,7 @@ yyreduce: break; case 342: -#line 4221 "Gmsh.y" +#line 4223 "Gmsh.y" { // recombine constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10881,7 +10883,7 @@ yyreduce: break; case 343: -#line 4247 "Gmsh.y" +#line 4249 "Gmsh.y" { // smoothing constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10910,7 +10912,7 @@ yyreduce: break; case 344: -#line 4274 "Gmsh.y" +#line 4276 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (11)].l)) != List_Nbr((yyvsp[(8) - (11)].l))){ yymsg(0, "Number of master lines (%d) different from number of " @@ -10944,7 +10946,7 @@ yyreduce: break; case 345: -#line 4306 "Gmsh.y" +#line 4308 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (11)].l)) != List_Nbr((yyvsp[(8) - (11)].l))){ yymsg(0, "Number of master faces (%d) different from number of " @@ -10973,7 +10975,7 @@ yyreduce: break; case 346: -#line 4333 "Gmsh.y" +#line 4335 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (18)].l)) != List_Nbr((yyvsp[(8) - (18)].l))){ yymsg(0, "Number of master edges (%d) different from number of " @@ -11001,7 +11003,7 @@ yyreduce: break; case 347: -#line 4359 "Gmsh.y" +#line 4361 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (18)].l)) != List_Nbr((yyvsp[(8) - (18)].l))){ yymsg(0, "Number of master faces (%d) different from number of " @@ -11029,7 +11031,7 @@ yyreduce: break; case 348: -#line 4385 "Gmsh.y" +#line 4387 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (12)].l)) != List_Nbr((yyvsp[(8) - (12)].l))){ yymsg(0, "Number of master edges (%d) different from number of " @@ -11057,7 +11059,7 @@ yyreduce: break; case 349: -#line 4411 "Gmsh.y" +#line 4413 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (12)].l)) != List_Nbr((yyvsp[(8) - (12)].l))){ yymsg(0, "Number of master faces (%d) different from number of " @@ -11085,7 +11087,7 @@ yyreduce: break; case 350: -#line 4437 "Gmsh.y" +#line 4439 "Gmsh.y" { if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){ yymsg(0, "Number of master surface edges (%d) different from number of " @@ -11109,7 +11111,7 @@ yyreduce: break; case 351: -#line 4458 "Gmsh.y" +#line 4460 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(0, tags, 2, (int)(yyvsp[(8) - (10)].d)); @@ -11118,7 +11120,7 @@ yyreduce: break; case 352: -#line 4464 "Gmsh.y" +#line 4466 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(1, tags, 2, (int)(yyvsp[(8) - (10)].d)); @@ -11127,7 +11129,7 @@ yyreduce: break; case 353: -#line 4470 "Gmsh.y" +#line 4472 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(0, tags, 3, (int)(yyvsp[(8) - (10)].d)); @@ -11136,7 +11138,7 @@ yyreduce: break; case 354: -#line 4476 "Gmsh.y" +#line 4478 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(1, tags, 3, (int)(yyvsp[(8) - (10)].d)); @@ -11145,7 +11147,7 @@ yyreduce: break; case 355: -#line 4482 "Gmsh.y" +#line 4484 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(2, tags, 3, (int)(yyvsp[(8) - (10)].d)); @@ -11154,7 +11156,7 @@ yyreduce: break; case 356: -#line 4488 "Gmsh.y" +#line 4490 "Gmsh.y" { // reverse mesh constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -11183,7 +11185,7 @@ yyreduce: break; case 357: -#line 4514 "Gmsh.y" +#line 4516 "Gmsh.y" { // reverse mesh constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -11212,7 +11214,7 @@ yyreduce: break; case 358: -#line 4540 "Gmsh.y" +#line 4542 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::viter it = GModel::current()->firstVertex(); @@ -11232,7 +11234,7 @@ yyreduce: break; case 359: -#line 4557 "Gmsh.y" +#line 4559 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::eiter it = GModel::current()->firstEdge(); @@ -11252,7 +11254,7 @@ yyreduce: break; case 360: -#line 4574 "Gmsh.y" +#line 4576 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::fiter it = GModel::current()->firstFace(); @@ -11272,7 +11274,7 @@ yyreduce: break; case 361: -#line 4591 "Gmsh.y" +#line 4593 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ double dnum; @@ -11287,7 +11289,7 @@ yyreduce: break; case 362: -#line 4603 "Gmsh.y" +#line 4605 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (4)].l), tags); GModel::current()->getGEOInternals()->setCompoundMesh(1, tags); @@ -11296,7 +11298,7 @@ yyreduce: break; case 363: -#line 4609 "Gmsh.y" +#line 4611 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (4)].l), tags); GModel::current()->getGEOInternals()->setCompoundMesh(2, tags); @@ -11305,7 +11307,7 @@ yyreduce: break; case 364: -#line 4615 "Gmsh.y" +#line 4617 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (4)].l), tags); GModel::current()->getGEOInternals()->setCompoundMesh(3, tags); @@ -11314,14 +11316,14 @@ yyreduce: break; case 365: -#line 4627 "Gmsh.y" +#line 4629 "Gmsh.y" { GModel::current()->getGEOInternals()->removeAllDuplicates(); ;} break; case 366: -#line 4631 "Gmsh.y" +#line 4633 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) GModel::current()->getGEOInternals()->removeAllDuplicates(); @@ -11334,7 +11336,7 @@ yyreduce: break; case 367: -#line 4641 "Gmsh.y" +#line 4643 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(4) - (6)].l), tags); GModel::current()->getGEOInternals()->mergeVertices(tags); @@ -11343,22 +11345,22 @@ yyreduce: break; case 368: -#line 4651 "Gmsh.y" +#line 4653 "Gmsh.y" { (yyval.c) = (char*)"Homology"; ;} break; case 369: -#line 4652 "Gmsh.y" +#line 4654 "Gmsh.y" { (yyval.c) = (char*)"Cohomology"; ;} break; case 370: -#line 4653 "Gmsh.y" +#line 4655 "Gmsh.y" { (yyval.c) = (char*)"Betti"; ;} break; case 371: -#line 4658 "Gmsh.y" +#line 4660 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < 4; i++) dim.push_back(i); @@ -11367,7 +11369,7 @@ yyreduce: break; case 372: -#line 4664 "Gmsh.y" +#line 4666 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){ @@ -11382,7 +11384,7 @@ yyreduce: break; case 373: -#line 4676 "Gmsh.y" +#line 4678 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){ @@ -11403,7 +11405,7 @@ yyreduce: break; case 374: -#line 4694 "Gmsh.y" +#line 4696 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(6) - (10)].l)); i++){ @@ -11429,47 +11431,47 @@ yyreduce: break; case 375: -#line 4721 "Gmsh.y" +#line 4723 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 376: -#line 4722 "Gmsh.y" +#line 4724 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 377: -#line 4723 "Gmsh.y" +#line 4725 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 378: -#line 4724 "Gmsh.y" +#line 4726 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 379: -#line 4725 "Gmsh.y" +#line 4727 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 380: -#line 4726 "Gmsh.y" +#line 4728 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 381: -#line 4727 "Gmsh.y" +#line 4729 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 382: -#line 4728 "Gmsh.y" +#line 4730 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 383: -#line 4730 "Gmsh.y" +#line 4732 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -11479,232 +11481,232 @@ yyreduce: break; case 384: -#line 4736 "Gmsh.y" +#line 4738 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 385: -#line 4737 "Gmsh.y" +#line 4739 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 386: -#line 4738 "Gmsh.y" +#line 4740 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 387: -#line 4739 "Gmsh.y" +#line 4741 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 388: -#line 4740 "Gmsh.y" +#line 4742 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 389: -#line 4741 "Gmsh.y" +#line 4743 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 390: -#line 4742 "Gmsh.y" +#line 4744 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 391: -#line 4743 "Gmsh.y" +#line 4745 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 392: -#line 4744 "Gmsh.y" +#line 4746 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 393: -#line 4745 "Gmsh.y" +#line 4747 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 394: -#line 4746 "Gmsh.y" +#line 4748 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 395: -#line 4747 "Gmsh.y" +#line 4749 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 396: -#line 4748 "Gmsh.y" +#line 4750 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 397: -#line 4749 "Gmsh.y" +#line 4751 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 398: -#line 4750 "Gmsh.y" +#line 4752 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 399: -#line 4751 "Gmsh.y" +#line 4753 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 400: -#line 4752 "Gmsh.y" +#line 4754 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 401: -#line 4753 "Gmsh.y" +#line 4755 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 402: -#line 4754 "Gmsh.y" +#line 4756 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 403: -#line 4755 "Gmsh.y" +#line 4757 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 404: -#line 4756 "Gmsh.y" +#line 4758 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 405: -#line 4757 "Gmsh.y" +#line 4759 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 406: -#line 4758 "Gmsh.y" +#line 4760 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 407: -#line 4759 "Gmsh.y" +#line 4761 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 408: -#line 4760 "Gmsh.y" +#line 4762 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 409: -#line 4761 "Gmsh.y" +#line 4763 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 410: -#line 4762 "Gmsh.y" +#line 4764 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 411: -#line 4763 "Gmsh.y" +#line 4765 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 412: -#line 4764 "Gmsh.y" +#line 4766 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d) + 0.5); ;} break; case 413: -#line 4765 "Gmsh.y" +#line 4767 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 414: -#line 4766 "Gmsh.y" +#line 4768 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 415: -#line 4767 "Gmsh.y" +#line 4769 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 416: -#line 4768 "Gmsh.y" +#line 4770 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 417: -#line 4777 "Gmsh.y" +#line 4779 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 418: -#line 4778 "Gmsh.y" +#line 4780 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 419: -#line 4779 "Gmsh.y" +#line 4781 "Gmsh.y" { (yyval.d) = (double)ImbricatedTest; ;} break; case 420: -#line 4780 "Gmsh.y" +#line 4782 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; case 421: -#line 4781 "Gmsh.y" +#line 4783 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; case 422: -#line 4782 "Gmsh.y" +#line 4784 "Gmsh.y" { (yyval.d) = GetGmshMajorVersion(); ;} break; case 423: -#line 4783 "Gmsh.y" +#line 4785 "Gmsh.y" { (yyval.d) = GetGmshMinorVersion(); ;} break; case 424: -#line 4784 "Gmsh.y" +#line 4786 "Gmsh.y" { (yyval.d) = GetGmshPatchVersion(); ;} break; case 425: -#line 4785 "Gmsh.y" +#line 4787 "Gmsh.y" { (yyval.d) = Cpu(); ;} break; case 426: -#line 4786 "Gmsh.y" +#line 4788 "Gmsh.y" { (yyval.d) = GetMemoryUsage()/1024./1024.; ;} break; case 427: -#line 4787 "Gmsh.y" +#line 4789 "Gmsh.y" { (yyval.d) = TotalRam(); ;} break; case 428: -#line 4792 "Gmsh.y" +#line 4794 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 429: -#line 4794 "Gmsh.y" +#line 4796 "Gmsh.y" { std::vector<double> val(1, (yyvsp[(3) - (6)].d)); Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions); @@ -11713,12 +11715,12 @@ yyreduce: break; case 430: -#line 4800 "Gmsh.y" +#line 4802 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 431: -#line 4802 "Gmsh.y" +#line 4804 "Gmsh.y" { (yyval.d) = Msg::GetOnelabNumber((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -11726,7 +11728,7 @@ yyreduce: break; case 432: -#line 4807 "Gmsh.y" +#line 4809 "Gmsh.y" { (yyval.d) = Msg::GetOnelabNumber((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -11734,7 +11736,7 @@ yyreduce: break; case 433: -#line 4812 "Gmsh.y" +#line 4814 "Gmsh.y" { if(gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (1)].c)]); @@ -11760,7 +11762,7 @@ yyreduce: break; case 434: -#line 4835 "Gmsh.y" +#line 4837 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -11781,7 +11783,7 @@ yyreduce: break; case 435: -#line 4853 "Gmsh.y" +#line 4855 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -11802,7 +11804,7 @@ yyreduce: break; case 436: -#line 4871 "Gmsh.y" +#line 4873 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -11823,7 +11825,7 @@ yyreduce: break; case 437: -#line 4889 "Gmsh.y" +#line 4891 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -11844,7 +11846,7 @@ yyreduce: break; case 438: -#line 4907 "Gmsh.y" +#line 4909 "Gmsh.y" { (yyval.d) = gmsh_yysymbols.count((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -11852,7 +11854,7 @@ yyreduce: break; case 439: -#line 4912 "Gmsh.y" +#line 4914 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c)); (yyval.d) = !StatFile(tmp); @@ -11861,7 +11863,7 @@ yyreduce: break; case 440: -#line 4918 "Gmsh.y" +#line 4920 "Gmsh.y" { if(gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(2) - (4)].c)]); @@ -11879,7 +11881,7 @@ yyreduce: break; case 441: -#line 4933 "Gmsh.y" +#line 4935 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c)); @@ -11901,7 +11903,7 @@ yyreduce: break; case 442: -#line 4952 "Gmsh.y" +#line 4954 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -11924,7 +11926,7 @@ yyreduce: break; case 443: -#line 4972 "Gmsh.y" +#line 4974 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -11947,7 +11949,7 @@ yyreduce: break; case 444: -#line 4992 "Gmsh.y" +#line 4994 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -11970,7 +11972,7 @@ yyreduce: break; case 445: -#line 5012 "Gmsh.y" +#line 5014 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -11993,7 +11995,7 @@ yyreduce: break; case 446: -#line 5042 "Gmsh.y" +#line 5044 "Gmsh.y" { std::string key((yyvsp[(1) - (3)].c)); if(StructTable_M.count(key)) { @@ -12014,7 +12016,7 @@ yyreduce: break; case 447: -#line 5060 "Gmsh.y" +#line 5062 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d)); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); @@ -12022,7 +12024,7 @@ yyreduce: break; case 448: -#line 5065 "Gmsh.y" +#line 5067 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){ @@ -12035,7 +12037,7 @@ yyreduce: break; case 449: -#line 5075 "Gmsh.y" +#line 5077 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){ @@ -12048,7 +12050,7 @@ yyreduce: break; case 450: -#line 5085 "Gmsh.y" +#line 5087 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -12056,7 +12058,7 @@ yyreduce: break; case 451: -#line 5090 "Gmsh.y" +#line 5092 "Gmsh.y" { int matches = 0; for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -12070,7 +12072,7 @@ yyreduce: break; case 452: -#line 5101 "Gmsh.y" +#line 5103 "Gmsh.y" { std::string s((yyvsp[(3) - (6)].c)), substr((yyvsp[(5) - (6)].c)); if(s.find(substr) != std::string::npos) @@ -12082,7 +12084,7 @@ yyreduce: break; case 453: -#line 5110 "Gmsh.y" +#line 5112 "Gmsh.y" { (yyval.d) = strlen((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -12090,7 +12092,7 @@ yyreduce: break; case 454: -#line 5115 "Gmsh.y" +#line 5117 "Gmsh.y" { (yyval.d) = strcmp((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); @@ -12098,7 +12100,7 @@ yyreduce: break; case 455: -#line 5120 "Gmsh.y" +#line 5122 "Gmsh.y" { int align = 0, font = 0, fontsize = CTX::instance()->glFontSize; if(List_Nbr((yyvsp[(3) - (4)].l)) % 2){ @@ -12125,12 +12127,12 @@ yyreduce: break; case 456: -#line 5148 "Gmsh.y" +#line 5150 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 457: -#line 5151 "Gmsh.y" +#line 5153 "Gmsh.y" { std::string key(Struct_Name); StructTable_M[key] = Struct((int)(yyvsp[(6) - (8)].d), 1, floatOptions, charOptions); @@ -12140,22 +12142,22 @@ yyreduce: break; case 458: -#line 5161 "Gmsh.y" +#line 5163 "Gmsh.y" { Struct_NameSpace = NULL; Struct_Name = (yyvsp[(1) - (1)].c); ;} break; case 459: -#line 5163 "Gmsh.y" +#line 5165 "Gmsh.y" { Struct_NameSpace = (yyvsp[(1) - (4)].c); Struct_Name = (yyvsp[(4) - (4)].c); ;} break; case 460: -#line 5168 "Gmsh.y" +#line 5170 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); flag_tSTRING_alloc = 1; ;} break; case 462: -#line 5179 "Gmsh.y" +#line 5181 "Gmsh.y" { std::string key((yyvsp[(2) - (3)].c)), val(Struct_Name); gmsh_yystringsymbols[key] = std::vector<std::string>(1, val); @@ -12164,70 +12166,70 @@ yyreduce: break; case 463: -#line 5188 "Gmsh.y" +#line 5190 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; case 464: -#line 5192 "Gmsh.y" +#line 5194 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; case 465: -#line 5196 "Gmsh.y" +#line 5198 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; case 466: -#line 5200 "Gmsh.y" +#line 5202 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; case 467: -#line 5204 "Gmsh.y" +#line 5206 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; case 468: -#line 5211 "Gmsh.y" +#line 5213 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d); ;} break; case 469: -#line 5215 "Gmsh.y" +#line 5217 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0; ;} break; case 470: -#line 5219 "Gmsh.y" +#line 5221 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 471: -#line 5223 "Gmsh.y" +#line 5225 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 472: -#line 5230 "Gmsh.y" +#line 5232 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); @@ -12235,14 +12237,14 @@ yyreduce: break; case 473: -#line 5235 "Gmsh.y" +#line 5237 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; case 474: -#line 5242 "Gmsh.y" +#line 5244 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -12250,14 +12252,14 @@ yyreduce: break; case 475: -#line 5247 "Gmsh.y" +#line 5249 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 476: -#line 5251 "Gmsh.y" +#line 5253 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -12265,14 +12267,14 @@ yyreduce: break; case 477: -#line 5256 "Gmsh.y" +#line 5258 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 478: -#line 5260 "Gmsh.y" +#line 5262 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12283,7 +12285,7 @@ yyreduce: break; case 479: -#line 5268 "Gmsh.y" +#line 5270 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12294,14 +12296,14 @@ yyreduce: break; case 480: -#line 5279 "Gmsh.y" +#line 5281 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 481: -#line 5283 "Gmsh.y" +#line 5285 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) (yyval.l) = 0; @@ -12313,7 +12315,7 @@ yyreduce: break; case 482: -#line 5295 "Gmsh.y" +#line 5297 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12324,7 +12326,7 @@ yyreduce: break; case 483: -#line 5303 "Gmsh.y" +#line 5305 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12335,7 +12337,7 @@ yyreduce: break; case 484: -#line 5311 "Gmsh.y" +#line 5313 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); @@ -12345,7 +12347,7 @@ yyreduce: break; case 485: -#line 5318 "Gmsh.y" +#line 5320 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d)){ //|| ($1 < $3 && $5 < 0) || ($1 > $3 && $5 > 0) @@ -12358,7 +12360,7 @@ yyreduce: break; case 486: -#line 5328 "Gmsh.y" +#line 5330 "Gmsh.y" { (yyval.l) = List_Create(3, 1, sizeof(double)); int tag = (int)(yyvsp[(3) - (4)].d); @@ -12384,7 +12386,7 @@ yyreduce: break; case 487: -#line 5351 "Gmsh.y" +#line 5353 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(0, (yyval.l)); @@ -12393,7 +12395,7 @@ yyreduce: break; case 488: -#line 5357 "Gmsh.y" +#line 5359 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(1, (yyval.l)); @@ -12402,7 +12404,7 @@ yyreduce: break; case 489: -#line 5363 "Gmsh.y" +#line 5365 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(2, (yyval.l)); @@ -12411,7 +12413,7 @@ yyreduce: break; case 490: -#line 5369 "Gmsh.y" +#line 5371 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(3, (yyval.l)); @@ -12420,7 +12422,7 @@ yyreduce: break; case 491: -#line 5375 "Gmsh.y" +#line 5377 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -12434,7 +12436,7 @@ yyreduce: break; case 492: -#line 5386 "Gmsh.y" +#line 5388 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -12448,7 +12450,7 @@ yyreduce: break; case 493: -#line 5397 "Gmsh.y" +#line 5399 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -12462,7 +12464,7 @@ yyreduce: break; case 494: -#line 5408 "Gmsh.y" +#line 5410 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -12476,7 +12478,7 @@ yyreduce: break; case 495: -#line 5420 "Gmsh.y" +#line 5422 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(0, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -12484,7 +12486,7 @@ yyreduce: break; case 496: -#line 5426 "Gmsh.y" +#line 5428 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(1, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -12492,7 +12494,7 @@ yyreduce: break; case 497: -#line 5432 "Gmsh.y" +#line 5434 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(2, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -12500,7 +12502,7 @@ yyreduce: break; case 498: -#line 5438 "Gmsh.y" +#line 5440 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(3, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -12508,7 +12510,7 @@ yyreduce: break; case 499: -#line 5443 "Gmsh.y" +#line 5445 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -12521,7 +12523,7 @@ yyreduce: break; case 500: -#line 5453 "Gmsh.y" +#line 5455 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -12534,7 +12536,7 @@ yyreduce: break; case 501: -#line 5463 "Gmsh.y" +#line 5465 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -12547,7 +12549,7 @@ yyreduce: break; case 502: -#line 5473 "Gmsh.y" +#line 5475 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -12562,7 +12564,7 @@ yyreduce: break; case 503: -#line 5485 "Gmsh.y" +#line 5487 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -12577,7 +12579,7 @@ yyreduce: break; case 504: -#line 5498 "Gmsh.y" +#line 5500 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c))) @@ -12592,35 +12594,35 @@ yyreduce: break; case 505: -#line 5510 "Gmsh.y" +#line 5512 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); ;} break; case 506: -#line 5514 "Gmsh.y" +#line 5516 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); ;} break; case 507: -#line 5518 "Gmsh.y" +#line 5520 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (6)].l); ;} break; case 508: -#line 5522 "Gmsh.y" +#line 5524 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (6)].l); ;} break; case 509: -#line 5526 "Gmsh.y" +#line 5528 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -12641,7 +12643,7 @@ yyreduce: break; case 510: -#line 5544 "Gmsh.y" +#line 5546 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -12662,7 +12664,7 @@ yyreduce: break; case 511: -#line 5562 "Gmsh.y" +#line 5564 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(double)); for(int i = 0; i < (int)(yyvsp[(7) - (8)].d); i++) { @@ -12673,7 +12675,7 @@ yyreduce: break; case 512: -#line 5570 "Gmsh.y" +#line 5572 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(double)); for(int i = 0; i < (int)(yyvsp[(7) - (8)].d); i++) { @@ -12684,7 +12686,7 @@ yyreduce: break; case 513: -#line 5578 "Gmsh.y" +#line 5580 "Gmsh.y" { Msg::Barrier(); FILE *File; @@ -12716,7 +12718,7 @@ yyreduce: break; case 514: -#line 5607 "Gmsh.y" +#line 5609 "Gmsh.y" { double x0 = (yyvsp[(3) - (14)].d), x1 = (yyvsp[(5) - (14)].d), y0 = (yyvsp[(7) - (14)].d), y1 = (yyvsp[(9) - (14)].d), ys = (yyvsp[(11) - (14)].d); int N = (int)(yyvsp[(13) - (14)].d); @@ -12729,7 +12731,7 @@ yyreduce: break; case 515: -#line 5617 "Gmsh.y" +#line 5619 "Gmsh.y" { std::vector<double> tmp; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -12748,7 +12750,7 @@ yyreduce: break; case 516: -#line 5636 "Gmsh.y" +#line 5638 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -12756,21 +12758,21 @@ yyreduce: break; case 517: -#line 5641 "Gmsh.y" +#line 5643 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 518: -#line 5645 "Gmsh.y" +#line 5647 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; case 519: -#line 5649 "Gmsh.y" +#line 5651 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -12782,21 +12784,21 @@ yyreduce: break; case 520: -#line 5661 "Gmsh.y" +#line 5663 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); ;} break; case 521: -#line 5665 "Gmsh.y" +#line 5667 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); ;} break; case 522: -#line 5677 "Gmsh.y" +#line 5679 "Gmsh.y" { int flag = 0; if(gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ @@ -12816,7 +12818,7 @@ yyreduce: break; case 523: -#line 5694 "Gmsh.y" +#line 5696 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); @@ -12826,14 +12828,14 @@ yyreduce: break; case 524: -#line 5704 "Gmsh.y" +#line 5706 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 525: -#line 5708 "Gmsh.y" +#line 5710 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d)); @@ -12848,7 +12850,7 @@ yyreduce: break; case 526: -#line 5723 "Gmsh.y" +#line 5725 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); @@ -12856,21 +12858,21 @@ yyreduce: break; case 527: -#line 5728 "Gmsh.y" +#line 5730 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; case 528: -#line 5735 "Gmsh.y" +#line 5737 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 529: -#line 5739 "Gmsh.y" +#line 5741 "Gmsh.y" { std::string val; if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))) @@ -12886,7 +12888,7 @@ yyreduce: break; case 530: -#line 5752 "Gmsh.y" +#line 5754 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -12903,7 +12905,7 @@ yyreduce: break; case 531: -#line 5766 "Gmsh.y" +#line 5768 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -12920,7 +12922,7 @@ yyreduce: break; case 532: -#line 5780 "Gmsh.y" +#line 5782 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -12937,7 +12939,7 @@ yyreduce: break; case 533: -#line 5794 "Gmsh.y" +#line 5796 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -12954,7 +12956,7 @@ yyreduce: break; case 534: -#line 5808 "Gmsh.y" +#line 5810 "Gmsh.y" { std::string out; std::string key((yyvsp[(1) - (3)].c)); @@ -12978,7 +12980,7 @@ yyreduce: break; case 535: -#line 5829 "Gmsh.y" +#line 5831 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out); @@ -12989,7 +12991,7 @@ yyreduce: break; case 536: -#line 5837 "Gmsh.y" +#line 5839 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(0, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -12998,7 +13000,7 @@ yyreduce: break; case 537: -#line 5843 "Gmsh.y" +#line 5845 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(1, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -13007,7 +13009,7 @@ yyreduce: break; case 538: -#line 5849 "Gmsh.y" +#line 5851 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(2, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -13016,7 +13018,7 @@ yyreduce: break; case 539: -#line 5855 "Gmsh.y" +#line 5857 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(3, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -13025,21 +13027,21 @@ yyreduce: break; case 540: -#line 5864 "Gmsh.y" +#line 5866 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 541: -#line 5868 "Gmsh.y" +#line 5870 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 542: -#line 5872 "Gmsh.y" +#line 5874 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); time_t now; @@ -13050,7 +13052,7 @@ yyreduce: break; case 543: -#line 5880 "Gmsh.y" +#line 5882 "Gmsh.y" { std::string exe = Msg::GetExecutableName(); (yyval.c) = (char *)Malloc(exe.size() + 1); @@ -13059,7 +13061,7 @@ yyreduce: break; case 544: -#line 5886 "Gmsh.y" +#line 5888 "Gmsh.y" { std::string action = Msg::GetOnelabAction(); (yyval.c) = (char *)Malloc(action.size() + 1); @@ -13068,7 +13070,7 @@ yyreduce: break; case 545: -#line 5892 "Gmsh.y" +#line 5894 "Gmsh.y" { const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); if(!env) env = ""; @@ -13079,7 +13081,7 @@ yyreduce: break; case 546: -#line 5900 "Gmsh.y" +#line 5902 "Gmsh.y" { std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -13090,7 +13092,7 @@ yyreduce: break; case 547: -#line 5908 "Gmsh.y" +#line 5910 "Gmsh.y" { std::string s = Msg::GetOnelabString((yyvsp[(3) - (4)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -13100,7 +13102,7 @@ yyreduce: break; case 548: -#line 5915 "Gmsh.y" +#line 5917 "Gmsh.y" { std::string s = Msg::GetOnelabString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -13111,7 +13113,7 @@ yyreduce: break; case 549: -#line 5923 "Gmsh.y" +#line 5925 "Gmsh.y" { int size = 1; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++) @@ -13129,7 +13131,7 @@ yyreduce: break; case 550: -#line 5938 "Gmsh.y" +#line 5940 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -13146,7 +13148,7 @@ yyreduce: break; case 551: -#line 5952 "Gmsh.y" +#line 5954 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -13163,7 +13165,7 @@ yyreduce: break; case 552: -#line 5966 "Gmsh.y" +#line 5968 "Gmsh.y" { std::string input = (yyvsp[(3) - (8)].c); std::string substr_old = (yyvsp[(5) - (8)].c); @@ -13178,7 +13180,7 @@ yyreduce: break; case 553: -#line 5978 "Gmsh.y" +#line 5980 "Gmsh.y" { int size = 1; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++) @@ -13197,7 +13199,7 @@ yyreduce: break; case 554: -#line 5994 "Gmsh.y" +#line 5996 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -13209,7 +13211,7 @@ yyreduce: break; case 555: -#line 6003 "Gmsh.y" +#line 6005 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -13221,7 +13223,7 @@ yyreduce: break; case 556: -#line 6012 "Gmsh.y" +#line 6014 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -13234,7 +13236,7 @@ yyreduce: break; case 557: -#line 6022 "Gmsh.y" +#line 6024 "Gmsh.y" { if((yyvsp[(3) - (8)].d)){ (yyval.c) = (yyvsp[(5) - (8)].c); @@ -13248,7 +13250,7 @@ yyreduce: break; case 558: -#line 6033 "Gmsh.y" +#line 6035 "Gmsh.y" { std::string in = (yyvsp[(3) - (8)].c); std::string out = in.substr((int)(yyvsp[(5) - (8)].d), (int)(yyvsp[(7) - (8)].d)); @@ -13259,7 +13261,7 @@ yyreduce: break; case 559: -#line 6041 "Gmsh.y" +#line 6043 "Gmsh.y" { std::string in = (yyvsp[(3) - (6)].c); std::string out = in.substr((int)(yyvsp[(5) - (6)].d), std::string::npos); @@ -13270,14 +13272,14 @@ yyreduce: break; case 560: -#line 6049 "Gmsh.y" +#line 6051 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 561: -#line 6053 "Gmsh.y" +#line 6055 "Gmsh.y" { char tmpstring[5000]; int i = printListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -13299,7 +13301,7 @@ yyreduce: break; case 562: -#line 6072 "Gmsh.y" +#line 6074 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c)); (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13309,7 +13311,7 @@ yyreduce: break; case 563: -#line 6079 "Gmsh.y" +#line 6081 "Gmsh.y" { std::string tmp = SplitFileName(GetAbsolutePath(gmsh_yyname))[0]; (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13318,7 +13320,7 @@ yyreduce: break; case 564: -#line 6085 "Gmsh.y" +#line 6087 "Gmsh.y" { std::string tmp = SplitFileName((yyvsp[(3) - (4)].c))[0]; (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13328,7 +13330,7 @@ yyreduce: break; case 565: -#line 6092 "Gmsh.y" +#line 6094 "Gmsh.y" { std::string tmp = GetAbsolutePath((yyvsp[(3) - (4)].c)); (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13338,12 +13340,12 @@ yyreduce: break; case 566: -#line 6099 "Gmsh.y" +#line 6101 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 567: -#line 6101 "Gmsh.y" +#line 6103 "Gmsh.y" { std::string val((yyvsp[(3) - (6)].c)); Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions); @@ -13354,7 +13356,7 @@ yyreduce: break; case 568: -#line 6109 "Gmsh.y" +#line 6111 "Gmsh.y" { std::string out; int val = (int)(yyvsp[(3) - (4)].d); @@ -13367,17 +13369,17 @@ yyreduce: break; case 569: -#line 6123 "Gmsh.y" +#line 6125 "Gmsh.y" { Struct_NameSpace = NULL; (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 570: -#line 6125 "Gmsh.y" +#line 6127 "Gmsh.y" { Struct_NameSpace = (yyvsp[(1) - (5)].c); (yyval.d) = (yyvsp[(5) - (5)].d); ;} break; case 571: -#line 6130 "Gmsh.y" +#line 6132 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(char*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].c))); @@ -13385,14 +13387,14 @@ yyreduce: break; case 572: -#line 6135 "Gmsh.y" +#line 6137 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;} break; case 573: -#line 6143 "Gmsh.y" +#line 6145 "Gmsh.y" { char tmpstr[256]; sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d)); @@ -13403,7 +13405,7 @@ yyreduce: break; case 574: -#line 6152 "Gmsh.y" +#line 6154 "Gmsh.y" { char tmpstr[256]; sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d)); @@ -13414,23 +13416,23 @@ yyreduce: break; case 575: -#line 6165 "Gmsh.y" +#line 6167 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 576: -#line 6168 "Gmsh.y" +#line 6170 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 577: -#line 6172 "Gmsh.y" +#line 6174 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; /* Line 1267 of yacc.c. */ -#line 13434 "Gmsh.tab.cpp" +#line 13436 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -13644,7 +13646,7 @@ yyreturn: } -#line 6175 "Gmsh.y" +#line 6177 "Gmsh.y" void assignVariable(const std::string &name, int index, int assignType, diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index bac95dc0eb9dce7cd60fccd3de236f9540e38b0d..48cc63b97e06f907d723efc14006845bfa5573b4 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -2025,11 +2025,13 @@ Shape : std::vector<int> tags; ListOfDouble2Vector($6, tags); std::vector<double> param; ListOfDouble2Vector($6, param); $$.Type = 0; - if(param.size() == 4 || param.size() == 5){ + if(param.size() >= 4 && param.size() <= 7){ if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ - double alpha = (param.size() == 5) ? param[4] : 2.*M_PI; + double a1 = (param.size() >= 5) ? param[4] : -M_PI/2; + double a2 = (param.size() >= 6) ? param[5] : M_PI/2; + double a3 = (param.size() >= 7) ? param[6] : 2.*M_PI; GModel::current()->getOCCInternals()->addSphere - (num, param[0], param[1], param[2], param[3], alpha); + (num, param[0], param[1], param[2], param[3], a1, a2, a3); } else{ yymsg(0, "Sphere only available with OpenCASCADE factory"); @@ -2041,7 +2043,7 @@ Shape : (num, tags[0], tags[1]); } else{ - yymsg(0, "Sphere requires 2 points or 4 or 5 parameters"); + yymsg(0, "Sphere requires 2 points or from 4 to 7 parameters"); } List_Delete($6); $$.Num = num; diff --git a/demos/boolean/primitives.geo b/demos/boolean/primitives.geo index 38d966c4278fad3ef594d6b23cd8e58adc3552dd..7988ead324348e0407a1021723e791afdd57a6d9 100644 --- a/demos/boolean/primitives.geo +++ b/demos/boolean/primitives.geo @@ -7,7 +7,10 @@ Mesh.CharacteristicLengthMax = 0.1; // 3D x = 0; y = 0; Sphere(newv) = {x++,y,0, 0.3}; -Sphere(newv) = {x++,y,0, 0.3, Pi/3}; +Sphere(newv) = {x++,y,0, 0.3, Pi/4}; +Sphere(newv) = {x++,y,0, 0.3, -Pi/4, Pi/4}; +Sphere(newv) = {x++,y,0, 0.3, -Pi/4, Pi/4, Pi/2}; +Sphere(newv) = {x++,y,0, 0.3, -Pi/2, Pi/2, Pi/4}; Cylinder(newv) = {x++,y,0, x-0.5,y,0, 0.5}; Cylinder(newv) = {x++,y,0, x-0.5,y,0, 0.5, Pi/3}; Block(newv) = {x++,y,0, x-0.5,y+0.5,0.5}; @@ -55,7 +58,6 @@ Line(newl) = {p,p+1}; p = newp; Point(p) = {x++,y,0}; Point(p+1) = {x-0.5,y,0}; Point(p+2) = {x-1,y+0.5,0}; Circle(newl) = {p+1,p,p+2}; - Circle(newl) = {x++,y,0, 0.3}; Circle(newl) = {x++,y,0, 0.3, Pi/3}; Circle(newl) = {x++,y,0, 0.3, -Pi/3, Pi/3}; diff --git a/demos/boolean/thicksolid.geo b/demos/boolean/thicksolid.geo index 754231577bfa384ed2ec99efa593f811331cf771..af08e76ef6fd320b480d2242ab23de689f6b27f2 100644 --- a/demos/boolean/thicksolid.geo +++ b/demos/boolean/thicksolid.geo @@ -4,10 +4,7 @@ Mesh.CharacteristicLengthMin = 0.1; Mesh.CharacteristicLengthMax = 0.1; Block(1) = {0,0,0,1,1,1}; -ThickSolid(11) = {1, 0.05}; +Boundary{ Volume{1}; } +ThickSolid(100) = {1, 0.05, 6}; -Block(2) = {2,0,0,3,1,1}; -Boundary{ Volume{2}; } -ThickSolid(12) = {2, 0.05, 1, 2}; - -Delete{Volume{1,2};} +Delete{ Surface{6}; Volume{1}; }