From: ika Date: Wed, 1 Feb 2017 16:17:48 +0000 (+0300) Subject: bug #88 The “Titleblock” view does not show anything X-Git-Tag: V_01_2017_06_30~25 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=7c10f53a43691d4c8eb8727895173c9ef4654866;p=occt-copy.git bug #88 The “Titleblock” view does not show anything --- diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 9bd93fa9e9..99dfb8bcf4 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -2577,6 +2577,13 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D // Create object for datum TDF_Label aDatL = aDGTTool->AddDatum(); myGDTMap.Bind(theDat, aDatL); + // bind datum label with all reference datum_feature entities + for (Standard_Integer i = 1; i <= aSAs.Length(); i++) { + Handle(StepRepr_ShapeAspect) aSA = aSAs.Value(i); + if (aSA.IsNull() || aSA->IsKind(STANDARD_TYPE(StepDimTol_DatumTarget))) + continue; + myGDTMap.Bind(aSA, aDatL); + } aDGTTool->Lock(aDatL); aDat = XCAFDoc_Datum::Set(aDatL); aDGTTool->SetDatum(aShapeLabels, aDatL); @@ -4311,6 +4318,9 @@ Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSes Handle(StepAP242_DraughtingModelItemAssociation)::DownCast(aDMIAIter.Value()); TDF_Label aGDTL; Standard_Boolean isFind = myGDTMap.Find(aDMIA->Definition().Value(), aGDTL); + if (!isFind) { + isFind = myGDTMap.Find(anIter.Value(), aGDTL); + } if (isFind) aGDTs.Append(aGDTL); }