-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Dxf/wipeout : support the translation of WIPEOUT entities #11720
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # ogr/ogrsf_frmts/dxf/KNOWN_ISSUES.md
CC @atlight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nicely, just a few comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jwohnlf could you please PURGE this file and downsave it to an earlier AutoCAD version to reduce the file size? There doesn't seem to be any loss of functionality when I downsave to AutoCAD 2000. After "purging all" three times and saving in 2000 format, the file size is only 194 KB - and it can be reduced further by manually deleting the XRECORD entity at the end with all the RTVS garbage.
/* Group codes 10, 20 and 30 control the insertion point of the lower */ | ||
/* left corner of your image. */ | ||
case 10: | ||
if (bHaveX && bHaveY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this if
block needed? I don't see any reason why there would ever be more than one 10,20 point
break; | ||
|
||
case 20: | ||
if (bHaveX && bHaveY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment
@@ -160,6 +160,9 @@ The following entity types are supported: | |||
label. Block content for MULTILEADERS is treated as for INSERT. | |||
Spline leaders are tessellated into line segments. | |||
|
|||
- WIPEOUT: a light support of WIPEOUT entities can parse the outline | |||
geometry of WIPEOUT entities and translate it into a POLYGON feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should make it clear this is 2D support only - Z coordinates are ignored
break; | ||
|
||
case 71: | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DXF spec seems to say that the format of the 14,24 points is different when 71 is set to 1 (as opposed to 2). I can't get AutoCAD to generate 71 = 1 WIPEOUTS, but QCAD claims to be able to do it. If you're not going to implement support for 71 = 1, you should at least output a warning and ignore the rest of the entity, rather than translating the geometry wrongly.
case 24: | ||
if (bHaveX && bHaveY) | ||
{ | ||
smoothPolyline.AddPoint(dfXOffset + (0.5 + dfX) * dfXscale, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the final vertex will never be added. I can see why you have chosen to write it this way, but it should be explicitly mentioned in a comment somewhere in case someone thinks it's a mistake.
DXF: new function adding a light support for parsing WIPEOUT DXF entities. This feature is now able to translate the outer line of WIPEOUT entities to get them in the output data.
Fixes #11022