x1=0;
y1=0;
z1=0;
x2=2;
y2=1;
z2=5;
Point(1) = {x1,y1,z1,0.1};
Point(2) = {x2,y2,z2,0.1};
Line(1) = {1,2};
B=0.3;
H=0.5;
//con questa convenzione la nel sistema locale: z asse trave, x altezza (H), y base (B)
Point(3) = {x1+H/2,y1+B/2,z1,0.1};
Point(4) = {x1-H/2,y1+B/2,z1,0.1};
Point(5) = {x1-H/2,y1-B/2,z1,0.1};
Point(6) = {x1+H/2,y1-B/2,z1,0.1};
Line(2) = {3,4};
Line(3) = {4,5};
Line(4) = {5,6};
Line(5) = {6,3};
Line Loop(6) = {2,3,4,5};
Plane Surface(7) = {6};
Rotate {{0,1,0}, {x1,y1,z1}, -Atan2(x2-x1,Sqrt((y2-y1)^2+(z2-z1)^2))} {
  Surface{7};
}
Rotate {{1,0,0}, {x1,y1,z1}, -Atan2(y1-y2,z1-z2)} {
  Surface{7};
}
Extrude {x2-x1,y2-y1,z2-z1} {
  Surface{7};
}
Geometry.Lines=1;
Geometry.LineType=0;
Geometry.LineNumbers=0;
Geometry.Points=0;
Geometry.PointNumbers=0;
Geometry.Surfaces=1;
Geometry.SurfaceNumbers=0;
Geometry.SurfaceType=2;
Transfinite Line {9,10,12,11,15,14,2,1,3,19,4,5,23} = 2 Using Progression 1;

