예제 #1
0
        void ExecuteSwitchProfileCommand(Pipe.ProfileType profile)
        {
            if (Pipe.Profile != profile)
            {
                Sketch profileSketch = null;
                Pipe.Profile = profile;

                if (profile == Pipe.ProfileType.Custom && Pipe.Operands.Count < 2)
                {
                    Pipe.Body.SaveTopologyUndo();
                    profileSketch      = Sketch.Create();
                    profileSketch.Body = Pipe.Body;
                    profileSketch.Name = "Profile";
                    Pipe.AddOperand(profileSketch);
                }
                CommmitChange();

                RaisePropertyChanged(nameof(ProfileIsHollow));
                if (profileSketch != null)
                {
                    InteractiveContext.Current.WorkspaceController.StartTool(new SketchEditorTool(profileSketch));
                }
            }
        }