public void SEG6xRAD75xSPD0() { var config = new PlateConfig() { plateRadius = 75, spindelRadius = 0 }; SaveMesh(config); }
public void SEG6xRAD75xSPD3xCUT0() { var config = new PlateConfig() { plateRadius = 75, spindelRadius = 3, spindelCut = 0, }; SaveMesh(config); }
public void SEG8xRAD90xBND10_SPD5_CUT1() { var config = new PlateConfig() { segments = 8, plateRadius = 90, bendRadius = 10, spindelRadius = 5, spindelCut = 1 }; SaveMesh(config); }
public void SEG5xRAD60xPWDT5_SPD3_CUT05() { var config = new PlateConfig() { segments = 5, plateRadius = 60, panelWidth = 5, spindelRadius = 3, spindelCut = 0.5 }; SaveMesh(config); }
void SaveMesh(PlateConfig config, [CallerMemberName] string fileName = null) { var output = Path.Combine(SolutionFolder(), "output"); if (!Directory.Exists(output)) { Directory.CreateDirectory(output); } var plate = new PlateGenerator(config); var meshGenerator = plate.Generate(); var mesh = meshGenerator.MakeSimpleMesh(); fileName = fileName != null ? $"{fileName}.stl" : $"output.stl"; IOWriteResult result = StandardMeshWriter.WriteFile( Path.Combine(output, fileName), new List <WriteMesh>() { new WriteMesh(mesh) }, WriteOptions.Defaults); }
public PlateGenerator(PlateConfig config) { Context.Config = config; }