diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index 1ce5cded7d3f591e2dcd85e19ff4f18079a3e3bb..decae7ce9f2ca363b5bc4198a1cdd750e924b7e6 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -535,6 +535,9 @@ void OCC_Internals::addSurfaceLoop(int tag, std::vector<int> faceTags) TopExp_Explorer exp0; for(exp0.Init(result, TopAbs_SHELL); exp0.More(); exp0.Next()){ TopoDS_Shell shell = TopoDS::Shell(exp0.Current()); + //ShapeFix_Shell fix; + //fix.FixFaceOrientation(shell); + //shell = fix.Shell(); int t = tag; if(first){ first = false; @@ -1017,6 +1020,21 @@ void OCC_Internals::copy(std::vector<int> inTags[4], std::vector<int> outTags[4] } } +void OCC_Internals::remove(std::vector<int> inTags[4]) +{ + for(unsigned int dim = 0; dim < 4; dim++){ + for(unsigned int i = 0; i < inTags[dim].size(); i++){ + int tag = inTags[dim][i]; + if(!isBound(dim, tag)){ + Msg::Error("Unknown OpenCASCADE entity of dimension %d with tag %d", + dim, tag); + return; + } + unbind(find(dim, tag), dim, tag); + } + } +} + void OCC_Internals::importShapes(const std::string &fileName, std::vector<int> outTags[4], const std::string &format) @@ -1238,19 +1256,19 @@ void OCC_Internals::_addShapeToMaps(TopoDS_Shape shape) if(_fmap.FindIndex(face) < 1){ _fmap.Add(face); - for(exp3.Init(exp2.Current().Oriented(TopAbs_FORWARD), TopAbs_WIRE); - exp3.More(); exp3.Next()){ + for(exp3.Init(face.Oriented(TopAbs_FORWARD), TopAbs_WIRE); exp3.More(); exp3.Next()){ + //for(exp3.Init(face, TopAbs_WIRE); exp3.More(); exp3.Next()){ TopoDS_Wire wire = TopoDS::Wire(exp3.Current()); if(_wmap.FindIndex(wire) < 1){ _wmap.Add(wire); - for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); + for(exp4.Init(wire, TopAbs_EDGE); exp4.More(); exp4.Next()){ TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if(_emap.FindIndex(edge) < 1){ _emap.Add(edge); - for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); + for(exp5.Init(edge, TopAbs_VERTEX); exp5.More(); exp5.Next()){ TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if(_vmap.FindIndex(vertex) < 1) @@ -1278,18 +1296,17 @@ void OCC_Internals::_addShapeToMaps(TopoDS_Shape shape) if(_fmap.FindIndex(face) < 1){ _fmap.Add(face); - for(exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()){ + for(exp3.Init(face, TopAbs_WIRE); exp3.More(); exp3.Next()){ TopoDS_Wire wire = TopoDS::Wire(exp3.Current()); if(_wmap.FindIndex(wire) < 1){ _wmap.Add(wire); - for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()){ + for(exp4.Init(wire, TopAbs_EDGE); exp4.More(); exp4.Next()){ TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if(_emap.FindIndex(edge) < 1){ _emap.Add(edge); - for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); - exp5.Next()){ + for(exp5.Init(edge, TopAbs_VERTEX); exp5.More(); exp5.Next()){ TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if(_vmap.FindIndex(vertex) < 1) _vmap.Add(vertex); @@ -1309,17 +1326,17 @@ void OCC_Internals::_addShapeToMaps(TopoDS_Shape shape) if(_fmap.FindIndex(face) < 1){ _fmap.Add(face); - for(exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()){ + for(exp3.Init(face, TopAbs_WIRE); exp3.More(); exp3.Next()){ TopoDS_Wire wire = TopoDS::Wire(exp3.Current()); if(_wmap.FindIndex(wire) < 1){ _wmap.Add(wire); - for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()){ + for(exp4.Init(wire, TopAbs_EDGE); exp4.More(); exp4.Next()){ TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if(_emap.FindIndex(edge) < 1){ _emap.Add(edge); - for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){ + for(exp5.Init(edge, TopAbs_VERTEX); exp5.More(); exp5.Next()){ TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if(_vmap.FindIndex(vertex) < 1) _vmap.Add(vertex); @@ -1337,12 +1354,12 @@ void OCC_Internals::_addShapeToMaps(TopoDS_Shape shape) if(_wmap.FindIndex(wire) < 1){ _wmap.Add(wire); - for(exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()){ + for(exp4.Init(wire, TopAbs_EDGE); exp4.More(); exp4.Next()){ TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if(_emap.FindIndex(edge) < 1){ _emap.Add(edge); - for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){ + for(exp5.Init(edge, TopAbs_VERTEX); exp5.More(); exp5.Next()){ TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if(_vmap.FindIndex(vertex) < 1) _vmap.Add(vertex); @@ -1358,7 +1375,7 @@ void OCC_Internals::_addShapeToMaps(TopoDS_Shape shape) if(_emap.FindIndex(edge) < 1){ _emap.Add(edge); - for(exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()){ + for(exp5.Init(edge, TopAbs_VERTEX); exp5.More(); exp5.Next()){ TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if(_vmap.FindIndex(vertex) < 1) _vmap.Add(vertex); diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h index ca16d1f6b064b3336aee8c013aaa9440524ba79b..c4ef305bedab80612844f1fe046614de108d6871 100644 --- a/Geo/GModelIO_OCC.h +++ b/Geo/GModelIO_OCC.h @@ -47,35 +47,6 @@ class OCC_Internals { // apply a geometrical transformation void _transform(std::vector<int> inTags[4], BRepBuilderAPI_Transform &tfo); - // *** FIXME will be removed *** - protected : - TopoDS_Shape _shape; - public: - void _addShapeToLists(TopoDS_Shape shape){ _addShapeToMaps(shape); } - void _healGeometry(double tolerance, bool fixdegenerated, - bool fixsmalledges, bool fixspotstripfaces, bool sewfaces, - bool makesolids=false, double scaling=0.0) - { - _healShape(_shape, tolerance, fixdegenerated, fixsmalledges, - fixspotstripfaces, sewfaces, makesolids, scaling); - } - void applyBooleanOperator(TopoDS_Shape tool, const BooleanOperator &op); - TopoDS_Shape getShape () { return _shape; } - void buildLists(); - void buildShapeFromLists(TopoDS_Shape shape); - void fillet(std::vector<TopoDS_Edge> &shapes, double radius); - void buildShapeFromGModel(GModel*); - void buildGModel(GModel *gm); - void loadShape(const TopoDS_Shape *s) - { - std::vector<int> tags[4]; importShapes(s, tags); - } - GVertex *addVertexToModel(GModel *model, TopoDS_Vertex v); - GEdge *addEdgeToModel(GModel *model, TopoDS_Edge e); - GFace *addFaceToModel(GModel *model, TopoDS_Face f); - GRegion *addRegionToModel(GModel *model, TopoDS_Solid r); - // *** FIXME end of stuff that will be removed *** - public: OCC_Internals(); @@ -157,6 +128,7 @@ class OCC_Internals { void rotate(std::vector<int> inTags[4], double x, double y, double z, double dx, double dy, double dz, double angle); void copy(std::vector<int> inTags[4], std::vector<int> outTags[4]); + void remove(std::vector<int> inTags[4]); // import shapes from file void importShapes(const std::string &fileName, std::vector<int> outTags[4], @@ -176,6 +148,37 @@ class OCC_Internals { GEdge *getOCCEdgeByNativePtr(GModel *model, TopoDS_Edge toFind); GFace *getOCCFaceByNativePtr(GModel *model, TopoDS_Face toFind); GRegion *getOCCRegionByNativePtr(GModel *model, TopoDS_Solid toFind); + + + + // *** FIXME what follows will be removed *** + protected : + TopoDS_Shape _shape; + public: + void _addShapeToLists(TopoDS_Shape shape){ _addShapeToMaps(shape); } + void _healGeometry(double tolerance, bool fixdegenerated, + bool fixsmalledges, bool fixspotstripfaces, bool sewfaces, + bool makesolids=false, double scaling=0.0) + { + _healShape(_shape, tolerance, fixdegenerated, fixsmalledges, + fixspotstripfaces, sewfaces, makesolids, scaling); + } + void applyBooleanOperator(TopoDS_Shape tool, const BooleanOperator &op); + TopoDS_Shape getShape () { return _shape; } + void buildLists(); + void buildShapeFromLists(TopoDS_Shape shape); + void fillet(std::vector<TopoDS_Edge> &shapes, double radius); + void buildShapeFromGModel(GModel*); + void buildGModel(GModel *gm); + void loadShape(const TopoDS_Shape *s) + { + std::vector<int> tags[4]; importShapes(s, tags); + } + GVertex *addVertexToModel(GModel *model, TopoDS_Vertex v); + GEdge *addEdgeToModel(GModel *model, TopoDS_Edge e); + GFace *addFaceToModel(GModel *model, TopoDS_Face f); + GRegion *addRegionToModel(GModel *model, TopoDS_Solid r); + // *** FIXME end of stuff that will be removed *** }; #else @@ -223,6 +226,7 @@ public: void rotate(std::vector<int> inTags[4], double x, double y, double z, double dx, double dy, double dz, double angle){} void copy(std::vector<int> inTags[4], std::vector<int> outTags[4]){} + void remove(std::vector<int> inTags[4]); void importShapes(const std::string &fileName, std::vector<int> outTags[4], const std::string &format=""){} void exportShapes(const std::string &fileName, const std::string &format=""){} diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index a310f7957a081bc101e9df9ff7b5d330c804cf2e..c19128867d1960e7c3ac5815c8a71403dad8b71d 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1385,42 +1385,42 @@ static const yytype_uint16 yyrline[] = 2427, 2461, 2508, 2526, 2553, 2571, 2575, 2591, 2639, 2656, 2674, 2684, 2694, 2704, 2767, 2778, 2794, 2795, 2800, 2803, 2807, 2836, 2865, 2894, 2928, 2950, 2976, 2998, 3021, 3042, - 3098, 3122, 3147, 3173, 3286, 3305, 3348, 3362, 3368, 3383, - 3411, 3428, 3437, 3451, 3465, 3471, 3477, 3486, 3495, 3504, - 3518, 3580, 3598, 3615, 3630, 3659, 3671, 3695, 3699, 3704, - 3712, 3717, 3723, 3728, 3734, 3742, 3746, 3750, 3755, 3815, - 3831, 3848, 3865, 3887, 3909, 3944, 3952, 3960, 3966, 3973, - 3980, 4000, 4026, 4038, 4050, 4058, 4066, 4075, 4074, 4089, - 4088, 4103, 4102, 4117, 4116, 4130, 4137, 4144, 4151, 4158, - 4165, 4172, 4179, 4186, 4194, 4193, 4207, 4206, 4220, 4219, - 4233, 4232, 4246, 4245, 4259, 4258, 4272, 4271, 4285, 4284, - 4298, 4297, 4314, 4317, 4323, 4335, 4355, 4379, 4383, 4387, - 4391, 4395, 4399, 4405, 4411, 4415, 4419, 4423, 4427, 4446, - 4459, 4460, 4461, 4462, 4463, 4467, 4468, 4469, 4472, 4506, - 4532, 4556, 4559, 4575, 4578, 4595, 4598, 4604, 4607, 4614, - 4617, 4624, 4680, 4750, 4755, 4822, 4858, 4866, 4909, 4948, - 4968, 5000, 5027, 5053, 5079, 5105, 5131, 5153, 5181, 5209, - 5237, 5265, 5293, 5332, 5371, 5392, 5413, 5440, 5444, 5454, - 5489, 5490, 5491, 5495, 5501, 5513, 5531, 5559, 5560, 5561, - 5562, 5563, 5564, 5565, 5566, 5567, 5574, 5575, 5576, 5577, - 5578, 5579, 5580, 5581, 5582, 5583, 5584, 5585, 5586, 5587, - 5588, 5589, 5590, 5591, 5592, 5593, 5594, 5595, 5596, 5597, - 5598, 5599, 5600, 5601, 5602, 5603, 5604, 5605, 5606, 5615, - 5616, 5617, 5618, 5619, 5620, 5621, 5622, 5623, 5624, 5625, - 5630, 5629, 5637, 5642, 5647, 5664, 5682, 5700, 5718, 5736, - 5741, 5747, 5762, 5781, 5801, 5821, 5841, 5864, 5869, 5874, - 5884, 5894, 5899, 5910, 5919, 5924, 5929, 5956, 5960, 5964, - 5968, 5972, 5979, 5983, 5987, 5991, 5998, 6003, 6010, 6015, - 6019, 6024, 6028, 6036, 6047, 6051, 6063, 6071, 6079, 6086, - 6096, 6125, 6129, 6133, 6137, 6141, 6145, 6149, 6153, 6157, - 6186, 6215, 6244, 6273, 6286, 6299, 6312, 6325, 6335, 6345, - 6355, 6367, 6380, 6392, 6396, 6400, 6404, 6408, 6426, 6444, - 6452, 6460, 6489, 6502, 6507, 6511, 6515, 6527, 6531, 6543, - 6560, 6570, 6574, 6589, 6594, 6601, 6605, 6618, 6632, 6646, - 6660, 6674, 6682, 6693, 6697, 6701, 6709, 6715, 6721, 6729, - 6737, 6744, 6752, 6767, 6781, 6795, 6807, 6823, 6832, 6841, - 6851, 6862, 6870, 6878, 6882, 6901, 6908, 6914, 6921, 6929, - 6928, 6941, 6946, 6952, 6961, 6974, 6977, 6981 + 3098, 3122, 3147, 3173, 3286, 3305, 3348, 3369, 3375, 3390, + 3418, 3435, 3444, 3458, 3472, 3478, 3484, 3493, 3502, 3511, + 3525, 3587, 3605, 3622, 3637, 3666, 3678, 3702, 3706, 3711, + 3719, 3724, 3730, 3735, 3741, 3749, 3753, 3757, 3762, 3822, + 3838, 3855, 3872, 3894, 3916, 3951, 3959, 3967, 3973, 3980, + 3987, 4007, 4033, 4045, 4057, 4065, 4073, 4082, 4081, 4096, + 4095, 4110, 4109, 4124, 4123, 4137, 4144, 4151, 4158, 4165, + 4172, 4179, 4186, 4193, 4201, 4200, 4214, 4213, 4227, 4226, + 4240, 4239, 4253, 4252, 4266, 4265, 4279, 4278, 4292, 4291, + 4305, 4304, 4321, 4324, 4330, 4342, 4362, 4386, 4390, 4394, + 4398, 4402, 4406, 4412, 4418, 4422, 4426, 4430, 4434, 4453, + 4466, 4467, 4468, 4469, 4470, 4474, 4475, 4476, 4479, 4513, + 4539, 4563, 4566, 4582, 4585, 4602, 4605, 4611, 4614, 4621, + 4624, 4631, 4687, 4757, 4762, 4829, 4865, 4873, 4916, 4955, + 4975, 5007, 5034, 5060, 5086, 5112, 5138, 5160, 5188, 5216, + 5244, 5272, 5300, 5339, 5378, 5399, 5420, 5447, 5451, 5461, + 5496, 5497, 5498, 5502, 5508, 5520, 5538, 5566, 5567, 5568, + 5569, 5570, 5571, 5572, 5573, 5574, 5581, 5582, 5583, 5584, + 5585, 5586, 5587, 5588, 5589, 5590, 5591, 5592, 5593, 5594, + 5595, 5596, 5597, 5598, 5599, 5600, 5601, 5602, 5603, 5604, + 5605, 5606, 5607, 5608, 5609, 5610, 5611, 5612, 5613, 5622, + 5623, 5624, 5625, 5626, 5627, 5628, 5629, 5630, 5631, 5632, + 5637, 5636, 5644, 5649, 5654, 5671, 5689, 5707, 5725, 5743, + 5748, 5754, 5769, 5788, 5808, 5828, 5848, 5871, 5876, 5881, + 5891, 5901, 5906, 5917, 5926, 5931, 5936, 5963, 5967, 5971, + 5975, 5979, 5986, 5990, 5994, 5998, 6005, 6010, 6017, 6022, + 6026, 6031, 6035, 6043, 6054, 6058, 6070, 6078, 6086, 6093, + 6103, 6132, 6136, 6140, 6144, 6148, 6152, 6156, 6160, 6164, + 6193, 6222, 6251, 6280, 6293, 6306, 6319, 6332, 6342, 6352, + 6362, 6374, 6387, 6399, 6403, 6407, 6411, 6415, 6433, 6451, + 6459, 6467, 6496, 6509, 6514, 6518, 6522, 6534, 6538, 6550, + 6567, 6577, 6581, 6596, 6601, 6608, 6612, 6625, 6639, 6653, + 6667, 6681, 6689, 6700, 6704, 6708, 6716, 6722, 6728, 6736, + 6744, 6751, 6759, 6774, 6788, 6802, 6814, 6830, 6839, 6848, + 6858, 6869, 6877, 6885, 6889, 6908, 6915, 6921, 6928, 6936, + 6935, 6948, 6953, 6959, 6968, 6981, 6984, 6988 }; #endif @@ -9462,13 +9462,20 @@ yyreduce: case 236: #line 3349 "Gmsh.y" { - for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ - Shape TheShape; - List_Read((yyvsp[(3) - (4)].l), i, &TheShape); - if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ - Msg::Error("TODO OCC Delete"); + if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ + std::vector<int> in[4]; + Shape TheShape; + for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ + List_Read((yyvsp[(3) - (4)].l), i, &TheShape); + int dim = TheShape.Type / 100 - 1; + if(dim >= 0 && dim <= 3) in[dim].push_back(TheShape.Num); } - else{ + GModel::current()->getOCCInternals()->remove(in); + } + else{ + for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ + Shape TheShape; + List_Read((yyvsp[(3) - (4)].l), i, &TheShape); DeleteShape(TheShape.Type, TheShape.Num); } } @@ -9477,7 +9484,7 @@ yyreduce: break; case 237: -#line 3363 "Gmsh.y" +#line 3370 "Gmsh.y" { #if defined(HAVE_MESH) GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d)); @@ -9486,7 +9493,7 @@ yyreduce: break; case 238: -#line 3369 "Gmsh.y" +#line 3376 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -9504,7 +9511,7 @@ yyreduce: break; case 239: -#line 3384 "Gmsh.y" +#line 3391 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ ClearProject(); @@ -9535,7 +9542,7 @@ yyreduce: break; case 240: -#line 3412 "Gmsh.y" +#line 3419 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ @@ -9550,7 +9557,7 @@ yyreduce: break; case 241: -#line 3429 "Gmsh.y" +#line 3436 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -9562,7 +9569,7 @@ yyreduce: break; case 242: -#line 3438 "Gmsh.y" +#line 3445 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++){ Shape TheShape; @@ -9574,7 +9581,7 @@ yyreduce: break; case 243: -#line 3452 "Gmsh.y" +#line 3459 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -9586,7 +9593,7 @@ yyreduce: break; case 244: -#line 3466 "Gmsh.y" +#line 3473 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 1, false); @@ -9595,7 +9602,7 @@ yyreduce: break; case 245: -#line 3472 "Gmsh.y" +#line 3479 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 0, false); @@ -9604,7 +9611,7 @@ yyreduce: break; case 246: -#line 3478 "Gmsh.y" +#line 3485 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -9616,7 +9623,7 @@ yyreduce: break; case 247: -#line 3487 "Gmsh.y" +#line 3494 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -9628,7 +9635,7 @@ yyreduce: break; case 248: -#line 3496 "Gmsh.y" +#line 3503 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -9640,7 +9647,7 @@ yyreduce: break; case 249: -#line 3505 "Gmsh.y" +#line 3512 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -9652,7 +9659,7 @@ yyreduce: break; case 250: -#line 3519 "Gmsh.y" +#line 3526 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c)); @@ -9717,7 +9724,7 @@ yyreduce: break; case 251: -#line 3581 "Gmsh.y" +#line 3588 "Gmsh.y" { int n = List_Nbr((yyvsp[(3) - (5)].l)); if(n == 1){ @@ -9738,7 +9745,7 @@ yyreduce: break; case 252: -#line 3599 "Gmsh.y" +#line 3606 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ @@ -9758,7 +9765,7 @@ yyreduce: break; case 253: -#line 3616 "Gmsh.y" +#line 3623 "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")){ @@ -9776,7 +9783,7 @@ yyreduce: break; case 254: -#line 3631 "Gmsh.y" +#line 3638 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -9808,7 +9815,7 @@ yyreduce: break; case 255: -#line 3660 "Gmsh.y" +#line 3667 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -9823,7 +9830,7 @@ yyreduce: break; case 256: -#line 3672 "Gmsh.y" +#line 3679 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) @@ -9850,14 +9857,14 @@ yyreduce: break; case 257: -#line 3696 "Gmsh.y" +#line 3703 "Gmsh.y" { Msg::Exit(0); ;} break; case 258: -#line 3700 "Gmsh.y" +#line 3707 "Gmsh.y" { gmsh_yyerrorstate = 999; // this will be checked when yyparse returns YYABORT; @@ -9865,7 +9872,7 @@ yyreduce: break; case 259: -#line 3705 "Gmsh.y" +#line 3712 "Gmsh.y" { // FIXME: this is a hack to force a transfer from the old DB to // the new DB. This will become unnecessary if/when we fill the @@ -9876,7 +9883,7 @@ yyreduce: break; case 260: -#line 3713 "Gmsh.y" +#line 3720 "Gmsh.y" { new GModel(); GModel::current(GModel::list.size() - 1); @@ -9884,7 +9891,7 @@ yyreduce: break; case 261: -#line 3718 "Gmsh.y" +#line 3725 "Gmsh.y" { CTX::instance()->forcedBBox = 0; GModel::current()->importGEOInternals(); @@ -9893,7 +9900,7 @@ yyreduce: break; case 262: -#line 3724 "Gmsh.y" +#line 3731 "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)); @@ -9901,7 +9908,7 @@ yyreduce: break; case 263: -#line 3729 "Gmsh.y" +#line 3736 "Gmsh.y" { #if defined(HAVE_OPENGL) drawContext::global()->draw(); @@ -9910,7 +9917,7 @@ yyreduce: break; case 264: -#line 3735 "Gmsh.y" +#line 3742 "Gmsh.y" { #if defined(HAVE_OPENGL) CTX::instance()->mesh.changed = ENT_ALL; @@ -9921,21 +9928,21 @@ yyreduce: break; case 265: -#line 3743 "Gmsh.y" +#line 3750 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); ;} break; case 266: -#line 3747 "Gmsh.y" +#line 3754 "Gmsh.y" { GModel::current()->createTopologyFromMesh(1); ;} break; case 267: -#line 3751 "Gmsh.y" +#line 3758 "Gmsh.y" { GModel::current()->importGEOInternals(); GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear); @@ -9943,7 +9950,7 @@ yyreduce: break; case 268: -#line 3757 "Gmsh.y" +#line 3764 "Gmsh.y" { int lock = CTX::instance()->lock; CTX::instance()->lock = 0; @@ -10000,7 +10007,7 @@ yyreduce: break; case 269: -#line 3816 "Gmsh.y" +#line 3823 "Gmsh.y" { #if defined(HAVE_POPPLER) std::vector<int> is; @@ -10015,7 +10022,7 @@ yyreduce: break; case 270: -#line 3832 "Gmsh.y" +#line 3839 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -10035,7 +10042,7 @@ yyreduce: break; case 271: -#line 3849 "Gmsh.y" +#line 3856 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -10055,7 +10062,7 @@ yyreduce: break; case 272: -#line 3866 "Gmsh.y" +#line 3873 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -10080,7 +10087,7 @@ yyreduce: break; case 273: -#line 3888 "Gmsh.y" +#line 3895 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -10105,7 +10112,7 @@ yyreduce: break; case 274: -#line 3910 "Gmsh.y" +#line 3917 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(0, "Invalid For/EndFor loop"); @@ -10143,7 +10150,7 @@ yyreduce: break; case 275: -#line 3945 "Gmsh.y" +#line 3952 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction (std::string((yyvsp[(2) - (2)].c)), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10154,7 +10161,7 @@ yyreduce: break; case 276: -#line 3953 "Gmsh.y" +#line 3960 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction (std::string((yyvsp[(2) - (2)].c)), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10165,7 +10172,7 @@ yyreduce: break; case 277: -#line 3961 "Gmsh.y" +#line 3968 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10174,7 +10181,7 @@ yyreduce: break; case 278: -#line 3967 "Gmsh.y" +#line 3974 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction (std::string((yyvsp[(2) - (3)].c)), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10184,7 +10191,7 @@ yyreduce: break; case 279: -#line 3974 "Gmsh.y" +#line 3981 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction (std::string((yyvsp[(2) - (3)].c)), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -10194,7 +10201,7 @@ yyreduce: break; case 280: -#line 3981 "Gmsh.y" +#line 3988 "Gmsh.y" { ImbricatedTest++; if(ImbricatedTest > MAX_RECUR_TESTS-1){ @@ -10217,7 +10224,7 @@ yyreduce: break; case 281: -#line 4001 "Gmsh.y" +#line 4008 "Gmsh.y" { if(ImbricatedTest > 0){ if (statusImbricatedTests[ImbricatedTest]){ @@ -10246,7 +10253,7 @@ yyreduce: break; case 282: -#line 4027 "Gmsh.y" +#line 4034 "Gmsh.y" { if(ImbricatedTest > 0){ if(statusImbricatedTests[ImbricatedTest]){ @@ -10261,7 +10268,7 @@ yyreduce: break; case 283: -#line 4039 "Gmsh.y" +#line 4046 "Gmsh.y" { ImbricatedTest--; if(ImbricatedTest < 0) @@ -10270,7 +10277,7 @@ yyreduce: break; case 284: -#line 4051 "Gmsh.y" +#line 4058 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), @@ -10281,7 +10288,7 @@ yyreduce: break; case 285: -#line 4059 "Gmsh.y" +#line 4066 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), @@ -10292,7 +10299,7 @@ yyreduce: break; case 286: -#line 4067 "Gmsh.y" +#line 4074 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), @@ -10303,7 +10310,7 @@ yyreduce: break; case 287: -#line 4075 "Gmsh.y" +#line 4082 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10312,7 +10319,7 @@ yyreduce: break; case 288: -#line 4081 "Gmsh.y" +#line 4088 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), @@ -10323,7 +10330,7 @@ yyreduce: break; case 289: -#line 4089 "Gmsh.y" +#line 4096 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10332,7 +10339,7 @@ yyreduce: break; case 290: -#line 4095 "Gmsh.y" +#line 4102 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), @@ -10343,7 +10350,7 @@ yyreduce: break; case 291: -#line 4103 "Gmsh.y" +#line 4110 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10352,7 +10359,7 @@ yyreduce: break; case 292: -#line 4109 "Gmsh.y" +#line 4116 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), @@ -10363,7 +10370,7 @@ yyreduce: break; case 293: -#line 4117 "Gmsh.y" +#line 4124 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10372,7 +10379,7 @@ yyreduce: break; case 294: -#line 4123 "Gmsh.y" +#line 4130 "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., @@ -10382,7 +10389,7 @@ yyreduce: break; case 295: -#line 4131 "Gmsh.y" +#line 4138 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), @@ -10392,7 +10399,7 @@ yyreduce: break; case 296: -#line 4138 "Gmsh.y" +#line 4145 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), @@ -10402,7 +10409,7 @@ yyreduce: break; case 297: -#line 4145 "Gmsh.y" +#line 4152 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), @@ -10412,7 +10419,7 @@ yyreduce: break; case 298: -#line 4152 "Gmsh.y" +#line 4159 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -10422,7 +10429,7 @@ yyreduce: break; case 299: -#line 4159 "Gmsh.y" +#line 4166 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -10432,7 +10439,7 @@ yyreduce: break; case 300: -#line 4166 "Gmsh.y" +#line 4173 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -10442,7 +10449,7 @@ yyreduce: break; case 301: -#line 4173 "Gmsh.y" +#line 4180 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), @@ -10452,7 +10459,7 @@ yyreduce: break; case 302: -#line 4180 "Gmsh.y" +#line 4187 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), @@ -10462,7 +10469,7 @@ yyreduce: break; case 303: -#line 4187 "Gmsh.y" +#line 4194 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), @@ -10472,7 +10479,7 @@ yyreduce: break; case 304: -#line 4194 "Gmsh.y" +#line 4201 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10481,7 +10488,7 @@ yyreduce: break; case 305: -#line 4200 "Gmsh.y" +#line 4207 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -10491,7 +10498,7 @@ yyreduce: break; case 306: -#line 4207 "Gmsh.y" +#line 4214 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10500,7 +10507,7 @@ yyreduce: break; case 307: -#line 4213 "Gmsh.y" +#line 4220 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -10510,7 +10517,7 @@ yyreduce: break; case 308: -#line 4220 "Gmsh.y" +#line 4227 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10519,7 +10526,7 @@ yyreduce: break; case 309: -#line 4226 "Gmsh.y" +#line 4233 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -10529,7 +10536,7 @@ yyreduce: break; case 310: -#line 4233 "Gmsh.y" +#line 4240 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10538,7 +10545,7 @@ yyreduce: break; case 311: -#line 4239 "Gmsh.y" +#line 4246 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), @@ -10548,7 +10555,7 @@ yyreduce: break; case 312: -#line 4246 "Gmsh.y" +#line 4253 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10557,7 +10564,7 @@ yyreduce: break; case 313: -#line 4252 "Gmsh.y" +#line 4259 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), @@ -10567,7 +10574,7 @@ yyreduce: break; case 314: -#line 4259 "Gmsh.y" +#line 4266 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10576,7 +10583,7 @@ yyreduce: break; case 315: -#line 4265 "Gmsh.y" +#line 4272 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), @@ -10586,7 +10593,7 @@ yyreduce: break; case 316: -#line 4272 "Gmsh.y" +#line 4279 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10595,7 +10602,7 @@ yyreduce: break; case 317: -#line 4278 "Gmsh.y" +#line 4285 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), @@ -10605,7 +10612,7 @@ yyreduce: break; case 318: -#line 4285 "Gmsh.y" +#line 4292 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10614,7 +10621,7 @@ yyreduce: break; case 319: -#line 4291 "Gmsh.y" +#line 4298 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), @@ -10624,7 +10631,7 @@ yyreduce: break; case 320: -#line 4298 "Gmsh.y" +#line 4305 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -10633,7 +10640,7 @@ yyreduce: break; case 321: -#line 4304 "Gmsh.y" +#line 4311 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), @@ -10643,19 +10650,19 @@ yyreduce: break; case 322: -#line 4315 "Gmsh.y" +#line 4322 "Gmsh.y" { ;} break; case 323: -#line 4318 "Gmsh.y" +#line 4325 "Gmsh.y" { ;} break; case 324: -#line 4324 "Gmsh.y" +#line 4331 "Gmsh.y" { int n = (int)fabs((yyvsp[(3) - (5)].d)); if(n){ // we accept n==0 to easily disable layers @@ -10670,7 +10677,7 @@ yyreduce: break; case 325: -#line 4336 "Gmsh.y" +#line 4343 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l)); @@ -10693,7 +10700,7 @@ yyreduce: break; case 326: -#line 4356 "Gmsh.y" +#line 4363 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); extr.mesh.ExtrudeMesh = true; @@ -10719,42 +10726,42 @@ yyreduce: break; case 327: -#line 4380 "Gmsh.y" +#line 4387 "Gmsh.y" { extr.mesh.ScaleLast = true; ;} break; case 328: -#line 4384 "Gmsh.y" +#line 4391 "Gmsh.y" { extr.mesh.Recombine = true; ;} break; case 329: -#line 4388 "Gmsh.y" +#line 4395 "Gmsh.y" { extr.mesh.Recombine = (yyvsp[(2) - (3)].d) ? true : false; ;} break; case 330: -#line 4392 "Gmsh.y" +#line 4399 "Gmsh.y" { yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead."); ;} break; case 331: -#line 4396 "Gmsh.y" +#line 4403 "Gmsh.y" { yymsg(0, "Keyword 'QuadTriSngl' deprecated. Use 'QuadTriNoNewVerts' instead."); ;} break; case 332: -#line 4400 "Gmsh.y" +#line 4407 "Gmsh.y" { yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, " "which has no requirement for the number of extrusion layers and meshes " @@ -10763,7 +10770,7 @@ yyreduce: break; case 333: -#line 4406 "Gmsh.y" +#line 4413 "Gmsh.y" { yymsg(0, "Method 'QuadTriDbl' deprecated. Use 'QuadTriAddVerts' instead, " "which has no requirement for the number of extrusion layers and meshes " @@ -10772,35 +10779,35 @@ yyreduce: break; case 334: -#line 4412 "Gmsh.y" +#line 4419 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1; ;} break; case 335: -#line 4416 "Gmsh.y" +#line 4423 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1_RECOMB; ;} break; case 336: -#line 4420 "Gmsh.y" +#line 4427 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_NOVERTS_1; ;} break; case 337: -#line 4424 "Gmsh.y" +#line 4431 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_NOVERTS_1_RECOMB; ;} break; case 338: -#line 4428 "Gmsh.y" +#line 4435 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindSurface(num)){ @@ -10822,7 +10829,7 @@ yyreduce: break; case 339: -#line 4447 "Gmsh.y" +#line 4454 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "Index")) extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d); @@ -10833,47 +10840,47 @@ yyreduce: break; case 340: -#line 4459 "Gmsh.y" +#line 4466 "Gmsh.y" { (yyval.i) = OCC_Internals::Union; ;} break; case 341: -#line 4460 "Gmsh.y" +#line 4467 "Gmsh.y" { (yyval.i) = OCC_Internals::Intersection; ;} break; case 342: -#line 4461 "Gmsh.y" +#line 4468 "Gmsh.y" { (yyval.i) = OCC_Internals::Difference; ;} break; case 343: -#line 4462 "Gmsh.y" +#line 4469 "Gmsh.y" { (yyval.i) = OCC_Internals::Section; ;} break; case 344: -#line 4463 "Gmsh.y" +#line 4470 "Gmsh.y" { (yyval.i) = OCC_Internals::Fragments; ;} break; case 345: -#line 4467 "Gmsh.y" +#line 4474 "Gmsh.y" { (yyval.i) = 0; ;} break; case 346: -#line 4468 "Gmsh.y" +#line 4475 "Gmsh.y" { (yyval.i) = 1; ;} break; case 347: -#line 4469 "Gmsh.y" +#line 4476 "Gmsh.y" { (yyval.i) = (yyvsp[(2) - (3)].d); ;} break; case 348: -#line 4474 "Gmsh.y" +#line 4481 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10909,7 +10916,7 @@ yyreduce: break; case 349: -#line 4507 "Gmsh.y" +#line 4514 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -10935,7 +10942,7 @@ yyreduce: break; case 350: -#line 4534 "Gmsh.y" +#line 4541 "Gmsh.y" { if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ std::vector<int> shape[4], tool[4]; @@ -10957,14 +10964,14 @@ yyreduce: break; case 351: -#line 4556 "Gmsh.y" +#line 4563 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; ;} break; case 352: -#line 4560 "Gmsh.y" +#line 4567 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) (yyval.v)[0] = 1.; @@ -10980,14 +10987,14 @@ yyreduce: break; case 353: -#line 4575 "Gmsh.y" +#line 4582 "Gmsh.y" { (yyval.i) = -1; // left ;} break; case 354: -#line 4579 "Gmsh.y" +#line 4586 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) (yyval.i) = 1; @@ -11004,49 +11011,49 @@ yyreduce: break; case 355: -#line 4595 "Gmsh.y" +#line 4602 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; case 356: -#line 4599 "Gmsh.y" +#line 4606 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; case 357: -#line 4604 "Gmsh.y" +#line 4611 "Gmsh.y" { (yyval.i) = 45; ;} break; case 358: -#line 4608 "Gmsh.y" +#line 4615 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); ;} break; case 359: -#line 4614 "Gmsh.y" +#line 4621 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; case 360: -#line 4618 "Gmsh.y" +#line 4625 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; case 361: -#line 4625 "Gmsh.y" +#line 4632 "Gmsh.y" { int type = (int)(yyvsp[(6) - (7)].v)[0]; double coef = fabs((yyvsp[(6) - (7)].v)[1]); @@ -11105,7 +11112,7 @@ yyreduce: break; case 362: -#line 4681 "Gmsh.y" +#line 4688 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (6)].l)); if(k != 0 && k != 3 && k != 4){ @@ -11178,7 +11185,7 @@ yyreduce: break; case 363: -#line 4751 "Gmsh.y" +#line 4758 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); @@ -11186,7 +11193,7 @@ yyreduce: break; case 364: -#line 4756 "Gmsh.y" +#line 4763 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (5)].l)); if(k != 0 && k != 6 && k != 8){ @@ -11256,7 +11263,7 @@ yyreduce: break; case 365: -#line 4823 "Gmsh.y" +#line 4830 "Gmsh.y" { if(!(yyvsp[(2) - (3)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes); @@ -11295,7 +11302,7 @@ yyreduce: break; case 366: -#line 4859 "Gmsh.y" +#line 4866 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (8)].l)); i++){ double d; @@ -11306,7 +11313,7 @@ yyreduce: break; case 367: -#line 4867 "Gmsh.y" +#line 4874 "Gmsh.y" { if(!(yyvsp[(3) - (5)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); @@ -11352,7 +11359,7 @@ yyreduce: break; case 368: -#line 4910 "Gmsh.y" +#line 4917 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes); @@ -11394,7 +11401,7 @@ yyreduce: break; case 369: -#line 4949 "Gmsh.y" +#line 4956 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -11417,7 +11424,7 @@ yyreduce: break; case 370: -#line 4970 "Gmsh.y" +#line 4977 "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 " @@ -11451,7 +11458,7 @@ yyreduce: break; case 371: -#line 5002 "Gmsh.y" +#line 5009 "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 " @@ -11480,7 +11487,7 @@ yyreduce: break; case 372: -#line 5029 "Gmsh.y" +#line 5036 "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 " @@ -11508,7 +11515,7 @@ yyreduce: break; case 373: -#line 5055 "Gmsh.y" +#line 5062 "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 " @@ -11536,7 +11543,7 @@ yyreduce: break; case 374: -#line 5081 "Gmsh.y" +#line 5088 "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 " @@ -11564,7 +11571,7 @@ yyreduce: break; case 375: -#line 5107 "Gmsh.y" +#line 5114 "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 " @@ -11592,7 +11599,7 @@ yyreduce: break; case 376: -#line 5133 "Gmsh.y" +#line 5140 "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 " @@ -11616,7 +11623,7 @@ yyreduce: break; case 377: -#line 5154 "Gmsh.y" +#line 5161 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -11647,7 +11654,7 @@ yyreduce: break; case 378: -#line 5182 "Gmsh.y" +#line 5189 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -11678,7 +11685,7 @@ yyreduce: break; case 379: -#line 5210 "Gmsh.y" +#line 5217 "Gmsh.y" { Volume *v = FindVolume((int)(yyvsp[(8) - (10)].d)); if(v){ @@ -11709,7 +11716,7 @@ yyreduce: break; case 380: -#line 5238 "Gmsh.y" +#line 5245 "Gmsh.y" { Volume *v = FindVolume((int)(yyvsp[(8) - (10)].d)); if(v){ @@ -11740,7 +11747,7 @@ yyreduce: break; case 381: -#line 5266 "Gmsh.y" +#line 5273 "Gmsh.y" { Volume *v = FindVolume((int)(yyvsp[(8) - (10)].d)); if(v){ @@ -11771,7 +11778,7 @@ yyreduce: break; case 382: -#line 5294 "Gmsh.y" +#line 5301 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); @@ -11813,7 +11820,7 @@ yyreduce: break; case 383: -#line 5333 "Gmsh.y" +#line 5340 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Curves); @@ -11855,7 +11862,7 @@ yyreduce: break; case 384: -#line 5372 "Gmsh.y" +#line 5379 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::viter it = GModel::current()->firstVertex(); @@ -11879,7 +11886,7 @@ yyreduce: break; case 385: -#line 5393 "Gmsh.y" +#line 5400 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::eiter it = GModel::current()->firstEdge(); @@ -11903,7 +11910,7 @@ yyreduce: break; case 386: -#line 5414 "Gmsh.y" +#line 5421 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::fiter it = GModel::current()->firstFace(); @@ -11927,14 +11934,14 @@ yyreduce: break; case 387: -#line 5441 "Gmsh.y" +#line 5448 "Gmsh.y" { ReplaceAllDuplicates(); ;} break; case 388: -#line 5445 "Gmsh.y" +#line 5452 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) ReplaceAllDuplicates(); @@ -11947,7 +11954,7 @@ yyreduce: break; case 389: -#line 5455 "Gmsh.y" +#line 5462 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){ double d; @@ -11980,22 +11987,22 @@ yyreduce: break; case 390: -#line 5489 "Gmsh.y" +#line 5496 "Gmsh.y" { (yyval.c) = (char*)"Homology"; ;} break; case 391: -#line 5490 "Gmsh.y" +#line 5497 "Gmsh.y" { (yyval.c) = (char*)"Cohomology"; ;} break; case 392: -#line 5491 "Gmsh.y" +#line 5498 "Gmsh.y" { (yyval.c) = (char*)"Betti"; ;} break; case 393: -#line 5496 "Gmsh.y" +#line 5503 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < 4; i++) dim.push_back(i); @@ -12004,7 +12011,7 @@ yyreduce: break; case 394: -#line 5502 "Gmsh.y" +#line 5509 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){ @@ -12019,7 +12026,7 @@ yyreduce: break; case 395: -#line 5514 "Gmsh.y" +#line 5521 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){ @@ -12040,7 +12047,7 @@ yyreduce: break; case 396: -#line 5532 "Gmsh.y" +#line 5539 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(6) - (10)].l)); i++){ @@ -12066,47 +12073,47 @@ yyreduce: break; case 397: -#line 5559 "Gmsh.y" +#line 5566 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 398: -#line 5560 "Gmsh.y" +#line 5567 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 399: -#line 5561 "Gmsh.y" +#line 5568 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 400: -#line 5562 "Gmsh.y" +#line 5569 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 401: -#line 5563 "Gmsh.y" +#line 5570 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 402: -#line 5564 "Gmsh.y" +#line 5571 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 403: -#line 5565 "Gmsh.y" +#line 5572 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 404: -#line 5566 "Gmsh.y" +#line 5573 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 405: -#line 5568 "Gmsh.y" +#line 5575 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -12116,232 +12123,232 @@ yyreduce: break; case 406: -#line 5574 "Gmsh.y" +#line 5581 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 407: -#line 5575 "Gmsh.y" +#line 5582 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 408: -#line 5576 "Gmsh.y" +#line 5583 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 409: -#line 5577 "Gmsh.y" +#line 5584 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 410: -#line 5578 "Gmsh.y" +#line 5585 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 411: -#line 5579 "Gmsh.y" +#line 5586 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 412: -#line 5580 "Gmsh.y" +#line 5587 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 413: -#line 5581 "Gmsh.y" +#line 5588 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 414: -#line 5582 "Gmsh.y" +#line 5589 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 415: -#line 5583 "Gmsh.y" +#line 5590 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 416: -#line 5584 "Gmsh.y" +#line 5591 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 417: -#line 5585 "Gmsh.y" +#line 5592 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 418: -#line 5586 "Gmsh.y" +#line 5593 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 419: -#line 5587 "Gmsh.y" +#line 5594 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 420: -#line 5588 "Gmsh.y" +#line 5595 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 421: -#line 5589 "Gmsh.y" +#line 5596 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 422: -#line 5590 "Gmsh.y" +#line 5597 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 423: -#line 5591 "Gmsh.y" +#line 5598 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 424: -#line 5592 "Gmsh.y" +#line 5599 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 425: -#line 5593 "Gmsh.y" +#line 5600 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 426: -#line 5594 "Gmsh.y" +#line 5601 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 427: -#line 5595 "Gmsh.y" +#line 5602 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 428: -#line 5596 "Gmsh.y" +#line 5603 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 429: -#line 5597 "Gmsh.y" +#line 5604 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 430: -#line 5598 "Gmsh.y" +#line 5605 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 431: -#line 5599 "Gmsh.y" +#line 5606 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 432: -#line 5600 "Gmsh.y" +#line 5607 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 433: -#line 5601 "Gmsh.y" +#line 5608 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 434: -#line 5602 "Gmsh.y" +#line 5609 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d) + 0.5); ;} break; case 435: -#line 5603 "Gmsh.y" +#line 5610 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 436: -#line 5604 "Gmsh.y" +#line 5611 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 437: -#line 5605 "Gmsh.y" +#line 5612 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 438: -#line 5606 "Gmsh.y" +#line 5613 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 439: -#line 5615 "Gmsh.y" +#line 5622 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 440: -#line 5616 "Gmsh.y" +#line 5623 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 441: -#line 5617 "Gmsh.y" +#line 5624 "Gmsh.y" { (yyval.d) = (double)ImbricatedTest; ;} break; case 442: -#line 5618 "Gmsh.y" +#line 5625 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; case 443: -#line 5619 "Gmsh.y" +#line 5626 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; case 444: -#line 5620 "Gmsh.y" +#line 5627 "Gmsh.y" { (yyval.d) = GetGmshMajorVersion(); ;} break; case 445: -#line 5621 "Gmsh.y" +#line 5628 "Gmsh.y" { (yyval.d) = GetGmshMinorVersion(); ;} break; case 446: -#line 5622 "Gmsh.y" +#line 5629 "Gmsh.y" { (yyval.d) = GetGmshPatchVersion(); ;} break; case 447: -#line 5623 "Gmsh.y" +#line 5630 "Gmsh.y" { (yyval.d) = Cpu(); ;} break; case 448: -#line 5624 "Gmsh.y" +#line 5631 "Gmsh.y" { (yyval.d) = GetMemoryUsage()/1024./1024.; ;} break; case 449: -#line 5625 "Gmsh.y" +#line 5632 "Gmsh.y" { (yyval.d) = TotalRam(); ;} break; case 450: -#line 5630 "Gmsh.y" +#line 5637 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 451: -#line 5632 "Gmsh.y" +#line 5639 "Gmsh.y" { std::vector<double> val(1, (yyvsp[(3) - (6)].d)); Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions); @@ -12350,7 +12357,7 @@ yyreduce: break; case 452: -#line 5638 "Gmsh.y" +#line 5645 "Gmsh.y" { (yyval.d) = Msg::GetOnelabNumber((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -12358,7 +12365,7 @@ yyreduce: break; case 453: -#line 5643 "Gmsh.y" +#line 5650 "Gmsh.y" { (yyval.d) = Msg::GetOnelabNumber((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -12366,7 +12373,7 @@ yyreduce: break; case 454: -#line 5648 "Gmsh.y" +#line 5655 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c)); @@ -12386,7 +12393,7 @@ yyreduce: break; case 455: -#line 5665 "Gmsh.y" +#line 5672 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -12407,7 +12414,7 @@ yyreduce: break; case 456: -#line 5683 "Gmsh.y" +#line 5690 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -12428,7 +12435,7 @@ yyreduce: break; case 457: -#line 5701 "Gmsh.y" +#line 5708 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -12449,7 +12456,7 @@ yyreduce: break; case 458: -#line 5719 "Gmsh.y" +#line 5726 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -12470,7 +12477,7 @@ yyreduce: break; case 459: -#line 5737 "Gmsh.y" +#line 5744 "Gmsh.y" { (yyval.d) = gmsh_yysymbols.count((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -12478,7 +12485,7 @@ yyreduce: break; case 460: -#line 5742 "Gmsh.y" +#line 5749 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c)); (yyval.d) = !StatFile(tmp); @@ -12487,7 +12494,7 @@ yyreduce: break; case 461: -#line 5748 "Gmsh.y" +#line 5755 "Gmsh.y" { if(gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(2) - (4)].c)]); @@ -12505,7 +12512,7 @@ yyreduce: break; case 462: -#line 5763 "Gmsh.y" +#line 5770 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c)); @@ -12527,7 +12534,7 @@ yyreduce: break; case 463: -#line 5782 "Gmsh.y" +#line 5789 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -12550,7 +12557,7 @@ yyreduce: break; case 464: -#line 5802 "Gmsh.y" +#line 5809 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -12573,7 +12580,7 @@ yyreduce: break; case 465: -#line 5822 "Gmsh.y" +#line 5829 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -12596,7 +12603,7 @@ yyreduce: break; case 466: -#line 5842 "Gmsh.y" +#line 5849 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -12619,7 +12626,7 @@ yyreduce: break; case 467: -#line 5865 "Gmsh.y" +#line 5872 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d)); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c)); @@ -12627,7 +12634,7 @@ yyreduce: break; case 468: -#line 5870 "Gmsh.y" +#line 5877 "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)); @@ -12635,7 +12642,7 @@ yyreduce: break; case 469: -#line 5875 "Gmsh.y" +#line 5882 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){ @@ -12648,7 +12655,7 @@ yyreduce: break; case 470: -#line 5885 "Gmsh.y" +#line 5892 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){ @@ -12661,7 +12668,7 @@ yyreduce: break; case 471: -#line 5895 "Gmsh.y" +#line 5902 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -12669,7 +12676,7 @@ yyreduce: break; case 472: -#line 5900 "Gmsh.y" +#line 5907 "Gmsh.y" { int matches = 0; for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -12683,7 +12690,7 @@ yyreduce: break; case 473: -#line 5911 "Gmsh.y" +#line 5918 "Gmsh.y" { std::string s((yyvsp[(3) - (6)].c)), substr((yyvsp[(5) - (6)].c)); if(s.find(substr) != std::string::npos) @@ -12695,7 +12702,7 @@ yyreduce: break; case 474: -#line 5920 "Gmsh.y" +#line 5927 "Gmsh.y" { (yyval.d) = strlen((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -12703,7 +12710,7 @@ yyreduce: break; case 475: -#line 5925 "Gmsh.y" +#line 5932 "Gmsh.y" { (yyval.d) = strcmp((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); @@ -12711,7 +12718,7 @@ yyreduce: break; case 476: -#line 5930 "Gmsh.y" +#line 5937 "Gmsh.y" { int align = 0, font = 0, fontsize = CTX::instance()->glFontSize; if(List_Nbr((yyvsp[(3) - (4)].l)) % 2){ @@ -12738,70 +12745,70 @@ yyreduce: break; case 477: -#line 5957 "Gmsh.y" +#line 5964 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; case 478: -#line 5961 "Gmsh.y" +#line 5968 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; case 479: -#line 5965 "Gmsh.y" +#line 5972 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; case 480: -#line 5969 "Gmsh.y" +#line 5976 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; case 481: -#line 5973 "Gmsh.y" +#line 5980 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; case 482: -#line 5980 "Gmsh.y" +#line 5987 "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 483: -#line 5984 "Gmsh.y" +#line 5991 "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 484: -#line 5988 "Gmsh.y" +#line 5995 "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 485: -#line 5992 "Gmsh.y" +#line 5999 "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 486: -#line 5999 "Gmsh.y" +#line 6006 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); @@ -12809,14 +12816,14 @@ yyreduce: break; case 487: -#line 6004 "Gmsh.y" +#line 6011 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; case 488: -#line 6011 "Gmsh.y" +#line 6018 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -12824,14 +12831,14 @@ yyreduce: break; case 489: -#line 6016 "Gmsh.y" +#line 6023 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 490: -#line 6020 "Gmsh.y" +#line 6027 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -12839,14 +12846,14 @@ yyreduce: break; case 491: -#line 6025 "Gmsh.y" +#line 6032 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 492: -#line 6029 "Gmsh.y" +#line 6036 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12857,7 +12864,7 @@ yyreduce: break; case 493: -#line 6037 "Gmsh.y" +#line 6044 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12868,14 +12875,14 @@ yyreduce: break; case 494: -#line 6048 "Gmsh.y" +#line 6055 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 495: -#line 6052 "Gmsh.y" +#line 6059 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) (yyval.l) = 0; @@ -12887,7 +12894,7 @@ yyreduce: break; case 496: -#line 6064 "Gmsh.y" +#line 6071 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12898,7 +12905,7 @@ yyreduce: break; case 497: -#line 6072 "Gmsh.y" +#line 6079 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -12909,7 +12916,7 @@ yyreduce: break; case 498: -#line 6080 "Gmsh.y" +#line 6087 "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)); @@ -12919,7 +12926,7 @@ yyreduce: break; case 499: -#line 6087 "Gmsh.y" +#line 6094 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d)){ //|| ($1 < $3 && $5 < 0) || ($1 > $3 && $5 > 0) @@ -12932,7 +12939,7 @@ yyreduce: break; case 500: -#line 6097 "Gmsh.y" +#line 6104 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. // This allows to ensure e.g. that relative point positions are @@ -12964,63 +12971,63 @@ yyreduce: break; case 501: -#line 6126 "Gmsh.y" +#line 6133 "Gmsh.y" { (yyval.l) = GetAllElementaryEntityNumbers(0); ;} break; case 502: -#line 6130 "Gmsh.y" +#line 6137 "Gmsh.y" { (yyval.l) = GetAllElementaryEntityNumbers(1); ;} break; case 503: -#line 6134 "Gmsh.y" +#line 6141 "Gmsh.y" { (yyval.l) = GetAllElementaryEntityNumbers(2); ;} break; case 504: -#line 6138 "Gmsh.y" +#line 6145 "Gmsh.y" { (yyval.l) = GetAllElementaryEntityNumbers(3); ;} break; case 505: -#line 6142 "Gmsh.y" +#line 6149 "Gmsh.y" { (yyval.l) = GetAllPhysicalEntityNumbers(0); ;} break; case 506: -#line 6146 "Gmsh.y" +#line 6153 "Gmsh.y" { (yyval.l) = GetAllPhysicalEntityNumbers(1); ;} break; case 507: -#line 6150 "Gmsh.y" +#line 6157 "Gmsh.y" { (yyval.l) = GetAllPhysicalEntityNumbers(2); ;} break; case 508: -#line 6154 "Gmsh.y" +#line 6161 "Gmsh.y" { (yyval.l) = GetAllPhysicalEntityNumbers(3); ;} break; case 509: -#line 6158 "Gmsh.y" +#line 6165 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -13052,7 +13059,7 @@ yyreduce: break; case 510: -#line 6187 "Gmsh.y" +#line 6194 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -13084,7 +13091,7 @@ yyreduce: break; case 511: -#line 6216 "Gmsh.y" +#line 6223 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -13116,7 +13123,7 @@ yyreduce: break; case 512: -#line 6245 "Gmsh.y" +#line 6252 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -13148,7 +13155,7 @@ yyreduce: break; case 513: -#line 6275 "Gmsh.y" +#line 6282 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); GModel::current()->importGEOInternals(); @@ -13163,7 +13170,7 @@ yyreduce: break; case 514: -#line 6288 "Gmsh.y" +#line 6295 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); GModel::current()->importGEOInternals(); @@ -13178,7 +13185,7 @@ yyreduce: break; case 515: -#line 6301 "Gmsh.y" +#line 6308 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); GModel::current()->importGEOInternals(); @@ -13193,7 +13200,7 @@ yyreduce: break; case 516: -#line 6314 "Gmsh.y" +#line 6321 "Gmsh.y" { (yyval.l) = List_Create(10, 1, sizeof(double)); GModel::current()->importGEOInternals(); @@ -13208,7 +13215,7 @@ yyreduce: break; case 517: -#line 6326 "Gmsh.y" +#line 6333 "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++){ @@ -13221,7 +13228,7 @@ yyreduce: break; case 518: -#line 6336 "Gmsh.y" +#line 6343 "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++){ @@ -13234,7 +13241,7 @@ yyreduce: break; case 519: -#line 6346 "Gmsh.y" +#line 6353 "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++){ @@ -13247,7 +13254,7 @@ yyreduce: break; case 520: -#line 6356 "Gmsh.y" +#line 6363 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -13262,7 +13269,7 @@ yyreduce: break; case 521: -#line 6368 "Gmsh.y" +#line 6375 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -13277,7 +13284,7 @@ yyreduce: break; case 522: -#line 6381 "Gmsh.y" +#line 6388 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c))) @@ -13292,35 +13299,35 @@ yyreduce: break; case 523: -#line 6393 "Gmsh.y" +#line 6400 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); ;} break; case 524: -#line 6397 "Gmsh.y" +#line 6404 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); ;} break; case 525: -#line 6401 "Gmsh.y" +#line 6408 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (6)].l); ;} break; case 526: -#line 6405 "Gmsh.y" +#line 6412 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (6)].l); ;} break; case 527: -#line 6409 "Gmsh.y" +#line 6416 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -13341,7 +13348,7 @@ yyreduce: break; case 528: -#line 6427 "Gmsh.y" +#line 6434 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -13362,7 +13369,7 @@ yyreduce: break; case 529: -#line 6445 "Gmsh.y" +#line 6452 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(double)); for(int i = 0; i < (int)(yyvsp[(7) - (8)].d); i++) { @@ -13373,7 +13380,7 @@ yyreduce: break; case 530: -#line 6453 "Gmsh.y" +#line 6460 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(double)); for(int i = 0; i < (int)(yyvsp[(7) - (8)].d); i++) { @@ -13384,7 +13391,7 @@ yyreduce: break; case 531: -#line 6461 "Gmsh.y" +#line 6468 "Gmsh.y" { Msg::Barrier(); FILE *File; @@ -13416,7 +13423,7 @@ yyreduce: break; case 532: -#line 6490 "Gmsh.y" +#line 6497 "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); @@ -13429,7 +13436,7 @@ yyreduce: break; case 533: -#line 6503 "Gmsh.y" +#line 6510 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -13437,21 +13444,21 @@ yyreduce: break; case 534: -#line 6508 "Gmsh.y" +#line 6515 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 535: -#line 6512 "Gmsh.y" +#line 6519 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; case 536: -#line 6516 "Gmsh.y" +#line 6523 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -13463,21 +13470,21 @@ yyreduce: break; case 537: -#line 6528 "Gmsh.y" +#line 6535 "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 538: -#line 6532 "Gmsh.y" +#line 6539 "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 539: -#line 6544 "Gmsh.y" +#line 6551 "Gmsh.y" { int flag = 0; if(gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ @@ -13497,7 +13504,7 @@ yyreduce: break; case 540: -#line 6561 "Gmsh.y" +#line 6568 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); @@ -13507,14 +13514,14 @@ yyreduce: break; case 541: -#line 6571 "Gmsh.y" +#line 6578 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 542: -#line 6575 "Gmsh.y" +#line 6582 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d)); @@ -13529,7 +13536,7 @@ yyreduce: break; case 543: -#line 6590 "Gmsh.y" +#line 6597 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); @@ -13537,21 +13544,21 @@ yyreduce: break; case 544: -#line 6595 "Gmsh.y" +#line 6602 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; case 545: -#line 6602 "Gmsh.y" +#line 6609 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 546: -#line 6606 "Gmsh.y" +#line 6613 "Gmsh.y" { std::string val; if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))) @@ -13567,7 +13574,7 @@ yyreduce: break; case 547: -#line 6619 "Gmsh.y" +#line 6626 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -13584,7 +13591,7 @@ yyreduce: break; case 548: -#line 6633 "Gmsh.y" +#line 6640 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -13601,7 +13608,7 @@ yyreduce: break; case 549: -#line 6647 "Gmsh.y" +#line 6654 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -13618,7 +13625,7 @@ yyreduce: break; case 550: -#line 6661 "Gmsh.y" +#line 6668 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -13635,7 +13642,7 @@ yyreduce: break; case 551: -#line 6675 "Gmsh.y" +#line 6682 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out); @@ -13646,7 +13653,7 @@ yyreduce: break; case 552: -#line 6683 "Gmsh.y" +#line 6690 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out); @@ -13657,21 +13664,21 @@ yyreduce: break; case 553: -#line 6694 "Gmsh.y" +#line 6701 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 554: -#line 6698 "Gmsh.y" +#line 6705 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 555: -#line 6702 "Gmsh.y" +#line 6709 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); time_t now; @@ -13682,7 +13689,7 @@ yyreduce: break; case 556: -#line 6710 "Gmsh.y" +#line 6717 "Gmsh.y" { std::string exe = Msg::GetExecutableName(); (yyval.c) = (char *)Malloc(exe.size() + 1); @@ -13691,7 +13698,7 @@ yyreduce: break; case 557: -#line 6716 "Gmsh.y" +#line 6723 "Gmsh.y" { std::string action = Msg::GetOnelabAction(); (yyval.c) = (char *)Malloc(action.size() + 1); @@ -13700,7 +13707,7 @@ yyreduce: break; case 558: -#line 6722 "Gmsh.y" +#line 6729 "Gmsh.y" { const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); if(!env) env = ""; @@ -13711,7 +13718,7 @@ yyreduce: break; case 559: -#line 6730 "Gmsh.y" +#line 6737 "Gmsh.y" { std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -13722,7 +13729,7 @@ yyreduce: break; case 560: -#line 6738 "Gmsh.y" +#line 6745 "Gmsh.y" { std::string s = Msg::GetOnelabString((yyvsp[(3) - (4)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -13732,7 +13739,7 @@ yyreduce: break; case 561: -#line 6745 "Gmsh.y" +#line 6752 "Gmsh.y" { std::string s = Msg::GetOnelabString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -13743,7 +13750,7 @@ yyreduce: break; case 562: -#line 6753 "Gmsh.y" +#line 6760 "Gmsh.y" { int size = 1; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++) @@ -13761,7 +13768,7 @@ yyreduce: break; case 563: -#line 6768 "Gmsh.y" +#line 6775 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -13778,7 +13785,7 @@ yyreduce: break; case 564: -#line 6782 "Gmsh.y" +#line 6789 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -13795,7 +13802,7 @@ yyreduce: break; case 565: -#line 6796 "Gmsh.y" +#line 6803 "Gmsh.y" { std::string input = (yyvsp[(3) - (8)].c); std::string substr_old = (yyvsp[(5) - (8)].c); @@ -13810,7 +13817,7 @@ yyreduce: break; case 566: -#line 6808 "Gmsh.y" +#line 6815 "Gmsh.y" { int size = 1; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++) @@ -13829,7 +13836,7 @@ yyreduce: break; case 567: -#line 6824 "Gmsh.y" +#line 6831 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -13841,7 +13848,7 @@ yyreduce: break; case 568: -#line 6833 "Gmsh.y" +#line 6840 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -13853,7 +13860,7 @@ yyreduce: break; case 569: -#line 6842 "Gmsh.y" +#line 6849 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -13866,7 +13873,7 @@ yyreduce: break; case 570: -#line 6852 "Gmsh.y" +#line 6859 "Gmsh.y" { if((yyvsp[(3) - (8)].d)){ (yyval.c) = (yyvsp[(5) - (8)].c); @@ -13880,7 +13887,7 @@ yyreduce: break; case 571: -#line 6863 "Gmsh.y" +#line 6870 "Gmsh.y" { std::string in = (yyvsp[(3) - (8)].c); std::string out = in.substr((int)(yyvsp[(5) - (8)].d), (int)(yyvsp[(7) - (8)].d)); @@ -13891,7 +13898,7 @@ yyreduce: break; case 572: -#line 6871 "Gmsh.y" +#line 6878 "Gmsh.y" { std::string in = (yyvsp[(3) - (6)].c); std::string out = in.substr((int)(yyvsp[(5) - (6)].d), std::string::npos); @@ -13902,14 +13909,14 @@ yyreduce: break; case 573: -#line 6879 "Gmsh.y" +#line 6886 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 574: -#line 6883 "Gmsh.y" +#line 6890 "Gmsh.y" { char tmpstring[5000]; int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -13931,7 +13938,7 @@ yyreduce: break; case 575: -#line 6902 "Gmsh.y" +#line 6909 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c)); (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13941,7 +13948,7 @@ yyreduce: break; case 576: -#line 6909 "Gmsh.y" +#line 6916 "Gmsh.y" { std::string tmp = SplitFileName(GetAbsolutePath(gmsh_yyname))[0]; (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13950,7 +13957,7 @@ yyreduce: break; case 577: -#line 6915 "Gmsh.y" +#line 6922 "Gmsh.y" { std::string tmp = SplitFileName((yyvsp[(3) - (4)].c))[0]; (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13960,7 +13967,7 @@ yyreduce: break; case 578: -#line 6922 "Gmsh.y" +#line 6929 "Gmsh.y" { std::string tmp = GetAbsolutePath((yyvsp[(3) - (4)].c)); (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -13970,12 +13977,12 @@ yyreduce: break; case 579: -#line 6929 "Gmsh.y" +#line 6936 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 580: -#line 6931 "Gmsh.y" +#line 6938 "Gmsh.y" { std::string val((yyvsp[(3) - (6)].c)); Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions); @@ -13986,7 +13993,7 @@ yyreduce: break; case 581: -#line 6942 "Gmsh.y" +#line 6949 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(char*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].c))); @@ -13994,12 +14001,12 @@ yyreduce: break; case 582: -#line 6947 "Gmsh.y" +#line 6954 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;} break; case 583: -#line 6953 "Gmsh.y" +#line 6960 "Gmsh.y" { char tmpstr[256]; sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d)); @@ -14010,7 +14017,7 @@ yyreduce: break; case 584: -#line 6962 "Gmsh.y" +#line 6969 "Gmsh.y" { char tmpstr[256]; sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d)); @@ -14021,23 +14028,23 @@ yyreduce: break; case 585: -#line 6975 "Gmsh.y" +#line 6982 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 586: -#line 6978 "Gmsh.y" +#line 6985 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 587: -#line 6982 "Gmsh.y" +#line 6989 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; /* Line 1267 of yacc.c. */ -#line 14041 "Gmsh.tab.cpp" +#line 14048 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -14251,7 +14258,7 @@ yyreturn: } -#line 6985 "Gmsh.y" +#line 6992 "Gmsh.y" void assignVariable(const std::string &name, int index, int assignType, diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 3fa146c9b19a1c3f05edc692782bf04eb6e42dc1..7268ca03642a1ef1151ee2d3910166e3e97b432d 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -3347,13 +3347,20 @@ LevelSet : Delete : tDelete '{' ListOfShapes '}' { - for(int i = 0; i < List_Nbr($3); i++){ - Shape TheShape; - List_Read($3, i, &TheShape); - if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ - Msg::Error("TODO OCC Delete"); + if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ + std::vector<int> in[4]; + Shape TheShape; + for(int i = 0; i < List_Nbr($3); i++){ + List_Read($3, i, &TheShape); + int dim = TheShape.Type / 100 - 1; + if(dim >= 0 && dim <= 3) in[dim].push_back(TheShape.Num); } - else{ + GModel::current()->getOCCInternals()->remove(in); + } + else{ + for(int i = 0; i < List_Nbr($3); i++){ + Shape TheShape; + List_Read($3, i, &TheShape); DeleteShape(TheShape.Type, TheShape.Num); } } diff --git a/benchmarks/boolean/simple4.geo b/benchmarks/boolean/simple4.geo index 89cff3ef7a0e99de9b90c73d4e87b52a808c6f59..c7d4c732795ec79ca967fa6c8eb13b46dde91c0a 100644 --- a/benchmarks/boolean/simple4.geo +++ b/benchmarks/boolean/simple4.geo @@ -9,14 +9,14 @@ Point(2) = {1,0,0}; Point(3) = {1,1,0}; Point(4) = {0,1,0}; Point(5) = {0.5,0.5,1}; -Line(1) = {1,2}; -Line(2) = {2,3}; -Line(3) = {3,4}; -Line(4) = {4,1}; -Line(5) = {1,5}; -Line(6) = {2,5}; -Line(7) = {3,5}; -Line(8) = {4,5}; +Line(1) = {2,1}; // FIXME set {1,2} and the orientation will be screwed +Line(2) = {3,2}; +Line(3) = {4,3}; +Line(4) = {1,4}; +Line(5) = {5,1}; +Line(6) = {5,2}; +Line(7) = {5,3}; +Line(8) = {5,4}; Line Loop(1) = {1,2,3,4}; Line Loop(2) = {1,5,6}; Line Loop(3) = {2,6,7}; @@ -33,5 +33,5 @@ Volume(1) = {1}; Cylinder(2) = {0.5,0.5,-0.5, 0.5,0.5,1.5, 0.2}; BooleanFragments{ Volume{1}; Delete; }{ Volume{2}; Delete; } -// FIXME: need to delete surfaces 1:4, as they were bound to tags before the -// boolean operation +// delete this, as they were bound to tags before the boolean operation +Delete{ Surface{1:5}; Line{1:8}; Point{1:5}; }