commit c75ab933253e2fd7c58daad81ce0a07b94c08119
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Aug 18 01:36:15 2021 +0200

    COnvert the last object, the Rex cube, to the new cubit creation scheme. Provide the new Rex mesh.

diff --git a/src/main/java/org/distorted/objects/TwistyRex.java b/src/main/java/org/distorted/objects/TwistyRex.java
index a363934f..9326b720 100644
--- a/src/main/java/org/distorted/objects/TwistyRex.java
+++ b/src/main/java/org/distorted/objects/TwistyRex.java
@@ -24,17 +24,10 @@ import android.content.res.Resources;
 import org.distorted.helpers.FactoryCubit;
 import org.distorted.helpers.ObjectSticker;
 import org.distorted.library.effect.MatrixEffectQuaternion;
-import org.distorted.library.effect.VertexEffect;
-import org.distorted.library.effect.VertexEffectMove;
-import org.distorted.library.effect.VertexEffectRotate;
-import org.distorted.library.effect.VertexEffectScale;
 import org.distorted.library.main.DistortedEffects;
 import org.distorted.library.main.DistortedTexture;
 import org.distorted.library.mesh.MeshBase;
-import org.distorted.library.mesh.MeshJoined;
-import org.distorted.library.mesh.MeshPolygon;
 import org.distorted.library.mesh.MeshSquare;
-import org.distorted.library.type.Static1D;
 import org.distorted.library.type.Static3D;
 import org.distorted.library.type.Static4D;
 import org.distorted.main.R;
@@ -135,30 +128,31 @@ public class TwistyRex extends TwistyObject
 
   private static MeshBase mCornerMesh, mFaceMesh, mEdgeMesh;
 
-  private static final int NUM_STICKERS = 3;
   private static final ObjectSticker[] mStickers;
 
+  private static final float[][] STICKERS = new float[][]
+          {
+             { -0.5f, 0.1428f, -0.1428f, 0.5f, 0.32f, -0.32f },
+             { -0.5f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.0f, 0.5f },
+             { -0.5f, 0.1f, 0.5f, 0.1f, 0.0f, -0.2f  }
+          };
+  private static final int NUM_STICKERS = STICKERS.length;
+
   static
     {
     mStickers = new ObjectSticker[NUM_STICKERS];
 
-    final float A = REX_D*SQ2;
-    final float B = (1-REX_D)*SQ2/2;
-    final float C = 1.0f;
-    final float D = 0.5f-REX_D;
-    final float E = (float)(Math.PI/15);
     final float F = (float)(Math.PI/20);
     final float R1= 0.02f;
-    final float R2= 0.04f;
+    final float R2= 0.09f;
     final float R3= 0.06f;
-    final float[][] coords = { {A/2,-B/3,-A/2,-B/3,0,2*B/3},{-REX_D,0,0,-REX_D,+REX_D,0,0,+REX_D},{-C/2,D/3,C/2,D/3,0,-2*D/3} };
-    final float[][] angles = { { -E/2,E,E },null,{ F/10,-F,-F } };
+    final float[][] angles = { { -F/2,F,F },null,{ F/10,-F,-F } };
     final float[][] radii  = { {R1,R1,R1},{R2,R2,R2,R2},{0,0,R3} };
-    final float[] strokes = { 0.05f, 0.035f, 0.045f };
+    final float[] strokes = { 0.06f, 0.07f, 0.04f };
 
     for(int s=0; s<NUM_STICKERS; s++)
       {
-      mStickers[s] = new ObjectSticker(coords[s],angles[s],radii[s],strokes[s]);
+      mStickers[s] = new ObjectSticker(STICKERS[s],angles[s],radii[s],strokes[s]);
       }
     }
 
@@ -209,7 +203,8 @@ public class TwistyRex extends TwistyObject
 
   float[][] getCuts(int numLayers)
     {
-    float[] cut = new float[] {-SQ3*0.15f,+SQ3*0.15f}; // bit less than 1/6 of the length of the main diagonal
+    float C = SQ3*0.15f; // bit less than 1/6 of the length of the main diagonal
+    float[] cut = new float[] {-C,+C};
     return new float[][] { cut,cut,cut,cut };
     }
 
