mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-20 09:58:27 +00:00
+ Added + and - operators as Union and Difference for for OSCADObjects
This commit is contained in:
parent
a71f28f5e4
commit
10e2ffb356
@ -295,6 +295,31 @@ namespace OSCADSharp
|
|||||||
|
|
||||||
return finalObject;
|
return finalObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Operators
|
||||||
|
/// <summary>
|
||||||
|
/// Adds two OSCADObjects together (unions them)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="left"></param>
|
||||||
|
/// <param name="right"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static OSCADObject operator +(OSCADObject left, OSCADObject right)
|
||||||
|
{
|
||||||
|
return new Union(new OSCADObject[] {left, right });
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Subtracts two OSCADObjects (differences them)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="left"></param>
|
||||||
|
/// <param name="right"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static OSCADObject operator -(OSCADObject left, OSCADObject right)
|
||||||
|
{
|
||||||
|
return new Difference(new OSCADObject[] {left, right });
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user