ส่งออกด้วยตัวเลือก 3D
Contents
[
Hide
]ส่งออกด้วยตัวเลือก 3D
มีตัวเลือกบางอย่างที่ถูกนำเสนอเพื่อส่งออกโมเดล 3D ไปยัง PDF/raster จากรูปแบบ FBX, OBJ, STL ที่เกี่ยวข้อง
นี่คือตัวอย่างของฉาก 3D จากมุมมองที่แตกต่างกัน:
คุณสมบัติ ObserverPoint ช่วยให้สามารถหมุนฉาก 3D ตามมุมที่กำหนดรอบแกน ตัวอย่างนี้แสดงโค้ดและผลลัพธ์การส่งออกโดยใช้มุมการหมุนแบบสุ่มบางอย่าง
This file contains hidden or 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 (Image cadImage = Aspose.CAD.Image.Load(inputFileName)) | |
{ | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions() | |
{ | |
PageWidth = 5000, | |
PageHeight = 5000, | |
DrawType = CadDrawTypeMode.UseObjectColor, | |
ObserverPoint = new ObserverPoint(15, 5, 5), | |
}; | |
PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions(); | |
pdfOptions.VectorRasterizationOptions = rasterizationOptions; | |
cadImage.Save(outputFileName, pdfOptions); | |
} |
การเปลี่ยน ObserverAngle เป็น ObserverPoint = new ObserverPoint(5, 60, 0) จะช่วยให้หมุนฉากได้
คุณสมบัติ RenderMode3D อื่นช่วยให้สามารถระบุว่าผลลัพธ์การส่งออกควรจะแสดงผลอย่างไร มี 3 โหมด: Solid (ค่าเริ่มต้น), Wireframe, และ SolidWithEdges
ตัวอย่างด้านล่างช่วยให้สร้างโมเดล wireframe สำหรับวัตถุทรงกลม
This file contains hidden or 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 (Image cadImage = Aspose.CAD.Image.Load(fileName)) | |
{ | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions() | |
{ | |
PageWidth = 5000, | |
PageHeight = 5000, | |
DrawType = CadDrawTypeMode.UseObjectColor, | |
RenderMode3D = RenderMode3D.Wireframe | |
}; | |
PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions(); | |
pdfOptions.VectorRasterizationOptions = rasterizationOptions; | |
cadImage.Save(outputFileName, pdfOptions); | |
} |
ตัวอย่างด้านล่างแสดงความแตกต่างระหว่างโหมด Solid และ SolidWithEdges