Beispiel #1
0
        public static LineByEquation CreateLineByEquation(Drawing drawing, string a, string b, string c)
        {
            var result = new LineByEquation()
            {
                Drawing = drawing
            };
            var equation = new GeneralFormLineEquation(result, a, b, c);

            result.Equation = equation;
            equation.Recalculate();
            return(result);
        }
Beispiel #2
0
        public static ILineEquation Read(LineByEquation parent, XElement element)
        {
            var m = element.ReadString("m");
            var b = element.ReadString("b");
            var A = element.ReadString("A");
            var B = element.ReadString("B");
            var C = element.ReadString("C");

            ILineEquation result = null;

            if (!m.IsEmpty() && !b.IsEmpty())
            {
                result = new SlopeInterseptLineEquation(parent, m, b);
            }
            else if (!A.IsEmpty() && !B.IsEmpty() && !C.IsEmpty())
            {
                result = new GeneralFormLineEquation(parent, A, B, C);
            }

            return(result);
        }
Beispiel #3
0
 public static LineByEquation CreateLineByEquation(Drawing drawing, string a, string b, string c)
 {
     var result = new LineByEquation() { Drawing = drawing };
     var equation = new GeneralFormLineEquation(result, a, b, c);
     result.Equation = equation;
     equation.Recalculate();
     return result;
 }
Beispiel #4
0
        public static ILineEquation Read(LineByEquation parent, XElement element)
        {
            var m = element.ReadString("m");
            var b = element.ReadString("b");
            var A = element.ReadString("A");
            var B = element.ReadString("B");
            var C = element.ReadString("C");

            ILineEquation result = null;

            if (!m.IsEmpty() && !b.IsEmpty())
            {
                result = new SlopeInterseptLineEquation(parent, m, b);
            }
            else if (!A.IsEmpty() && !B.IsEmpty() && !C.IsEmpty())
            {
                result = new GeneralFormLineEquation(parent, A, B, C);
            }

            return result;
        }