+ Added new abstract 'position' method to OSCADObject, overrides on all pertinent classes. (Not implemented yet)

This commit is contained in:
Mike Smith 2016-02-14 23:00:27 -08:00
parent bc69fa877b
commit 49d2de3046
13 changed files with 72 additions and 1 deletions

View File

@ -204,6 +204,17 @@ namespace OSCADSharp
#endregion
#region Utility Methods
protected Vector3 position;
/// <summary>
/// Returns the computed position of this object.
///
/// For some objects that are the aggregate of many operations or
/// multiple children, this may be an approximation or average
/// of the position.
/// </summary>
/// <returns></returns>
public abstract Vector3 Position();
/// <summary>
/// Creates a copy of this object and all of its children
///

View File

@ -43,5 +43,10 @@ namespace OSCADSharp.Scripting
return new MultiBlockStatementObject(this.outerStatement, childClones);
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}

View File

@ -76,6 +76,11 @@ namespace OSCADSharp.Solids
Center = this.Center
};
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
#endregion
}
}

View File

@ -137,6 +137,11 @@ namespace OSCADSharp.Solids
Center = this.Center
};
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
#endregion
}
}

View File

@ -80,6 +80,11 @@ namespace OSCADSharp.Solids
Radius = this.Radius
};
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
#endregion
}
}

View File

@ -59,6 +59,7 @@ namespace OSCADSharp.Solids
public string Language { get; set; }
#endregion
#region Constructors
/// <summary>
/// Creates 3d text with the default parameters
@ -125,6 +126,11 @@ namespace OSCADSharp.Solids
var formatter = new SingleBlockFormatter(String.Format("linear_extrude(height = {0})", 1), sb.ToString());
return formatter.ToString();
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
#endregion
}
}

View File

@ -50,5 +50,10 @@ namespace OSCADSharp.Transforms
{
return new ColoredObject(obj, this.ColorName, this.Opacity);
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}

View File

@ -36,7 +36,6 @@ namespace OSCADSharp.Transforms
this.children.Add(obj);
}
public override OSCADObject Clone()
{
return new LinearExtrudedObject(this.obj.Clone(), this.Height);
@ -48,5 +47,10 @@ namespace OSCADSharp.Transforms
var formatter = new SingleBlockFormatter(extrudeCommand, this.obj.ToString());
return formatter.ToString();
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}

View File

@ -49,5 +49,10 @@ namespace OSCADSharp.Transforms
{
return new MirroredObject(obj, this.Normal);
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}

View File

@ -48,5 +48,10 @@ namespace OSCADSharp.Transforms
{
return new ResizedObject(obj, this.Size);
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}

View File

@ -48,5 +48,10 @@ namespace OSCADSharp.Transforms
{
return new RotatedObject(obj, this.Angle);
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}

View File

@ -48,5 +48,10 @@ namespace OSCADSharp.Transforms
{
return new ScaledObject(obj, this.ScaleFactor);
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}

View File

@ -45,5 +45,10 @@ namespace OSCADSharp.Transforms
{
return new TranslatedObject(obj, this.Vector);
}
public override Vector3 Position()
{
throw new NotImplementedException();
}
}
}