Example #1
0
 /// <summary>
 /// clears all lists.
 /// </summary>
 public void Clear()
 {
     VertexList.Clear();
     EdgeList.Clear();
     FaceList.Clear();
     EdgeCurveList.Clear();
 }
Example #2
0
        /// <summary>
        /// overrides the <see cref="Solid.Refresh()"/> method.
        /// </summary>
        public override void Refresh()
        {
            VertexList.Clear();
            EdgeList.Clear();
            FaceList.Clear();
            EdgeCurveList.Clear();

            Vertex3d A = new Vertex3d(xyz.Null);
            Vertex3d B = new Vertex3d(new xyz(Size.x, 0, 0));
            Vertex3d C = new Vertex3d(new xyz(Size.x, Size.y, 0));
            Vertex3d D = new Vertex3d(new xyz(0, Size.y, 0));
            Vertex3d E = new Vertex3d(A.Value + new xyz(0, 0, Size.z));
            Vertex3d F = new Vertex3d(B.Value + new xyz(0, 0, Size.z));
            Vertex3d G = new Vertex3d(C.Value + new xyz(0, 0, Size.z));
            Vertex3d H = new Vertex3d(D.Value + new xyz(0, 0, Size.z));

            VertexList.Add(A);
            VertexList.Add(B);
            VertexList.Add(C);
            VertexList.Add(D);
            VertexList.Add(E);
            VertexList.Add(F);
            VertexList.Add(G);
            VertexList.Add(H);

            Vertex3dArray_2 Border = new Vertex3dArray_2();
            Vertex3dArray   VA     = new Vertex3dArray();

            Border.Add(VA);
            Face Face = null;

            VA.Clear();
            VA.Add(A);
            VA.Add(B);
            VA.Add(C);
            VA.Add(D);
            Face = Face.SolidPlane(this, Border);
            // FaceList.Add(Face);

            VA.Clear();
            VA.Add(A);
            VA.Add(E);
            VA.Add(F);
            VA.Add(B);

            Face = Face.SolidPlane(this, Border);
            // FaceList.Add(Face);

            VA.Clear();
            VA.Add(B);
            VA.Add(F);
            VA.Add(G);
            VA.Add(C);
            Face = Face.SolidPlane(this, Border);
            //  FaceList.Add(Face);

            VA.Clear();
            VA.Add(C);
            VA.Add(G);
            VA.Add(H);
            VA.Add(D);
            Face = Face.SolidPlane(this, Border);
            //  FaceList.Add(Face);

            VA.Clear();
            VA.Add(D);
            VA.Add(H);
            VA.Add(E);
            VA.Add(A);
            Face = Face.SolidPlane(this, Border);
            //   FaceList.Add(Face);

            VA.Clear();
            VA.Add(H);
            VA.Add(G);
            VA.Add(F);
            VA.Add(E);
            Face = Face.SolidPlane(this, Border);
            //for (int i = 0; i < FaceList.Count; i++)
            //{
            //    FaceList[i].DrawRelativToSurfaceBase = false;
            //    FaceList[i].Refresh();
            //}
        }