@@ -224,55 +219,56 @@ public class TwistyRex extends TwistyObject
 
   float[][] getCubitPositions(int numLayers)
     {
-    final float DIST = 0.50f;
+    final float DIST1= 0.50f;
     final float DIST2= (1+2*REX_D)/6;
-
-    final float[][] CENTERS = new float[42][];
-
-    CENTERS[ 0] = new float[] { +DIST , +DIST2, +DIST2};
-    CENTERS[ 1] = new float[] { +DIST , +DIST2, -DIST2};
-    CENTERS[ 2] = new float[] { +DIST , -DIST2, -DIST2};
-    CENTERS[ 3] = new float[] { +DIST , -DIST2, +DIST2};
-    CENTERS[ 4] = new float[] { -DIST , +DIST2, +DIST2};
-    CENTERS[ 5] = new float[] { -DIST , +DIST2, -DIST2};
-    CENTERS[ 6] = new float[] { -DIST , -DIST2, -DIST2};
-    CENTERS[ 7] = new float[] { -DIST , -DIST2, +DIST2};
-    CENTERS[ 8] = new float[] { +DIST2, +DIST , +DIST2};
-    CENTERS[ 9] = new float[] { +DIST2, +DIST , -DIST2};
-    CENTERS[10] = new float[] { -DIST2, +DIST , -DIST2};
-    CENTERS[11] = new float[] { -DIST2, +DIST , +DIST2};
-    CENTERS[12] = new float[] { +DIST2, -DIST , +DIST2};
-    CENTERS[13] = new float[] { +DIST2, -DIST , -DIST2};
-    CENTERS[14] = new float[] { -DIST2, -DIST , -DIST2};
-    CENTERS[15] = new float[] { -DIST2, -DIST , +DIST2};
-    CENTERS[16] = new float[] { +DIST2, +DIST2, +DIST };
-    CENTERS[17] = new float[] { +DIST2, -DIST2, +DIST };
-    CENTERS[18] = new float[] { -DIST2, -DIST2, +DIST };
-    CENTERS[19] = new float[] { -DIST2, +DIST2, +DIST };
-    CENTERS[20] = new float[] { +DIST2, +DIST2, -DIST };
-    CENTERS[21] = new float[] { +DIST2, -DIST2, -DIST };
-    CENTERS[22] = new float[] { -DIST2, -DIST2, -DIST };
-    CENTERS[23] = new float[] { -DIST2, +DIST2, -DIST };
-
-    CENTERS[24] = new float[] { +DIST , +0.00f, +0.00f};
-    CENTERS[25] = new float[] { -DIST , +0.00f, +0.00f};
-    CENTERS[26] = new float[] { +0.00f, +DIST , +0.00f};
-    CENTERS[27] = new float[] { +0.00f, -DIST , +0.00f};
-    CENTERS[28] = new float[] { +0.00f, +0.00f, +DIST };
-    CENTERS[29] = new float[] { +0.00f, +0.00f, -DIST };
-
-    CENTERS[30] = new float[] { +0.00f, +DIST , +DIST };
-    CENTERS[31] = new float[] { +DIST , +0.00f, +DIST };
-    CENTERS[32] = new float[] { +0.00f, -DIST , +DIST };
-    CENTERS[33] = new float[] { -DIST , +0.00f, +DIST };
-    CENTERS[34] = new float[] { +DIST , +DIST , +0.00f};
-    CENTERS[35] = new float[] { +DIST , -DIST , +0.00f};
-    CENTERS[36] = new float[] { -DIST , -DIST , +0.00f};
-    CENTERS[37] = new float[] { -DIST , +DIST , +0.00f};
-    CENTERS[38] = new float[] { +0.00f, +DIST , -DIST };
-    CENTERS[39] = new float[] { +DIST , +0.00f, -DIST };
-    CENTERS[40] = new float[] { +0.00f, -DIST , -DIST };
-    CENTERS[41] = new float[] { -DIST , +0.00f, -DIST };
+    final float DIST3= 0.51f;
+
+    final float[][] CENTERS = new float[24+6+12][];
+
+    CENTERS[ 0] = new float[] { +DIST3, +DIST2, +DIST2};
+    CENTERS[ 1] = new float[] { +DIST3, +DIST2, -DIST2};
+    CENTERS[ 2] = new float[] { +DIST3, -DIST2, -DIST2};
+    CENTERS[ 3] = new float[] { +DIST3, -DIST2, +DIST2};
+    CENTERS[ 4] = new float[] { -DIST3, +DIST2, +DIST2};
+    CENTERS[ 5] = new float[] { -DIST3, +DIST2, -DIST2};
+    CENTERS[ 6] = new float[] { -DIST3, -DIST2, -DIST2};
+    CENTERS[ 7] = new float[] { -DIST3, -DIST2, +DIST2};
+    CENTERS[ 8] = new float[] { +DIST2, +DIST3, +DIST2};
+    CENTERS[ 9] = new float[] { +DIST2, +DIST3, -DIST2};
+    CENTERS[10] = new float[] { -DIST2, +DIST3, -DIST2};
+    CENTERS[11] = new float[] { -DIST2, +DIST3, +DIST2};
+    CENTERS[12] = new float[] { +DIST2, -DIST3, +DIST2};
+    CENTERS[13] = new float[] { +DIST2, -DIST3, -DIST2};
+    CENTERS[14] = new float[] { -DIST2, -DIST3, -DIST2};
+    CENTERS[15] = new float[] { -DIST2, -DIST3, +DIST2};
+    CENTERS[16] = new float[] { +DIST2, +DIST2, +DIST3};
+    CENTERS[17] = new float[] { +DIST2, -DIST2, +DIST3};
+    CENTERS[18] = new float[] { -DIST2, -DIST2, +DIST3};
+    CENTERS[19] = new float[] { -DIST2, +DIST2, +DIST3};
+    CENTERS[20] = new float[] { +DIST2, +DIST2, -DIST3};
+    CENTERS[21] = new float[] { +DIST2, -DIST2, -DIST3};
+    CENTERS[22] = new float[] { -DIST2, -DIST2, -DIST3};
+    CENTERS[23] = new float[] { -DIST2, +DIST2, -DIST3};
+
+    CENTERS[24] = new float[] { +DIST3, +0.00f, +0.00f};
+    CENTERS[25] = new float[] { -DIST3, +0.00f, +0.00f};
+    CENTERS[26] = new float[] { +0.00f, +DIST3, +0.00f};
+    CENTERS[27] = new float[] { +0.00f, -DIST3, +0.00f};
+    CENTERS[28] = new float[] { +0.00f, +0.00f, +DIST3};
+    CENTERS[29] = new float[] { +0.00f, +0.00f, -DIST3};
+
+    CENTERS[30] = new float[] { +0.00f, +DIST1, +DIST1};
+    CENTERS[31] = new float[] { +DIST1, +0.00f, +DIST1};
+    CENTERS[32] = new float[] { +0.00f, -DIST1, +DIST1};
+    CENTERS[33] = new float[] { -DIST1, +0.00f, +DIST1};
+    CENTERS[34] = new float[] { +DIST1, +DIST1, +0.00f};
+    CENTERS[35] = new float[] { +DIST1, -DIST1, +0.00f};
+    CENTERS[36] = new float[] { -DIST1, -DIST1, +0.00f};
+    CENTERS[37] = new float[] { -DIST1, +DIST1, +0.00f};
+    CENTERS[38] = new float[] { +0.00f, +DIST1, -DIST1};
+    CENTERS[39] = new float[] { +DIST1, +0.00f, -DIST1};
+    CENTERS[40] = new float[] { +0.00f, -DIST1, -DIST1};
+    CENTERS[41] = new float[] { -DIST1, +0.00f, -DIST1};
 
     return CENTERS;
     }
