forked from 1b-agent/opencadstudio-upstream
`document.add_entity` only assigns the top-level handle, leaving inline sub-entities that carry their own — INSERT attributes and 3D-polyline vertices — with the source's handles. Copying such an entity therefore produced duplicate handles in the document, which corrupts the saved DWG so other CAD apps (QCAD, DWG TrueView) refuse to open it. Add `Scene::add_entity_clone` / `reset_clone_subhandles`, which allocate fresh handles for the entity and every inline sub-entity, and route all duplication paths through it: COPY/ARRAY/MIRROR-copy (via copy_entities) and clipboard paste. (#129) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>