Move the base point closer to the geometry #925
-
Hello, I have a question regarding Inserts and Blocks. During our development process, we've found some sample DXFs that have Insert entities which have a base_point away from the Insert center. This is what it looks like when I select the Insert in Autocad, the base point is far away from the center of the entity. Using the approach provided by this article: https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/When-inserting-a-block-into-an-AutoCAD-drawing-the-base-point-of-the-block-is-far-away-of-the-block-geometry.html we are able to manually move the base point closer to the geometry, but we need a way to do this using Ezdxf. Is this possible? When checking the Block of this specific Insert entity.
The result is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
Hi!
I looked at both solution and yes they can be replicated by
ezdxf
. I did not see that these solutions do update the block references itself but maybe this is done by AutoCAD automatically. If you move the base point, the existing block references will be positioned incorrectly.All solution need the new
ezdxf
version v1.1.Attached resources:
The block "CIRCLE" has the base point at the origin (0, 0, 0):
The first solution: moves all entities to the base point, existing block references are not updated. The new base point is defined by the center of the block bounding box (the center of the CIRCLE entity):