Issue with raster rendering dxf files with text

They are not the same. The pdf and bitmap are the same. However, the cad file is not the same as the both the pdf and bitmap. So the rendering is the same for both the pdf and bitmap. But it does not match the the AUTOCad drawing. I have attached the AutoCAD dxf in the zip file with rendered bitmap. You will notice that does not follow the hidden line arc properly. This is a issue.

Test.pdf (16.1 KB)
Test.zip (140.1 KB)
Test.png (1.6 KB)
Test.png (1.6 KB)

@tkruse,

We have investigated the issue related to hidden line arcs on our end. If we get you right, some lines are not tracking because of following code lines:

Please comment the following layer names in RasterizationOptions’s layer list

           rasterizationOptions.Layers.Add("Print") 
           rasterizationOptions.Layers.Add("L1_RegMark") 
           rasterizationOptions.Layers.Add("L2_RegMark") 

When you will add Layers to export, other layers will be ignored when exporting to image. So for exporting whole image just remove these lines. Please perform the suggestions on your end or otherwise share your feedback if we have pointed differently to hidden line arc.

Public Shared Sub TestExport()
	Dim path As [String] = "C:\Cad Data\"
	If Aspose.CAD.Image.CanLoad(path + "2969 Laser and Printer Layout.dwg") Then
		' Load a CAD drawing in an instance of Image
		Using cadImage As Aspose.CAD.FileFormats.Cad.CadImage = DirectCast(Aspose.CAD.Image.Load(path + "2969 Laser and Printer Layout.dwg"), Aspose.CAD.FileFormats.Cad.CadImage)
			cadImage.UpdateSize()
			' Create an instance of CadRasterizationOptions
			Dim rasterizationOptions As dynamic = New CadRasterizationOptions()
			'set rasterization properties
			rasterizationOptions.PageHeight = cadImage.Height
			rasterizationOptions.PageWidth = cadImage.Width

			' Set Graphics options
			rasterizationOptions.GraphicsOptions.InterpolationMode = InterpolationMode.NearestNeighbor
			rasterizationOptions.GraphicsOptions.SmoothingMode = SmoothingMode.HighQuality

			rasterizationOptions.UnitType = UnitType.MicroInch
			rasterizationOptions.PageHeight = cadImage.Height * 10
			rasterizationOptions.PageWidth = cadImage.Width * 10

			' Add the layer name to the RasterizationOptions's layer list
			'  rasterizationOptions.Layers.Add("Print");
			'  rasterizationOptions.Layers.Add("L1_RegMark");
			'  rasterizationOptions.Layers.Add("L2_RegMark");
			' Create an instance of BmpOptions class

			Dim BmpOptions As dynamic = New BmpOptions()
			'reate an instance of CadRasterizationOptions and set its various properties
			BmpOptions.VectorRasterizationOptions = rasterizationOptions
			BmpOptions.HorizontalResolution = 96
			BmpOptions.VerticalResolution = 96

			' Export each layer to Jpeg format
			cadImage.Save(path + "Saved.bmp", BmpOptions)
		End Using
	End If
End Sub

OK. Something is getting lost in translation here. I will make it simple. It’s not a layer issue. It’s all about rendering hidden polylines where it removes the arcs. Take this dxf file and export as a bitmap. I have everything on layer 0. Layers do not matter. It’s all about rendering the hidden polyline with arcs correctly.

Test.zip (109.0 KB)

