mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-12 05:58:34 +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;
|
||||
}
|
||||
|
||||
#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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user