New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibreCAD HATCH misrenders in AutoDesk software #1739
Comments
it's rendered correctly in the lastest development version. |
@dxli Yes, but not in the Autodesk software. My point is that the HATCH boundary geometry may be invalid, at least according to Autodesk, which, I believe, owns the DXF format. |
dxf format specifies:
Beyond that, we don't simulate Autodesk behaviors. In this particularly case, valid loops can be created from edges, so hatch is created this way. |
The DXF reference for HATCH SOLID is not very specific about the composition of boundary path data. There is much room for interpretation. So what LibreCAD can do is to prohibit the use of non intersecting/including multi loop boundaries for hatch. But somebody might see this as feature and will be disappointed when we change it. As we know the code how the hatch is created, we also have the working code to render this as expected. But we don't know the closed code from Autodesk, so it would require some valuable efforts to reverse-engineer the Autodesk code to find a way to create this special case of HATCH in a DXF. The conclusion is, that you simply create two hatch, one for each square, and you will have a DXF which is valid for OSGeo, Autodesk and LibreCAD. |
Expected behavior
The following hatched shape should render correctly in other software:
Observed behavior
Autodesk Viewer and Autodesk DWG True View, renders it incorrectly:
Converting it to GeoJSON, using the GDAL project, generates a invalid Polygon, see OSGeo/gdal#9240.
The problem appears to be that the Hatch entity in the DXF files contains a boundary formed by disjoint shapes, which is invalid? I am not well versed in the DXF specification, so I hope someone more experience here can answer that. It will also help with the GDAL issue above.
Steps to reproduce or sample file
Draw two disjoint rectangles. Choose Tool->Hatch. Select Both rectangles. Press Enter. Choose Solid Fill, and OK.
sample file: test.zip
Operating System and LibreCAD version info
It is actually Windows 11, but the About box reported it as Windows 10.
The text was updated successfully, but these errors were encountered: