mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-20 09:58:27 +00:00
Added builtin linear extrude on Text3D
This commit is contained in:
parent
b5d2160006
commit
152a63ee77
@ -35,8 +35,16 @@ namespace OSCADSharp.ConsoleTests
|
|||||||
var combined = cube.Intersection(cylinder).Color("Blue");
|
var combined = cube.Intersection(cylinder).Color("Blue");
|
||||||
combined = cube.Clone().Mirror(0, 0, 1).Union(combined);
|
combined = cube.Clone().Mirror(0, 0, 1).Union(combined);
|
||||||
|
|
||||||
|
var text = new Text3D()
|
||||||
|
{
|
||||||
|
Text = "Hello!"
|
||||||
|
}.Translate(-30, 0, 0);
|
||||||
|
|
||||||
|
combined = text.Union(combined);
|
||||||
|
|
||||||
string script = combined.ToString();
|
string script = combined.ToString();
|
||||||
File.WriteAllLines("test.scad", new string[] { script });
|
|
||||||
|
File.WriteAllLines("test.scad", new string[] { script.ToString() });
|
||||||
|
|
||||||
Console.WriteLine(script);
|
Console.WriteLine(script);
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using OSCADSharp.Scripting;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -109,7 +110,8 @@ namespace OSCADSharp
|
|||||||
|
|
||||||
sb.Append(");");
|
sb.Append(");");
|
||||||
|
|
||||||
return sb.ToString();
|
var formatter = new BlockFormatter(String.Format("linear_extrude(height = {0})", 1), sb.ToString());
|
||||||
|
return formatter.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user