protected override void ExecuteCommand()
        {
            _originalSelectionState = _selectionManager.GetStateCopy();

            using (new WaitCursor())
            {
                _combinedMesh      = _objectsToCombine.First().Clone() as IEditableGeometry;
                _combinedMesh.Name = _objectsToCombine.First().Name + "_Combined";
                _combinedMesh.Parent.AddObject(_combinedMesh);

                // Combine
                var editableGoes = _objectsToCombine.Where(x => x is IEditableGeometry).Select(x => (IEditableGeometry)x);
                var newModel     = editableGoes.First().Geometry.Clone() as Rmv2Geometry;
                var typedGeo     = _objectsToCombine.Select(x => (Rmv2Geometry)x.Geometry);
                newModel.Merge(typedGeo.Skip(1).Take(typedGeo.Count() - 1).ToList());
                _combinedMesh.Geometry = newModel;

                // Remove
                foreach (var item in _objectsToCombine)
                {
                    item.Parent.RemoveObject(item);
                }

                // Select
                var currentState = _selectionManager.GetState() as ObjectSelectionState;
                currentState.Clear();
                currentState.ModifySelection(_combinedMesh as ISelectable, false);
            }
        }
 public DivideObjectIntoSubmeshesCommand(IEditableGeometry objectToSplit)
 {
     _objectToSplit = objectToSplit;
 }