From da0145636404e35f6b8ab1b35f20645eddab4c3b Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 15 Jul 2020 21:05:26 +0300 Subject: [PATCH] Fix for the problem of import Part crash when sketch with removed sketch elements. --- src/Model/Model_Document.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 7d9dabeae..6046533ab 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -388,6 +388,10 @@ bool Model_Document::importPart(const char* theFileName, if (isOk && !theCheckOnly) { // copy features from the temporary document to the current Handle(TDF_RelocationTable) aRelocTable = new TDF_RelocationTable(); + // add to relocation table source root label to the destination label because + // sometimes there could be a reference to root (issue 3267 on import part + // with sketch with removed features) + aRelocTable->SetRelocation(aTempDoc->Main().Root(), myDoc->Main().Root()); TDF_LabelList anAllNewFeatures; // Perform the copying twice for correct references: // 1. copy labels hierarchy and fill the relocation table -- 2.39.2