mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-11 21:48:34 +00:00
Fix for a regression in length/width/height assignment on cubes due to binding refactoring
This commit is contained in:
parent
47aa3324ce
commit
bae12a500c
@ -190,5 +190,15 @@ namespace OSCADSharp.UnitTests
|
||||
Assert.IsTrue(script.Contains("translate(v = [xOffset"));
|
||||
Assert.IsTrue(script.Contains("size = [15, 5, myHeight]"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Cube_LengthWidthHeightAppearsInScriptOutput()
|
||||
{
|
||||
var cube = new Cube(15, 5, 12);
|
||||
|
||||
string script = cube.ToString();
|
||||
|
||||
Assert.IsTrue(script.Contains("size = [15, 5, 12]"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,6 +19,10 @@ namespace OSCADSharp
|
||||
|
||||
internal string GetScript()
|
||||
{
|
||||
this.bindings.SizeBinding.X = this.cube.Size.X;
|
||||
this.bindings.SizeBinding.Y = this.cube.Size.Y;
|
||||
this.bindings.SizeBinding.Z = this.cube.Size.Z;
|
||||
|
||||
return String.Format("cube(size = {0}, center = {1}); {2}",
|
||||
this.bindings.SizeBinding.ToString(),
|
||||
this.bindings.CenterBinding.IsBound ? this.bindings.CenterBinding.ToString() :
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user