رسومات STL
Contents
[
Hide
]تصدير تنسيق STL إلى PNG
تسمح Aspose.CAD لـ Python للمطورين بتصدير ملف STL إلى PNG. فيما يلي الكود الذي يوضح كيفية الوصول إلى ملف STL وتحويله إلى PNG باستخدام CadRasterizationOption و PngOptions.
عينة كود
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
import aspose.cad as cad; | |
cadImage = cad.Image.load("file.stl"); | |
rasterizationOptions = cad.imageoptions.CadRasterizationOptions() | |
rasterizationOptions.page_width = 1200 | |
rasterizationOptions.page_height = 1200 | |
pngOptions = cad.imageoptions.PngOptions() | |
pngOptions.vector_rasterization_options = rasterizationOptions | |
cadImage.save("result.png", pngOptions) |