Skip to content

Commit

Permalink
Making new fit to bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbrubaker committed Nov 20, 2023
1 parent 23477d7 commit e78e59e
Show file tree
Hide file tree
Showing 7 changed files with 397 additions and 10 deletions.
4 changes: 2 additions & 2 deletions MatterControlLib/ApplicationView/SceneOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -965,14 +965,14 @@ private static SceneOperation FitToBoundsOperation()
{
return new SceneOperation("Fit to Bounds")
{
ResultType = typeof(FitToBoundsObject3D_3),
ResultType = typeof(FitToBoundsObject3D_4),
TitleGetter = () => "Fit to Bounds".Localize(),
Action = async (sceneContext) =>
{
var scene = sceneContext.Scene;
var selectedItem = scene.SelectedItem;
scene.SelectedItem = null;
var fit = await FitToBoundsObject3D_3.Create(selectedItem.Clone());
var fit = await FitToBoundsObject3D_4.Create(selectedItem.Clone());
fit.MakeNameNonColliding();
scene.UndoBuffer.AddAndDo(new ReplaceCommand(new[] { selectedItem }, new[] { fit }));
scene.SelectedItem = fit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public enum MaintainRatio
X_Y_Z
}

[Obsolete("Not used anymore. Replaced with FitToBoundsObject3D_3", true)]
[Obsolete("Not used anymore. Replaced with FitToBoundsObject3D_4", true)]
public class FitToBoundsObject3D : Object3D, IEditorDraw, IPropertyGridModifier
{
[Description("Set the shape the part will be fit into.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The views and conclusions contained in the software and documentation are those

namespace MatterHackers.MatterControl.DesignTools.Operations
{
[Obsolete("Not used anymore. Replaced with FitToBoundsObject3D_3", true)]
[Obsolete("Not used anymore. Replaced with FitToBoundsObject3D_4", true)]
public class FitToBoundsObject3D_2 : TransformWrapperObject3D, IEditorDraw
{
private Vector3 boundsSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ The views and conclusions contained in the software and documentation are those
either expressed or implied, of the FreeBSD Project.
*/

/*********************************************************************/
/**************************** OBSOLETE! ******************************/
/************************ USE NEWER VERSION **************************/
/*********************************************************************/

using MatterHackers.Agg;
using MatterHackers.Agg.UI;
using MatterHackers.DataConverters3D;
Expand All @@ -42,7 +47,8 @@ The views and conclusions contained in the software and documentation are those

namespace MatterHackers.MatterControl.DesignTools.Operations
{
public class FitToBoundsObject3D_3 : TransformWrapperObject3D, IEditorDraw, IPropertyGridModifier
[Obsolete("Not used anymore. Replaced with FitToBoundsObject3D_4", true)]
public class FitToBoundsObject3D_3 : TransformWrapperObject3D, IEditorDraw, IPropertyGridModifier
{
private InvalidateType additonalInvalidate;

Expand Down
Loading

0 comments on commit e78e59e

Please sign in to comment.