private void subtractFootprint(Vector3 jetVector, int xIndex, int yIndex, int startXIndex, int endXIndex, int startYIndex,
                                       int endYIndex, double removalConst)
        {
            try
            {
                for (int surfX = startXIndex; surfX <= endXIndex; surfX++)
                {
                    int jetXIndex = xIndex - surfX;

                    for (int surfY = startYIndex; surfY <= endYIndex; surfY++)
                    {
                        int    jetYIndex = yIndex - surfY;
                        double remRate   = abmachParams.AbMachJet.RemovalRateAt(jetXIndex, jetYIndex);

                        if (remRate > 0)
                        {
                            Vector3 normal          = _surface.GetNormal(surfX, surfY);
                            double  slopeF          = slopeFactor(jetVector, normal);
                            double  materialRemoved = removalConst * slopeF * remRate;
                            _tempSurf.SetDepth(surfX, surfY, materialRemoved);
                        }
                        else
                        {
                            var pt = new Abmach2DPoint();
                            pt.JetHit = false;
                            _tempSurf.SetDepth(surfX, surfY, 0);
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #2
0
 public void SetValue(int i, int j, Abmach2DPoint pt)
 {
     _values[i, j].JetHit         = pt.JetHit;
     _values[i, j].Normal         = pt.Normal;
     _values[i, j].StartDepth     = pt.StartDepth;
     _values[i, j].TargetDepth    = pt.TargetDepth;
     _values[i, j].Depth          = pt.Depth;
     _values[i, j].DepthTolerance = pt.DepthTolerance;
 }
Exemple #3
0
 void initValues()
 {
     for (int i = 0; i < _xSize; i++)
     {
         for (int j = 0; j < _ySize; j++)
         {
             _values[i, j] = new Abmach2DPoint();
         }
     }
 }
Exemple #4
0
 void initValues(double targetValue)
 {
     for (int i = 0; i < _xSize; i++)
     {
         for (int j = 0; j < _ySize; j++)
         {
             _values[i, j]             = new Abmach2DPoint();
             _values[i, j].TargetDepth = targetValue;
         }
     }
 }