@@ -332,211 +328,6 @@ public class TwistyRex extends TwistyObject
     return QUATS[0];
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  MeshBase createFacesRexCorner()
-    {
-    MeshBase[] meshes = new MeshBase[2];
-
-    float F = REX_D*SQ2;
-    float G = (1-REX_D)*SQ2/2;
-    float H = 0.1f;
-    float J = +2*G/3 - H*G;
-
-    float[] vertices = { -F/2, -G/3, +F/2, -G/3, H*F/2, J, -H*F/2, J};
-
-    FactoryCubit factory = FactoryCubit.getInstance();
-    float[] bands0 = factory.computeBands(+0.016f,10,G/3,0.5f,5);
-    float[] bands1 = factory.computeBands(-0.230f,45,G/3,0.0f,2);
-
-    meshes[0] = new MeshPolygon(vertices,bands0,1,1);
-    meshes[0].setEffectAssociation(0,1,0);
-    meshes[1] = new MeshPolygon(vertices,bands1,0,0);
-    meshes[1].setEffectAssociation(0,2,0);
-
-    return new MeshJoined(meshes);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  MeshBase createFacesRexFace()
-    {
-    MeshBase[] meshes = new MeshBase[2];
-
-    float[] vertices = { -REX_D,0.0f, 0.0f, -REX_D, +REX_D, 0.0f, 0.0f, +REX_D};
-
-    FactoryCubit factory = FactoryCubit.getInstance();
-    float[] bands0 = factory.computeBands(0.016f,10,REX_D/2,0.5f,5);
-    float[] bands1 = factory.computeBands(0.000f,45,REX_D/2,0.0f,2);
-
-    meshes[0] = new MeshPolygon(vertices,bands0,0,0);
-    meshes[0].setEffectAssociation(0,1,0);
-    meshes[1] = new MeshPolygon(vertices,bands1,0,0);
-    meshes[1].setEffectAssociation(0,2,0);
-
-    return new MeshJoined(meshes);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  MeshBase createFacesRexEdge()
-    {
-    MeshBase[] meshes = new MeshPolygon[6];
-    FactoryCubit factory = FactoryCubit.getInstance();
-
-    float E = 0.5f - REX_D;
-    float F = 0.5f;
-    float[] vertices0 = { -F,E/3, 0,-2*E/3, +F,E/3 };
-    float[] bands0 = factory.computeBands(0.03f,27,F/3,0.8f,5);
-
-    meshes[0] = new MeshPolygon(vertices0, bands0, 2, 3);
-    meshes[0].setEffectAssociation(0,1,0);
-    meshes[1] = meshes[0].copy(true);
-    meshes[1].setEffectAssociation(0,2,0);
-
-    float G = (float)Math.sqrt(E*E+F*F);
-    float[] vertices1 = { -2*G/3, -E/3, G/3, -E/3, G/3, 2*E/3 };
-    float[] bands1 = factory.computeBands(0.00f,45,G/3,0.2f,3);
-
-    meshes[2] = new MeshPolygon(vertices1, bands1, 1, 2);
-    meshes[2].setEffectAssociation(0,4,0);
-    meshes[3] = meshes[2].copy(true);
-    meshes[3].setEffectAssociation(0,8,0);
-    meshes[4] = meshes[2].copy(true);
-    meshes[4].setEffectAssociation(0,16,0);
-    meshes[5] = meshes[2].copy(true);
-    meshes[5].setEffectAssociation(0,32,0);
-
-    return new MeshJoined(meshes);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private VertexEffect[] createVertexEffectsRexEdge()
-    {
-    float E = 0.5f - REX_D;
-    float F = 0.5f;
-    float G = (float)Math.sqrt(E*E+F*F);
-    float A = (float)((180/Math.PI)*Math.asin(E/G));
-
-    Static3D move1 = new Static3D(    0.0f, -E/3, 0.0f);
-    Static3D move2 = new Static3D(2*G/3 -F, +E/3, 0.0f);
-
-    Static3D center0= new Static3D(0.0f, 0.0f, 0.0f);
-    Static3D center1= new Static3D(  -F, 0.0f, 0.0f);
-    Static3D center2= new Static3D(  +F, 0.0f, 0.0f);
-    Static3D axisX  = new Static3D(1.0f, 0.0f, 0.0f);
-    Static3D axisY  = new Static3D(0.0f, 1.0f, 0.0f);
-    Static3D axisZ  = new Static3D(0.0f, 0.0f, 1.0f);
-
-    Static1D angle180 = new Static1D(180);
-    Static1D angle90  = new Static1D( 90);
-    Static1D angle270 = new Static1D(270);
-    Static1D angle1   = new Static1D(+A);
-    Static1D angle2   = new Static1D(-A);
-
-    VertexEffect[] effect = new VertexEffect[12];
-
-    effect[0] = new VertexEffectMove(move1);
-    effect[1] = new VertexEffectMove(move2);
-    effect[2] = new VertexEffectRotate(  angle90, axisX, center0 );
-    effect[3] = new VertexEffectRotate( angle270, axisX, center0 );
-    effect[4] = new VertexEffectRotate( angle180, axisX, center0 );
-    effect[5] = new VertexEffectRotate( angle180, axisY, center0 );
-    effect[6] = new VertexEffectScale( new Static3D(-1, 1, 1) );
-    effect[7] = new VertexEffectScale ( new Static3D( 1,-1, 1) );
-    effect[8] = new VertexEffectRotate(   angle1, axisY, center1);
-    effect[9] = new VertexEffectRotate(   angle2, axisY, center2);
-    effect[10]= new VertexEffectRotate(   angle2, axisZ, center1);
-    effect[11]= new VertexEffectRotate(   angle1, axisZ, center2);
-
-    effect[0].setMeshAssociation( 3,-1);  // meshes 0 & 1
-    effect[1].setMeshAssociation(60,-1);  // meshes 2,3,4,5
-    effect[2].setMeshAssociation( 2,-1);  // meshes 1
-    effect[3].setMeshAssociation(12,-1);  // meshes 2,3
-    effect[4].setMeshAssociation(48,-1);  // meshes 4,5
-    effect[5].setMeshAssociation(32,-1);  // mesh 5
-    effect[6].setMeshAssociation( 8,-1);  // apply to mesh 3
-    effect[7].setMeshAssociation( 2,-1);  // apply to mesh 1
-    effect[8].setMeshAssociation(16,-1);  // apply to mesh 4
-    effect[9].setMeshAssociation(32,-1);  // apply to mesh 5
-    effect[10].setMeshAssociation(4,-1);  // apply to mesh 2
-    effect[11].setMeshAssociation(8,-1);  // apply to mesh 3
-
-    return effect;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private VertexEffect[] createVertexEffectsRexCorner()
-    {
-    Static3D center= new Static3D(0.0f, 0.0f, 0.0f);
-    Static3D axisZ = new Static3D(0.0f, 0.0f, 1.0f);
-    Static1D angle = new Static1D(225);
-
-    VertexEffect[] effect = new VertexEffect[1];
-    effect[0] = new VertexEffectRotate(angle, axisZ, center);
-
-    return effect;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private MeshBase createRexCornerMesh()
-    {
-    MeshBase mesh = createFacesRexCorner();
-    VertexEffect[] effects = createVertexEffectsRexCorner();
-    for( VertexEffect effect : effects ) mesh.apply(effect);
-
-    final float G = (1-REX_D)/3;
-    Static3D center = new Static3D(0.0f,0.0f,-G*SQ2/2);
-    Static3D[] vertices = new Static3D[1];
-    vertices[0] = new Static3D(+G,-G,+0.0f);
-    FactoryCubit.getInstance().roundCorners(mesh,center,vertices,0.10f,0.10f);
-
-    mesh.mergeEffComponents();
-    mesh.addEmptyTexComponent();
-    mesh.addEmptyTexComponent();
-    mesh.addEmptyTexComponent();
-    mesh.addEmptyTexComponent();
-
-    return mesh;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private MeshBase createRexFaceMesh()
-    {
-    MeshBase mesh = createFacesRexFace();
-
-    mesh.mergeEffComponents();
-    mesh.addEmptyTexComponent();
-    mesh.addEmptyTexComponent();
-    mesh.addEmptyTexComponent();
-    mesh.addEmptyTexComponent();
-
-    return mesh;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private MeshBase createRexEdgeMesh()
-    {
-    MeshBase mesh = createFacesRexEdge();
-    VertexEffect[] effects = createVertexEffectsRexEdge();
-    for( VertexEffect effect : effects ) mesh.apply(effect);
-
-    Static3D center = new Static3D(0.0f,-0.5f,-0.5f);
-    Static3D[] vertices = new Static3D[2];
-    vertices[0] = new Static3D(+0.5f,+0.0f,+0.0f);
-    vertices[1] = new Static3D(-0.5f,+0.0f,+0.0f);
-    FactoryCubit.getInstance().roundCorners(mesh,center,vertices,0.06f,0.10f);
-
-    mesh.mergeEffComponents();
-
-    return mesh;
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   MeshBase createCubitMesh(int cubit, int numLayers)
@@ -545,17 +336,127 @@ public class TwistyRex extends TwistyObject
 
     if( cubit<24 )
       {
-      if( mCornerMesh==null ) mCornerMesh = createRexCornerMesh();
+      if( mCornerMesh==null )
+        {
+        float G = (1-REX_D)*SQ2/2;
+
+        double[][] vertices =
+           {
+             {  -0.033333f, 0.23333f, 0.0f },
+             {  -0.233333f, 0.03333f, 0.0f },
+             {  +0.216666f,-0.23666f, 0.0f },
+             {  +0.236666f,-0.21666f, 0.0f }
+           };
+
+        int[][] vertIndexes =
+           {
+             {0,1,2,3},
+             {3,2,1,0}
+           };
+
+        float[][] centers= new float[][] { {0.0f,0.0f,-G/3} };
+        float[][] corners= new float[][] { {0.03f,0.10f} };
+        int[] indexes= {-1,-1,0,0};
+
+        int[] bandIndexes= new int[] { 0,1 };
+
+        float[][] bands =
+          {
+               {+0.016f,10,G/3,0.5f,5,1,1},
+               {+0.230f,45,G/3,0.0f,2,0,0}
+          };
+
+        FactoryCubit factory = FactoryCubit.getInstance();
+        factory.createNewFaceTransform(vertices,vertIndexes);
+        mCornerMesh = factory.createRoundedSolid(vertices, vertIndexes,
+                                                 bands, bandIndexes,
+                                                 corners, indexes,
+                                                 centers, indexes,
+                                                 getNumCubitFaces(), null );
+        }
       mesh = mCornerMesh.copy(true);
       }
     else if( cubit<30 )
       {
-      if( mFaceMesh==null ) mFaceMesh = createRexFaceMesh();
+      if( mFaceMesh==null )
+        {
+        double[][] vertices =
+          {
+            { -REX_D,   0.0f, 0.0f },
+            {   0.0f, -REX_D, 0.0f },
+            { +REX_D,   0.0f, 0.0f },
+            {   0.0f, +REX_D, 0.0f }
+          };
+
+        int[][] vertIndexes=
+          {
+            {0,1,2,3},
+            {3,2,1,0}
+          };
+
+        float[][] bands =
+          {
+            {0.025f,10,REX_D/2,0.5f,5,0,0},
+            {0.000f,45,REX_D/2,0.0f,2,0,0}
+          };
+
+        int[] indexes= {-1,-1,-1,-1};
+        int[] bandIndexes= new int[] { 0,1 };
+
+        FactoryCubit factory = FactoryCubit.getInstance();
+        factory.createNewFaceTransform(vertices,vertIndexes);
+        mFaceMesh = factory.createRoundedSolid(vertices, vertIndexes,
+                                               bands, bandIndexes,
+                                               null, indexes,
+                                               null, indexes,
+                                               getNumCubitFaces(), null );
+        }
       mesh = mFaceMesh.copy(true);
       }
     else
       {
-      if( mEdgeMesh==null ) mEdgeMesh = createRexEdgeMesh();
+      if( mEdgeMesh==null )
+        {
+        float E = 0.5f - REX_D;
+        float F = 0.5f;
+        float G = (float)Math.sqrt(E*E+F*F);
+
+        double[][] vertices =
+           {
+             { -F, 0, 0 },
+             {  0,-E, 0 },
+             { +F, 0, 0 },
+             {  0, 0,-E },
+           };
+
+        int[][] vertIndexes =
+           {
+             {0,1,2},
+             {0,2,3},
+             {0,3,1},
+             {1,3,2}
+           };
+
+        float[][] centers= new float[][] { {0.0f,-0.5f,-0.5f} };
+        float[][] corners= new float[][] { {0.06f,0.10f} };
+        int[] indexes= {0,-1,0,-1};
+
+        int[] bandIndexes= new int[] { 0,0,1,1 };
+
+        float[][] bands =
+          {
+               {0.03f,27,F/3,0.8f,5,2,3},
+               {0.01f,45,G/3,0.2f,3,1,2}
+          };
+
+        FactoryCubit factory = FactoryCubit.getInstance();
+        factory.createNewFaceTransform(vertices,vertIndexes);
+        mEdgeMesh = factory.createRoundedSolid(vertices, vertIndexes,
+                                               bands, bandIndexes,
+                                               corners, indexes,
+                                               centers, indexes,
+                                               getNumCubitFaces(), null );
+        }
       mesh = mEdgeMesh.copy(true);
       }
 
diff --git a/src/main/res/raw/rex.dmesh b/src/main/res/raw/rex.dmesh
index 8b175146..933b611b 100644
Binary files a/src/main/res/raw/rex.dmesh and b/src/main/res/raw/rex.dmesh differ
