Hello,
I am currently using “Aspose.3D for .NET” to convert CAD files in “3D PDF format” to the “Gltf format”. This works very well, only small errors occur in the CAD model due to the conversion. Maybe the reason is that the mesh is compressed too much.
In the photos you can see the original CAD model on the one hand and on the other hand the model after conversion to Gltf format.
original_CAD_model.jpg (74.2 KB)
mesh_after_conversion.jpg (69.9 KB)
Unfortunately I have not found a way to improve the quality during the conversion?
This is my current code:
System.Console.WriteLine("convert from '3d pdf' to 'gltf' ...");
Aspose.ThreeD.License license = new Aspose.ThreeD.License();
license.SetLicense("Aspose.3D.NET.lic");
var scn = Scene.FromFile(args[0]);
GltfSaveOptions opts = new GltfSaveOptions(FileContentType.Binary);
opts.MaterialConverter = delegate (Material material)
{
PhongMaterial m = (PhongMaterial)material;
return new PbrMaterial() { Albedo = new Vector3(m.DiffuseColor.x, m.DiffuseColor.y, m.DiffuseColor.z) };
};
scn.Save("output.glb", opts);
Thanks for any help.