’ Load a CAD drawing in an instance of Image
'Using cadImage = Aspose.CAD.Image.Load(sourceFilePath)
Using cadImage As Aspose.CAD.FileFormats.Cad.CadImage = DirectCast(Aspose.CAD.Image.Load(sourceFilePath), Aspose.CAD.FileFormats.Cad.CadImage)
cadImage.UpdateSize()
’ Create an instance of CadRasterizationOptions
Dim rasterizationOptions = New CadRasterizationOptions()
'set rasterization properties
rasterizationOptions.UnitType = UnitType.MicroInch
rasterizationOptions.PageHeight = cadImage.Height * 10
rasterizationOptions.PageWidth = cadImage.Width * 10

                ' Set Graphics options
                rasterizationOptions.GraphicsOptions.InterpolationMode = InterpolationMode.HighQualityBicubic
                rasterizationOptions.GraphicsOptions.SmoothingMode = SmoothingMode.HighQuality
                rasterizationOptions.GraphicsOptions.TextRenderingHint = TextRenderingHint.AntiAlias

                ' Add the layer name to the RasterizationOptions's layer list
                ' rasterizationOptions.Layers.Add("Print")
                ' rasterizationOptions.Layers.Add("L1_RegMark")
                ' rasterizationOptions.Layers.Add("L2_RegMark")

                ' Create an instance of BmpOptions class
                Dim BmpOptions = New BmpOptions
                'create an instance of CadRasterizationOptions and set its various properties
                BmpOptions.VectorRasterizationOptions = rasterizationOptions
                BmpOptions.HorizontalResolution = 600
                BmpOptions.VerticalResolution = 600
                'Dim emumeration = New BitmapCompression

                ' BmpOptions.Compression = BitmapCompression.Rle4

                'Set File name output string
                Dim strFileName() As String = Split(_sourceFilePath, "\", -1, CompareMethod.Text)
                Dim strTempFileName As String = strFileName.Last
                Dim intLen As Integer = strTempFileName.Length
                _FileName = Mid(strTempFileName, 1, (intLen - 4))
                ' Export each layer to Jpeg format
                MyDir = MyDir & Convert.ToString(_FileName + ".bmp")
                cadImage.Save(MyDir, BmpOptions)
            End Using

Any thoughts?

@tkruse,

We are investigating the issue on our end and will get back to you as soon as possible.

@tkruse,

I have observed your comments related to missing rendering of dashed hidden blue lines in of attached images for exported BMP and PDF. This is a missing feature in API and an issue with ID CADNET-450 has been added in our issue tracking system to provide the requested support. This thread has been linked with the issue so that we may share notification with you once support will be available.

Cad_Hidden.png (8.6 KB)
Rounded_Hidden.png (13.2 KB)

When do we expect some answers on this issue? I am on time table to finish the project that is using this feature.

@tkruse,

The issue we have been discussing recently has just been logged in our issue tracking system as new feature request. This is a missing feature in API and our product team shall investigate this on their end and will then be able to provide any ETA for availability of support. I request for your patience till the time further feedback is shared by our product team.

Looking for feed back. I need some type of schedule when this issue will be resolved. I have deadline and looking to update bosses on schedule. Thanks.

@tkruse,

I have verified from our issue tracking system and regret to share that the concerned issue are still unresolved. The solution for issues related to text and barcode rendering has already been shared with you. The other issues related to dashed lines and hidden lines rendering are missing support in API. Our product team shall be investigating and scheduling the issues on their due turn to include support in API. I request for your patience till the time further feedback is shared by our product team.

Ok. However, patience’s only can go so far with management wanting a project done. This a big deal that will make or break our project. Again is something more that can be done here to speed up the process?

@tkruse,

I can suggest you to consider paid support services in support options to expedite the issue resolution process. You can also consult our sales team as well in Aspose.Purchase forum to get further information related to paid support services.

Is there any hope of making hidden line to render the same as regular line type soon?

@tkruse,

We are sorry for your inconvenience. As shared earlier the concerned issue is a missing feature in API and it will take some time to implement the support. At present the issue is pending in investigation queue for our product team and they will be scheduling the implementation as soon as possible. We will share the good news with you as soon as the feature will be included in API.

The issues you have found earlier (filed as CADNET-433) have been fixed in Aspose.CAD for .NET 17.12. Please try using the latest release version and in case you experience any issue or you have any further query, please feel free to contact.

The issues you have found earlier (filed as CADNET-443) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz