Beispiel #1
0
        public GEMSParallelArea(XPathNavigator navigator)
        {
            start   = new MeshPointKey();
            start.Z = int.Parse(navigator.GetAttribute("z1", string.Empty));
            start.Y = int.Parse(navigator.GetAttribute("y1", string.Empty));
            start.X = int.Parse(navigator.GetAttribute("x1", string.Empty));

            end   = new MeshPointKey();
            end.Z = int.Parse(navigator.GetAttribute("z2", string.Empty));
            end.Y = int.Parse(navigator.GetAttribute("y2", string.Empty));
            end.X = int.Parse(navigator.GetAttribute("x2", string.Empty));
        }
Beispiel #2
0
 public GEMSParallel(GEMSProject parent)
 {
     this.parent        = parent;
     this.startPecPoint = MeshPointKey.Key(-1, -1, -1);
     this.endPecPoint   = MeshPointKey.Key(-1, -1, -1);
 }
Beispiel #3
0
        public void UpdateAreaList()
        {
            areaList.Clear();

            minAreaMeshCount = -1;
            maxAreaMeshCount = -1;

            int zMax = divisionInZ.Count > 0 ? divisionInZ.Count - 1 : 1;
            int yMax = divisionInY.Count > 0 ? divisionInY.Count - 1 : 1;
            int xMax = divisionInX.Count > 0 ? divisionInX.Count - 1 : 1;

            for (int i = 0; i < zMax; i++)
            {
                for (int j = 0; j < yMax; j++)
                {
                    for (int k = 0; k < xMax; k++)
                    {
                        MeshPointKey min = new MeshPointKey();
                        MeshPointKey max = new MeshPointKey();

                        if (divisionInX.Count >= 2)
                        {
                            min.X = divisionInX[k];
                            max.X = divisionInX[k + 1];
                        }

                        if (divisionInY.Count >= 2)
                        {
                            min.Y = divisionInY[j];
                            max.Y = divisionInY[j + 1];
                        }

                        if (divisionInZ.Count >= 2)
                        {
                            min.Z = divisionInZ[i];
                            max.Z = divisionInZ[i + 1];
                        }

                        int areaMeshCount = (max.X - min.X) * (max.Y - min.Y) * (max.Z - min.Z);

                        if (minAreaMeshCount < 0)
                        {
                            minAreaMeshCount = areaMeshCount;
                        }
                        else
                        {
                            minAreaMeshCount = minAreaMeshCount < areaMeshCount ? minAreaMeshCount : areaMeshCount;
                        }

                        if (maxAreaMeshCount < 0)
                        {
                            maxAreaMeshCount = areaMeshCount;
                        }
                        else
                        {
                            maxAreaMeshCount = maxAreaMeshCount > areaMeshCount ? maxAreaMeshCount : areaMeshCount;
                        }

                        GEMSParallelArea area = new GEMSParallelArea();
                        area.Start = min;
                        area.End   = max;
                        this.areaList.Add(area);
                    }
                }
            }
        }