Convert from DXF to GLTF/GLB

Hi there,

I’m trying to convert a dxf file into a gltf/glb file.

I tried to use the aspose .net examples but the project is outdated and set for .NET 4.0. To access GLTF, we need .NET 6.0. I created a sample project but when I output the GLB/GLTF file, the data is always empty.

using Aspose.CAD;
using Aspose.ThreeD;
using Aspose.ThreeD.Formats;
using License = Aspose.ThreeD.License;

string dataDir = @"c:\dev\temp\aspose\ConsoleApp1\";

License license = new();
license.SetLicense(dataDir + "Aspose.Total.Product.Family.lic");

Aspose.CAD.License cadLicense = new();
cadLicense.SetLicense(dataDir + "Aspose.Total.Product.Family.lic");

try
{

Scene scene = new Scene(dataDir + "conic_pyramid.dxf");

// Instantiate GLTFSaveOptions class object.
GltfSaveOptions saveOptions = new GltfSaveOptions(Aspose.ThreeD.FileFormat.GLTF2);
// OR GLTF2_BINARY

// Set different properties.
saveOptions.EmbedAssets = true;
saveOptions.SaveExtras = true;

// Convert DXF to GLTF GLB file with Save method.
scene.Save(dataDir + "Output.gltf", saveOptions);
}
    catch (Exception ex)
{
    Console.WriteLine(ex.Message);  
}


I do not receive any exceptions but I do get an output of 1KB where the glb/gltf is empty.

@ewong

Can you please share your sample source file with us as well? We will test the scenario in our environment and address it accordingly.

Sample-GLTF-bug.zip (13.8 KB)

Please find attached.

@ewong

An issue as THREEDNET-1295 has been logged in our issue tracking system for the sake of correction. We will look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as THREEDNET-1295) have been fixed in this update. This message was posted using Bugs notification tool by Aspose.3D team.