1. Products
  2.   3D
  3.   .NET
  4.   Aspose.3D for .NET

Aspose.3D for .NET

 
 

C# .NET API to Create, Edit & Convert 3D Diagrams

A useful Computer-Aided-Designing (CAD) API that enables software developers to create, manipulate, and export 3D files in a variety of formats.

Aspose.3D for .NET is a feature-rich Computer-Aided-Designing (CAD) API that allows .NET developers to create and manipulate files in a variety of file formats without the 3D modeling and rendering software being installed on the machine. The library can easily integrate 3D functionality into its .NET applications, allowing them to create stunning visualizations and designs. With a simple and intuitive API, developers can quickly and easily integrate 3D functionality into their .NET applications, without the need for complex coding or 3D expertise.

Aspose.3D for .NET has included support for various basic as well as advanced 3D features, such as hierarchical transformations, animation interpolation, and mesh geometry processing. The library can open, read, write, manipulate, and convert 3D files in some popular file formats such as FBX, STL, Collada, AMF, PLY, GLTF, OBJ, and 3DS. The library is very easy to handle and designed to perform equally well on the server as well as on the client side. Moreover, it allows developers to work with a variety of different 3D models and assets, making it easy to integrate 3D functionality into their applications.

Aspose.3D for .NET offers a wide arrange of features for working with 3D files, such as creating a 3D scene, loading files from the stream, saving & converting files to a stream, working with geometry, sharing mesh geometry data between multiple nodes, animation property addition to scene document, adding a target camera in the scene, splitting meshes by material, rendering a 3D view, creation of cylinder, creating geometry by extruding shapes and many more. Whether developers are looking for generating stunning 3D visualizations, design interactive 3D applications, or simply add some 3D functionality to their existing .NET applications, Aspose.3D is the best choice to get the job done.

Previous Next

Getting Started with Aspose.3D for .NET

The recommend way to install Aspose.3D for .NET is using NuGet. Please use the following command for a smooth installation.

Install Aspose.3D for .NET via NuGet

dotnet add package Aspose.3D --version 23.2.0 
You can also download it directly from Aspose product page.

Generate & Save 3D Scene Programmatically via C# .NET API

Aspose.3D for .NET gives software developers the capability to generate new 3D scenes from the scratch and then save in any supported file format inside their own C# applications. The library allows loading existing 3D scenes, add asset information, changing plane orientation, accessing its properties, make changes to it and save it in various popular file formats such as PDF, HTML, and so on. The library also allows saving 3D document in different 3D formats, such as FBX, STL, DAE, RVM, OBJ, 3DS, DRC and so on.

Generate a 3D Scene Document via .NET API

var output = RunExamples.GetOutputFilePath("document.fbx");
// Create an object of the Scene class
Scene scene = new Scene();
// Save 3D scene document
scene.Save(output, FileFormat.FBX7500ASCII);

Convert 3D Document to Other File Formats via .NET

Aspose.3D for .NET allows computer programmers to open and convert 3D document in various supported file formats inside their own .NET applications. Using C# 3D document processing library you just need to load a 3D document in any supported file formats and call its save method with an appropriate FileFormat parameter. The library supports 3D scene conversion to PDF, HTML, FBX, DAE, 3DS, DRC, GLTF, OBJ, STL, RVM and many more.

Export 3D Document to Other File Formats via C# API

// load the file to be converted
var scn = new Aspose.ThreeD.Scene(dir + "template.fbx");
// save in different formats
scn.Save(dir + "output.stl", Aspose.ThreeD.FileFormat.STLASCII);
scn.Save(dir + "output.obj", Aspose.ThreeD.FileFormat.WavefrontOBJ);

Create and Manage 3D Mesh via .NET API

Aspose.3D for .NET gives software developers the capability to work with 3D Meshes inside their own C# applications. The library allows generating a mesh of various 3D geometric shapes, defining control points and polygons in the simplest way to create meshes. The library also supports sharing mesh geometry data with multiple nodes which will help in better memory management. It support several important features such as merging and splitting meshes in 3D file, generating normal data for all meshes in a 3D file, encoding 3D mesh in the Google Draco file, converting mesh of a single 3D object in PLY file, convert mesh to triangle mesh and primitive shape to mesh and so on.

Splitting All Meshes of a Scene per Material via .NET API

// Create a mesh of box(A box is composed by 6 planes)

Mesh box = (new Box()).ToMesh();
// Create a material element on this mesh
VertexElementMaterial mat = (VertexElementMaterial)box.CreateElement(VertexElementType.Material, MappingMode.Polygon, ReferenceMode.Index);
// And specify different material index for each plane
mat.Indices.AddRange(new int[] { 0, 1, 2, 3, 4, 5 });
// Now split it into 6 sub meshes, we specified 6 different materials on each plane, each plane will become a sub mesh.
// We used the CloneData policy, each plane will has the same control point information or control point-based vertex element information.
Mesh[] planes = PolygonModifier.SplitMesh(box, SplitMeshPolicy.CloneData);
mat.Indices.Clear();
mat.Indices.AddRange(new int[] { 0, 0, 0, 1, 1, 1 });
// Now split it into 2 sub meshes, first mesh will contains 0/1/2 planes, and second mesh will contains the 3/4/5th planes.
// We used the CompactData policy, each plane will has its own control point information or control point-based vertex element information.
planes = PolygonModifier.SplitMesh(box, SplitMeshPolicy.CompactData);

Insert & Edit Text in Visio Diagrams via .NET API

Aspose.3D for .NET allows software developers to working with Visio in different ways inside Visio Diagrams using .NET library. The C# library has include different features for handling text in shapes, such as inserting text shape, customize text shape in the Visio diagram, update the shape’s text, find and replace the shape’s text, apply Built-in or custom style-sheet to text, apply different style on the each text value of a shape, extract plain Text from the Visio diagram page and many more.

Setup the Target Camera in 3D File via .NET API

// Initialize scene object
Scene scene = new Scene();
// Get a child node object
Node cameraNode = scene.RootNode.CreateChildNode("camera", new Camera());
// Set camera node translation
cameraNode.Transform.Translation = new Vector3(100, 20, 0);
cameraNode.GetEntity().Target = scene.RootNode.CreateChildNode("target");
var output = RunExamples.GetOutputFilePath("camera-test.3ds");
scene.Save(output, FileFormat.Discreet3DS);