Short overview of basic commands in gmsh. The official manual you can find here
// <IDENTIFIER> = newp;
P1 = newp;
// Point(<POINT_ID>) = {<X>, <Y>, <Z>};
Point(P1) = {1.0, 0.0, 0.0};
// <IDENTIFIER>[] = Point{<POINT_ID>};
coordinates[] = Point{P1};
// <IDENTIFIER> = newl;
L1 = newl;
// Line(<LINE_ID>) = {<POINT_1_ID>, <POINT_2_ID>};
Line(L1) = {P1, P2};
// <IDENTIFIER> = newll;
LL1 = newll;
Creating a line loop demands that the are continous and direction can not be neglected.
// Curve Loop(<LINE_LOOP_ID>) = {<LINE_1_ID>, ..., <LINE_N_ID>};
Curve Loop(LL1) = {L1, L2, L3};
// <IDENTIFIER>[] = PointsOf{Line{<LINE_1_ID>, ..., <LINE_N-1_ID>}; Line{<LINE_N_ID>}; };
line_points[] = PointsOf{
Line{
L1,
L2
};
Line{L3};
};
// <IDENTIFIER> = news;
S1 = news;
// Surfaces(<SURFACE_ID> = {<LINE_LOOP_ID>})
Surface(S1) = {LL1};
// <IDENTIFIER>[] = PointsOf{Surface{<SURFACE_1_ID>, ..., <SURFACE_N-1_ID>}; Surface{<SURFACE_N_ID>}; };
surface_points[] = PointsOf{
Surface{
S1,
S2
};
};
// <IDENTIFIER> = newv;
V1 = newv;
// Volume(<VOLUME_ID>) = {<SURFACE_LOOP_ID>};
Volume(V1) = {SL1};
// Printf("<TEXT>");
Printf("Hello Wourld!");
// Printf("<FORMATTING_CHARACTER>", <>);
Printf("%g", V1);
// <IDENTIFIER>[] = {<ITEM_1>, ..., <ITEM_N>};
list[] = {4, 6, 8, 10, 12, 14};
// <IDENTIFIER>[<ITEM_ID>];
list_item = list[0];
// <IDENTIFIER>[{<ITEM_1>:<ITEM_N>:<SEQUENCE_STEP>}];
list1[] = list[{0:5}]; // 4, 6, 8, 10, 12, 14
list2[] = list[{0:5:2}]; // 4, 8, 12
// <IDENTIFIER>[];
list3[] = list[];
// #<LIST>[];
size_list = #list[];
// Transfinite Curve {<CURVE_1_ID>, ... <CURVE_N_ID>} = <NUMBER_OF_NODES> Using Progression <PROGRESSION_FACTOR> []
Transfinite Curve {L1, L2, L3, L4, L5, L6} = 10 Using Progression 1;
// Transfinite Surface {<SURFACE_ID>} = [{<POINT_1_ID>, <POINT_2_ID>, <POINT_3_ID> [, <POINT_4_ID>]}]
Transfinite Surface {S1} = {P1, P2, P3};