예제 #1
0
파일: Sketch.cs 프로젝트: Macad3D/Macad3D
        //--------------------------------------------------------------------------------------------------

        #endregion

        #region Make

        public bool SolveConstraints(bool precise)
        {
            if (Constraints.Count == 0)
            {
                ConstraintSolverFailed = false;
                return(true);
            }

            if (SketchConstraintSolver.Solve(this, precise))
            {
                Invalidate();
                RaisePropertyChanged("Points");
                OnElementsChanged(ElementType.Point);
                if (precise)
                {
                    ConstraintSolverFailed = false;
                }
                return(true);
            }
            if (precise)
            {
                Messages.Error("Sketch constraints failed to solve.");
                ConstraintSolverFailed = true;
            }
            return(false);
        }