Skip to content

Fix : GeometricExtents not working so used GetBoundingBox to get min an max point of entity

Choose a tag to compare

@Jones-peter Jones-peter released this 05 Jul 06:31
· 28 commits to master since this release

Sure! Here's a professional and concise GitHub issue response you can post to indicate the fix:


Resolved

The issue occurred because .GeometricExtents is unreliable for certain entity types (especially AcDbBlockReference) when accessed via COM in Python. It often raises <unknown>.GeometricExtents errors due to internal limitations in the AutoCAD COM API.

I've fixed this in the latest version of the library by replacing:

entity.GeometricExtents.MinPoint / MaxPoint

with:

entity.GetBoundingBox()

This method is much more stable and returns accurate extents even for block references, respecting rotation and scaling.

Please pull the latest version of the library — the get_block_extents() function now uses GetBoundingBox() internally.