# [Gmsh] rotation of cube formed from extruded plane surface fails when meshed.

kilgore trout convectedacoustics at gmail.com
Tue Oct 24 22:01:56 CEST 2017

```Hi everyone.

If I specify four points, create lines to make a square, define a plane
surface then extrude that surface to form a cube, then rotate that
cube.....  meshing fails.  Can someone please tell me how to rotate my cube
and mesh it okay please? :)

Best regards,

Mark.

Point(1) = {2.6, -0.2, 0, 1.0};
Point(2) = {2.6, 0.3, 0, 1.0};
Point(3) = {3.1, 0.3, 0, 1.0};
Point(4) = {3.1, -0.2, 0, 1.0};
Line(1) = {2, 3};
Line(2) = {3, 4};
Line(3) = {4, 1};
Line(4) = {1, 2};
Line Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};

Extrude {0, 0, 1} {
Surface{1}; Layers{5}; Recombine;
}

// Okay to here.  Mesh is valid.  Cube mesh generated.

Rotate {{0, 1, 0}, {0, 0, 0}, Pi/4} {
Point{6}; Point{10}; Point{5}; Point{14}; Point{3}; Point{4}; Point{2};
Point{1}; Line{7}; Line{6}; Line{9}; Line{8}; Line{12}; Line{2}; Line{16};
Line{1}; Line{11}; Line{20}; Line{3}; Line{4};
}

// Add this line and the mesh fails.  How can I rotate my cube?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20171024/e45e2914/attachment-0001.html>
```