1. 产品
  2.   3D
  3.   GO
  4.   Aspose.3D Cloud Go SDK

Aspose.3D Cloud Go SDK

 
 

Go REST SDK 用于生成、编辑和转换 3D 文件

一个多功能的 3D 解决方案,使软件工程师能够创建、编辑、操作并将 3D 文件格式(STL、OBJ、FBX)转换为 PDF,并通过 Go REST API 渲染 3D 实体。

什么是 Aspose.3D Cloud Go SDK?

在现代基于云的开发中,功能性和效率是关键——尤其是在处理 3D 内容时。Aspose.3D Cloud Go SDK 是一个强大的免费 Go 3D API 和开源 Go 3D 库,使开发者能够轻松创建 STL 3D 图纸、使用 Go 转换 3D 文件,并向 3D 文件添加截面。该多功能工具包简化了复杂 3D 图形渲染的处理,提供纹理和材质编辑、动画定义、模型旋转和缩放、合并多个 3D 对象以及精确变换等功能。凭借高质量的渲染能力,开发者可以渲染 3D 文件实体,实现逼真的视觉输出,非常适合在云端制作丰富、交互式的 3D 体验。

SDK 最大的优势之一是其强大的转换支持,能够无缝转换 FBX、STL、OBJ、3DS、U3D、DAE、GLTF、PLY、JT、DXF、VRML、HTML、PDF 等格式——让使用 3D OBJ 和 FBX 变得轻松,或在无需额外工具的情况下将 3D 文件转换为 PDF。基于云的集成确保了轻松协作、跨平台可访问性以及与其他云服务的顺畅交互。凭借其可扩展性、安全性和面向开发者的文档,Aspose.3D Cloud Go SDK 使软件开发者能够构建支持多格式转换、高质量渲染和灵活 3D 数据操作的高级 3D 应用程序——完美用于随时随地创建、转换和可视化专业 3D 模型。

Previous Next

Aspose.3D Cloud Go SDK 入门指南

推荐的 Aspose.3D Cloud Go SDK 安装方式是使用 GitHub。请使用以下命令进行顺利安装。

通过 GitHub 安装 Aspose.3D Cloud Go SDK

go get https://github.com/Aspose-3D-Cloud/aspose-3d-cloud-go.git 
您也可以直接从 Aspose 产品页面 下载。

通过 Go API 将 3D 文件转换为 PDF

Aspose.3D Cloud Go SDK 在仅用几行 Go 代码即可无缝转换不同格式的 3D 文件方面表现出色。软件开发人员可以轻松地将 STL、OBJ、FBX、3DS、U3D、DRC、RVM、DXF、3MF 等多种格式的文件进行转换。此功能不仅节省时间,还消除了为不同格式安装多套软件的需求。只需几行代码,开发者即可将此转换功能集成到他们的应用程序中,确保在各种平台上的兼容性。以下示例展示了软件开发人员如何在 Go 应用中将 3D 文件转换为 PDF 文件格式。

如何使用 Go REST API 将 3D 文件转换为 PDF 文件?

// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).

threeDCloudApi , ctx, _ := api.NewThreeDCloudApiService("MY_CLIENT_ID", "MY_CLIENT_SECRET", "ap.aspose.cloud")
	
response, httpResponse, err := threeDCloudApi.PostConvertByFormat("sample.3d", "pdf", "output.pdf")

全面的 3D 文件格式支持

Aspose.3D Cloud Go SDK 是一个非常易于使用的 REST SDK,使软件开发人员能够在 Go 应用中创建和管理 3D 文件。该 SDK 兼容范围广泛,支持众多 3D 文件格式,确保开发者可以使用常用的 FBX、STL、OBJ、3DS、U3D、DRC、RVM、PDF、AMF、PLY、DXF、3MF、VRML、HTML 等格式。这种多功能性消除了复杂的转换过程,让开发者专注于创建创新的 3D 应用。

云端高质量 3D 渲染

精确渲染 3D 模型并提供高质量视觉效果对许多应用至关重要。Aspose.3D Cloud Go SDK 已全面支持在 Go 应用程序中加载和渲染 3D 图形。该 SDK 提供先进的渲染功能,使软件开发人员能够生成逼真的 3D 模型图像。无论是用于仿真、建筑可视化还是游戏,Aspose.3D Cloud Go SDK 的渲染特性都确保最终用户体验令人印象深刻。

如何使用 Go API 渲染 3D 文件实体?

package aspose3dcloud
// PdfRenderMode : Render mode specifies the style in which the 3D artwork is rendered.
type PdfRenderMode int32

// List of PdfRenderMode
const (
	PdfRenderMode_Solid PdfRenderMode = 0
	PdfRenderMode_SolidWireframe PdfRenderMode = 1
	PdfRenderMode_Transparent PdfRenderMode = 2
	PdfRenderMode_TransparentWireframe PdfRenderMode = 3
	PdfRenderMode_BoundingBox PdfRenderMode = 4
	PdfRenderMode_TransparentBoundingBox PdfRenderMode = 5
	PdfRenderMode_TransparentBoundingBoxOutline PdfRenderMode = 6
	PdfRenderMode_Wireframe PdfRenderMode = 7
	PdfRenderMode_ShadedWireframe PdfRenderMode = 8
	PdfRenderMode_HiddenWireframe PdfRenderMode = 9
	PdfRenderMode_Vertices PdfRenderMode = 10
	PdfRenderMode_ShadedVertices PdfRenderMode = 11
	PdfRenderMode_Illustration PdfRenderMode = 12
	PdfRenderMode_SolidOutline PdfRenderMode = 13
	PdfRenderMode_ShadedIllustration PdfRenderMode = 14
)

通过 Go API 进行 3D 操作与转换

Aspose.3D Cloud Go SDK 允许软件开发人员在 Go 应用程序中轻松加载、操作和转换 3D 模型。该库提供了一系列用于操作 3D 模型的工具。开发人员可以使用 SDK 直观的方法轻松进行平移、旋转、缩放,甚至合并多个模型。此功能简化了开发流程,使开发者能够将创意愿景付诸实现,并在无需依赖外部工具的情况下微调模型,最终提升开发效率。下面的示例展示了如何使用 Go 命令对 3D 实体进行变换。

如何使用 Go REST API 对 3D 图形应用变换?

type Transform struct {
	// Gets or sets the translation
	Translation *Vector3 `json:"Translation,omitempty"`
	// Gets or sets the scale
	Scale *Vector3 `json:"Scale,omitempty"`
	// Gets or sets the pre-rotation represented in degree
	PreRotation *Vector3 `json:"PreRotation,omitempty"`
	// Gets or sets the post-rotation represented in degree
	PostRotation *Vector3 `json:"PostRotation,omitempty"`
	// Gets or sets the rotation represented in euler angles, measured in degree             
	EulerAngles *Vector3 `json:"EulerAngles,omitempty"`
}
 中国人