Ejemplo n.º 1
0
        private IStage GetStage()
        {
            IStage stage;

            MainWindow window = MainWindow.ActiveForm as MainWindow;

            if (window._Profile == (object)"Circular")
            {
                stage = new CircularStage();
                stage.SetParams(window._R1, window._R2, window._Length, window._Soperation, window._Svalue,
                                window._Eoperation, window._Evalue);
                CircularStage cirstage = (CircularStage)stage;
                cirstage.StageFeature = OnFeatureAdd();
                return(cirstage);
            }


            stage = new ConicStage();
            stage.SetParams(window._R1, window._R2, window._Length, window._Soperation, window._Svalue,
                            window._Eoperation, window._Evalue);
            return(stage);
        }
Ejemplo n.º 2
0
        public void CreteShaft()
        {
            if (CheckSWConnect() == false)
            {
                return;
            }

            CreateBase();
            foreach (var stage in Stages)
            {
                if (stage.GetType() == typeof(CircularStage))
                {
                    CircularStage CurrentStage = stage as CircularStage;
                    if (CurrentStage.StageFeature != null)
                    {
                        CurrentStage.StageFeature.AddFeature(SwApp, SwModel, CurrentStage.P1, CurrentStage.P2);
                    }
                }
            }

            SwModel.Rebuild(3);
            SwModel.ClearSelection2(true);
        }