mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-19 09:28:32 +00:00
+ Added bindings for the remainder of Sphere's properties
+ Tests for Sphere properties
This commit is contained in:
parent
5487af3d95
commit
d80e2c036a
@ -148,5 +148,23 @@ namespace OSCADSharp.UnitTests
|
|||||||
string script = sphere.ToString();
|
string script = sphere.ToString();
|
||||||
Assert.IsTrue(script.Contains("d = diam"));
|
Assert.IsTrue(script.Contains("d = diam"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Sphere_ResolutionAngleAndFragmentSizeTest()
|
||||||
|
{
|
||||||
|
var resolution = new Variable("resolution", 30);
|
||||||
|
var angle = new Variable("angle", 5);
|
||||||
|
var fragSize = new Variable("fragSize", 10);
|
||||||
|
|
||||||
|
var sphere = new Sphere();
|
||||||
|
sphere.Bind("Resolution", resolution);
|
||||||
|
sphere.Bind("MinimumAngle", angle);
|
||||||
|
sphere.Bind("MinimumFragmentSize", fragSize);
|
||||||
|
|
||||||
|
string script = sphere.ToString();
|
||||||
|
Assert.IsTrue(script.Contains("$fn = resolution"));
|
||||||
|
Assert.IsTrue(script.Contains("$fa = angle"));
|
||||||
|
Assert.IsTrue(script.Contains("$fs = fragSize"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,7 +134,7 @@ namespace OSCADSharp.Solids
|
|||||||
{
|
{
|
||||||
{ "radius", "r" },
|
{ "radius", "r" },
|
||||||
{ "minimumangle", "$fa" },
|
{ "minimumangle", "$fa" },
|
||||||
{ "minimumFragmentsize", "$fs" },
|
{ "minimumfragmentsize", "$fs" },
|
||||||
{ "resolution", "$fn" },
|
{ "resolution", "$fn" },
|
||||||
{ "diameter", "d" }
|
{ "diameter", "d" }
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user