Exemplo n.º 1
0
        public ShapeCollection CreatePaths(PathData pd, double increment)
        {
            bd = pd as BraidData;
            ShapeCollection pc = new ShapeCollection();
            pc.PatternName = pd.Name;
            repeatAngle = 2 * Math.PI / bd.Repeats;
            colAngle = (repeatAngle - rad * bd.Margin) / bd.Perms.Count ;

            rowHeight = bd.Width / (bd.NumStrands - 1);
            colWidth = bd.Length / bd.Perms.Count;
            origin = new Point(bd.ToolPosition, 0);

            for (int indx = 0; indx < bd.Repeats; indx++)
            {
                pc.AddShape(MkPath(indx, increment));
            }
            return pc;
           
        }
Exemplo n.º 2
0
 private void CreateBraidData()
 {
     BraidData b = new BraidData();
     b.Repeats = 4;
     Permutation p = new Permutation();
     p.SetPermOf(0, 1);
     p.SetPermOf(1, 0);
     b.Add(p);
     p = new Permutation();
     b.Add(p);
     p = new Permutation();
     p.SetPermOf(0, 1);
     p.SetPermOf(1, 0);
     b.Add(p);
     BraidPatterns.Add(b);
     b.PropertyChanged += b_PropertyChanged;
 }
Exemplo n.º 3
0
 public ViewModel()
 {     
     NeedsInitialising = true;
     LastBazleyPattern = new BazelyChuck();
     LastRossPattern = new RossData();
     LastWheelsPattern = new WheelsData();
     LastBarrelPattern = new Barrel();
     LastLatticePattern = new LatticeData();
     LastBraidPattern = new BraidData();
 }