Hi,
is there a way to preserve layer colours when exporting dwg to glb? The glb that I create is always in greyscale.
Thanks in advance,
Vukas
Hi,
is there a way to preserve layer colours when exporting dwg to glb? The glb that I create is always in greyscale.
Thanks in advance,
Vukas
@vpajic,
Hello.
Please try if this is helpful:
using (Image cadImage = Aspose.CAD.Image.Load(fileName))
{
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor;
rasterizationOptions.PageWidth = 1600;
rasterizationOptions.PageHeight = 1600;
GlbOptions glbOptions = new GlbOptions();
glbOptions.VectorRasterizationOptions = rasterizationOptions;
cadImage.Save(outPath, glbOptions);
}
thanks for your quick reply!
Those were the same settings I used, but unfortunately the colours are only preserved when exporting to .pdf or .svg. When I inspect the output .glb file, it appears there is only one mesh that represents the entire drawing.
For reference, the test file I’m using is here: https://files.graebert.com/Marketing/Sample%20drawings/2019/Mechanical%20and%20Annotative.dwg
@vpajic,
we have created investigation issue CADNET-9826, will look what’s going on there during export.
@vpajic,
we can confirm the issue with colors for saving to GLB, and will work on the implementation of this feature.
Hi - is there a rough roadmap/timeline for this feature? Cheers.
@vpajic,
Hello,
this is planned for the next 24.11 release till the end of November, but we can not guarantee this.
Hello @oleksii.gorokhovatskyi ,
Do you have any update on this please?
We are closely looking at this feature to justify the purchase of a license.
@ninovismo,
Hi.
This feature is not yet available unfortunately, but work is in progress with it. Hope to complete it for 25.3 release till the end of March.
Thank you for the useful information, we’ll be looking forward with hope to the 25.3 release!
I have tried the new version of Aspose and I can see the colours are now correctly applied to the GLB file! Thank you very much, it feels like a big improvement!