public MinArea(IValueGenerator area, BaseFootprintAlgorithm algorithm, BaseFootprintAlgorithm fallback) : base(algorithm, fallback) { Contract.Requires(area != null); Contract.Requires(algorithm != null); Area = area; }
public Vector2[] Test(BaseFootprintAlgorithm alg, Vector2[] shape, INamedDataCollection metadata = null) { var r = new Random(10); var result = alg.Apply(r.NextDouble, metadata ?? new NamedBoxCollection(), shape, shape, shape); //Check that result is clockwise wound //Assert.IsFalse(Clipper.Orientation(result.Select(a => new IntPoint((int)(a.X * 1000), (int)(a.Y * 1000))).ToList())); //Display result Console.WriteLine(new SvgBuilder(10).Outline(result)); return(result.ToArray()); }
public MetaPredicate(string key, BaseFootprintAlgorithm pass, BaseFootprintAlgorithm fail) { _key = key; _pass = pass; _fail = fail; }