Skip to content

tolerance entity parse #1339

Closed
Closed

Description

@ywu2014

my dwg file has some mechanical drawing symbol, as show below

Image

now i can read some info through
if entity.dxftype() == 'TOLERANCE': print(f'==============TOLERANCE type START==================') print('entity.dxf.__dict__: ', entity.__dict__) xdata = entity.xdata.data print('xdata: ', xdata) print(f"position: {entity.dxf.insert}") print(f'--------------TOLERANCE type END--------------')
console out like
==============TOLERANCE type START================== entity.dxf.__dict__: {'doc': <ezdxf.document.Drawing object at 0x7edc4170de10>, 'dxf': <ezdxf.entities.dxfns.DXFNamespace object at 0x7edc40833710>, 'appdata': None, 'reactors': None, 'extension_dict': None, 'xdata': <ezdxf.entities.xdata.XData object at 0x7edc41524c10>, 'proxy_graphic': None} xdata: {'ACAD': [DXFTag(1001, 'ACAD'), DXFTag(1000, 'DSTYLE'), DXFTag(1002, '{'), DXFTag(1070, 147), DXFTag(1040, 0.5625), DXFTag(1070, 340), DXFTag(1005, '815'), DXFTag(1070, 140), DXFTag(1040, 2.2817), DXFTag(1002, '}')]} position: (375.2867461217207, -68.91774163891198, 0.0) --------------TOLERANCE type END--------------
but how can i know which specific type is it, i means how can i distinct it is Concentricity or Position or Perpendicularity? i try to distinct by group code, but i didn't find corresponding group code.

Activity

  1. Repository owner locked and limited conversation to collaborators on Dec 24, 2025
  2. converted this issue into a discussion #1365 on Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions