Opened 5 years ago

Closed 5 years ago

#7049 closed defect (fixed)

DXF: Don't use OCS for the insertion point of MTEXT

Reported by: Alan Thomas Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: dxf


The DXF specification is vague on this point, but from experimentation with AutoCAD, the insertion point of MTEXT is in the global coordinate system, not the OCS.

See the attached DXF for differences between TEXT and MTEXT on this front. The correct display of this DXF is with 5 of the 6 objects (all except "TEXT extrusion 0.2,0.4,0.894427191, no 11/21/31") shown close to each other at 320000 metres east. However, OGR incorrectly positions one of the MTEXT objects elsewhere:

  Layer (String) = 0
  SubClasses (String) = AcDbEntity:AcDbMText
  ExtendedEntity (String) = ACAD_MTEXT_COLUMN_INFO_BEGIN     75      2     79      0     76      1     78      0     48 60.0     49 1.0     50      1 0.0 ACAD_MTEXT_COLUMN_INFO_END
  EntityHandle (String) = 622
  Text (String) = MTEXT extrusion 0.2,0.4,0.894427191
  Style = LABEL(f:"Arial",t:"MTEXT extrusion 0.2,0.4,0.894427191",s:1g,p:7,c:#000000)
  POINT Z (-2612219.70112002 -4508897.6494401 2600550.41193403)

The insertion point of TEXT *is* in the OCS, so the positioning of the TEXT objects in the file is correct.

Patch would be to remove this line.

Attachments (2)

mtext-ocs-reduced.dxf (6.1 KB ) - added by Alan Thomas 5 years ago.
mtext-ocs.png (13.6 KB ) - added by Alan Thomas 5 years ago.

Download all attachments as: .zip

Change History (4)

by Alan Thomas, 5 years ago

Attachment: mtext-ocs-reduced.dxf added

by Alan Thomas, 5 years ago

Attachment: mtext-ocs.png added

comment:1 by Alan Thomas, 5 years ago

Component: defaultOGR_SF
Keywords: dxf added
Version: unspecifiedsvn-trunk

comment:2 by Even Rouault, 5 years ago

Resolution: fixed
Status: newclosed

In 40171:

DXF: do not apply the OCS transformation for MTEXT (patch by atlight, fixes #7049)

Note: See TracTickets for help on using tickets.