Skip to content
Discussion options

You must be logged in to vote

There is a way to explode clipped block references.

It is not possible to clip arbitrary DXF entities with ezdxf but it is possible by using the drawing add-on and the DXFBackend.
This process converts all entities inside the clipped block reference into drawing primitives. The clipping path is applied to the drawing primitives and the result is exported as DXF entities.

These new DXF entities are not related to the input entities! The layer is preserved but everything else is lost e.g. dashed lines will be exploded into short solid lines, similar to importing PDF files.

import ezdxf
from ezdxf import xclip
from ezdxf.addons.drawing import Frontend, RenderContext, dxf


def main():
    doc =

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cococosusu
Comment options

Answer selected by cococosusu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants