mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-23 19:28:27 +00:00
+ Added new abstract 'position' method to OSCADObject, overrides on all pertinent classes. (Not implemented yet)
This commit is contained in:
parent
bc69fa877b
commit
49d2de3046
@ -204,6 +204,17 @@ namespace OSCADSharp
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Utility Methods
|
#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>
|
/// <summary>
|
||||||
/// Creates a copy of this object and all of its children
|
/// Creates a copy of this object and all of its children
|
||||||
///
|
///
|
||||||
|
|||||||
@ -43,5 +43,10 @@ namespace OSCADSharp.Scripting
|
|||||||
|
|
||||||
return new MultiBlockStatementObject(this.outerStatement, childClones);
|
return new MultiBlockStatementObject(this.outerStatement, childClones);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,6 +76,11 @@ namespace OSCADSharp.Solids
|
|||||||
Center = this.Center
|
Center = this.Center
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,6 +137,11 @@ namespace OSCADSharp.Solids
|
|||||||
Center = this.Center
|
Center = this.Center
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,6 +80,11 @@ namespace OSCADSharp.Solids
|
|||||||
Radius = this.Radius
|
Radius = this.Radius
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,7 @@ namespace OSCADSharp.Solids
|
|||||||
public string Language { get; set; }
|
public string Language { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates 3d text with the default parameters
|
/// 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());
|
var formatter = new SingleBlockFormatter(String.Format("linear_extrude(height = {0})", 1), sb.ToString());
|
||||||
return formatter.ToString();
|
return formatter.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,5 +50,10 @@ namespace OSCADSharp.Transforms
|
|||||||
{
|
{
|
||||||
return new ColoredObject(obj, this.ColorName, this.Opacity);
|
return new ColoredObject(obj, this.ColorName, this.Opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,6 @@ namespace OSCADSharp.Transforms
|
|||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override OSCADObject Clone()
|
public override OSCADObject Clone()
|
||||||
{
|
{
|
||||||
return new LinearExtrudedObject(this.obj.Clone(), this.Height);
|
return new LinearExtrudedObject(this.obj.Clone(), this.Height);
|
||||||
@ -48,5 +47,10 @@ namespace OSCADSharp.Transforms
|
|||||||
var formatter = new SingleBlockFormatter(extrudeCommand, this.obj.ToString());
|
var formatter = new SingleBlockFormatter(extrudeCommand, this.obj.ToString());
|
||||||
return formatter.ToString();
|
return formatter.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,5 +49,10 @@ namespace OSCADSharp.Transforms
|
|||||||
{
|
{
|
||||||
return new MirroredObject(obj, this.Normal);
|
return new MirroredObject(obj, this.Normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,5 +48,10 @@ namespace OSCADSharp.Transforms
|
|||||||
{
|
{
|
||||||
return new ResizedObject(obj, this.Size);
|
return new ResizedObject(obj, this.Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,5 +48,10 @@ namespace OSCADSharp.Transforms
|
|||||||
{
|
{
|
||||||
return new RotatedObject(obj, this.Angle);
|
return new RotatedObject(obj, this.Angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,5 +48,10 @@ namespace OSCADSharp.Transforms
|
|||||||
{
|
{
|
||||||
return new ScaledObject(obj, this.ScaleFactor);
|
return new ScaledObject(obj, this.ScaleFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,5 +45,10 @@ namespace OSCADSharp.Transforms
|
|||||||
{
|
{
|
||||||
return new TranslatedObject(obj, this.Vector);
|
return new TranslatedObject(obj, this.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector3 Position()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user