mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-11 13:38:33 +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");
|
||||
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();
|
||||
File.WriteAllLines("test.scad", new string[] { script });
|
||||
|
||||
File.WriteAllLines("test.scad", new string[] { script.ToString() });
|
||||
|
||||
Console.WriteLine(script);
|
||||
Console.ReadKey();
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using OSCADSharp.Scripting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -108,8 +109,9 @@ namespace OSCADSharp
|
||||
appendIfValueNotNullOrEmpty("language", this.Language?.ToString(), sb);
|
||||
|
||||
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