Related blog post: How to View STL Files using C#
Last active
January 7, 2022 06:32
-
-
Save GroupDocsGists/07d6814f87a48e2a208698b1dfeaab52 to your computer and use it in GitHub Desktop.
View STL File as HTML, PDF, JPG or PNG using C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (Viewer viewer = new Viewer("path/input.stl")) | |
{ | |
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("path/stl-output.html"); | |
viewer.View(options); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (Viewer viewer = new Viewer("path/input.stl")) | |
{ | |
JpgViewOptions options = new JpgViewOptions("path/stl-output.jpg"); | |
viewer.View(options); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (Viewer viewer = new Viewer("path/input.stl")) | |
{ | |
PdfViewOptions options = new PdfViewOptions("path/stl-output.pdf"); | |
viewer.View(options); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (Viewer viewer = new Viewer("path/input.stl")) | |
{ | |
PngViewOptions options = new PngViewOptions("path/stl-output.png"); | |
viewer.View(options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment