We're sorry AsposeApp doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.app

After convert DWG to SVG some point is different from source

I try to convert dwg to svg then some point is not same source file
image.jpg (235.1 KB)

my code is: (.net core 3.1, Aspose.CAD

 using (var stream = file.InputStream)
            using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(stream))
                // Create an instance of CadRasterizationOptions
                CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();

                // Set page width & height
                rasterizationOptions.PageWidth = size;
                rasterizationOptions.PageHeight = size;
                rasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor;

                // Set Graphic Options
                rasterizationOptions.GraphicsOptions.SmoothingMode = SmoothingMode.HighQuality;
                rasterizationOptions.GraphicsOptions.TextRenderingHint = Aspose.CAD.TextRenderingHint.ClearTypeGridFit;
                rasterizationOptions.GraphicsOptions.InterpolationMode = InterpolationMode.High;

                // Create an instance of JpegOptions for the resultant image
                var optionJpg = new JpegOptions();
                var optionSvg = new SvgOptions();

                // Set rasterization options
                optionJpg.VectorRasterizationOptions = rasterizationOptions;
                optionSvg.VectorRasterizationOptions = rasterizationOptions;
                optionSvg.MinimumLinewidth = 0;

                // CAD to JPG
                //image.Save(jpgFileNameWithFullPath, optionJpg);
                image.Save(jpgFileNameWithFullPath, optionSvg);

            return new ContentResult
                Content = $@"\Content\cf-images\{jpgFileName}"

This topic has been moved to the related forum: https://forum.aspose.com/t/after-convert-dwg-to-svg-some-point-is-different-from-source/237703