Exemple #1
0
        public SolutionFailureException BuildPattern(Measurements measurements, bool showBasePattern)
        {
            try
            {
                this.showBasePattern = showBasePattern;

                patternsToDraw = new List <Pattern>();
                if (showBasePattern)
                {
                    HoodiePattern hoodiePatternBlockBase = new HoodiePattern();
                    hoodiePatternBlockBase.ProgressStateChanged += HoodiePatternBlockBase_ProgressStateChanged;
                    hoodiePatternBlockBase.Build(measurements);
                    patternsToDraw.Add(hoodiePatternBlockBase);
                }
                HoodiePattern hoodiePatternBlock = new HoodiePattern();
                hoodiePatternBlock.ProgressStateChanged += HoodiePatternBlockBase_ProgressStateChanged;
                hoodiePatternBlock.Build(measurements.Clone().ApplyEase());
                patternsToDraw.Insert(0, hoodiePatternBlock);
                return(null);
            }
            catch (SolutionFailureException ex)
            {
                return(ex);
            }

            //TestPattern();
            //return null;
        }
Exemple #2
0
        public void TestPattern()
        {
            try
            {
                showBasePattern = true;


                patternsToDraw = new List <Pattern>();
                //for (int i = 0; i < 50; i++)
                //{
                EaseMeasurements e = new EaseMeasurements(false);
                e.LoadLargeEaseDefaults();
                Measurements m = new Measurements(e);

                m.GarmentBodiceLength = m.MGarmentBodiceLength.Max;

                m.GarmentHoodLenghtFromTemple = m.MGarmentHoodLenghtFromTemple.Max;
                m.GarmentHoodZipEdge          = m.MGarmentHoodZipEdge.Max;
                m.GarmentHoodSetBackFromZip   = m.MGarmentHoodSetBackFromZip.Max;
                m.GarmentHoodInsertWidth      = m.MGarmentHoodInsertWidth.Max;

                m.GarmentHemAllowance  = m.MGarmentHemAllowance.Max;
                m.GarmentSeamAllowance = m.MGarmentSeamAllowance.Max;

                m.ChestCirc         = m.MChestCirc.Max;
                m.ShoulderLength    = m.MShoulderLength.Max;
                m.NeckCircumference = m.MNeckCircumference.Max;
                m.ShoulderAngle     = m.MShoulderAngle.Max;

                m.WristToForeArm    = m.MWristToForeArm.Max;
                m.ForeArmToBicep    = m.MForeArmToBicep.Max;
                m.BicepToUpperBicep = m.MBicepToUpperBicep.Max;
                m.ArmLength         = m.MArmLength.Max;

                m.WristCirc    = m.MWristCirc.Max;
                m.ForeArmCirc  = m.MForeArmCirc.Max;
                m.BicepCirc    = m.MBicepCirc.Max;
                m.ShoulderCirc = m.MShoulderCirc.Max;

                m.HeadBackCurveRadius        = m.MHeadBackCurveRadius.Max;
                m.CircTempleToTemple         = m.MCircTempleToTemple.Max;
                m.ShoulderToShoulderOverHead = m.MShoulderToShoulderOverHead.Max;

                m.ApplyEase();

                HoodiePattern patternMax = new HoodiePattern();
                patternMax.Build(m);
                patternsToDraw.Add(patternMax);

                e = new EaseMeasurements(false);
                m = new Measurements(e);

                m.GarmentBodiceLength = m.MGarmentBodiceLength.Min;

                m.GarmentHoodLenghtFromTemple = m.MGarmentHoodLenghtFromTemple.Min;
                m.GarmentHoodZipEdge          = m.MGarmentHoodZipEdge.Min;
                m.GarmentHoodSetBackFromZip   = m.MGarmentHoodSetBackFromZip.Min;
                m.GarmentHoodInsertWidth      = 10;// m.MGarmentHoodInsertWidth.Min;

                m.GarmentHemAllowance  = m.MGarmentHemAllowance.Min;
                m.GarmentSeamAllowance = m.MGarmentSeamAllowance.Min;

                m.ChestCirc         = m.MChestCirc.Min;
                m.ShoulderLength    = m.MShoulderLength.Min;
                m.NeckCircumference = m.MNeckCircumference.Min;
                m.ShoulderAngle     = m.MShoulderAngle.Min;

                m.WristToForeArm    = m.MWristToForeArm.Min;
                m.ForeArmToBicep    = m.MForeArmToBicep.Min;
                m.BicepToUpperBicep = m.MBicepToUpperBicep.Min;
                m.ArmLength         = m.MArmLength.Min;

                m.WristCirc    = m.MWristCirc.Min;
                m.ForeArmCirc  = m.MForeArmCirc.Min;
                m.BicepCirc    = m.MBicepCirc.Min;
                m.ShoulderCirc = m.MShoulderCirc.Min;

                m.HeadBackCurveRadius        = m.MHeadBackCurveRadius.Min;
                m.CircTempleToTemple         = m.MCircTempleToTemple.Min;
                m.ShoulderToShoulderOverHead = m.MShoulderToShoulderOverHead.Min;

                m.ApplyEase();

                HoodiePattern patternMin = new HoodiePattern();
                patternMin.Build(m);
                patternsToDraw.Add(patternMin);
                //}
            }
            catch (SolutionFailureException ex)
            {
                throw ex;
            }
        }