]> OCCT Git - occt.git/commitdiff
Data Exchange, Step Import - Incorrect computing of PMI text location
authordpasukhi <dpasukhi@opencascade.com>
Thu, 3 Mar 2022 10:19:16 +0000 (13:19 +0300)
committerdpasukhi <dpasukhi@opencascade.com>
Thu, 3 Mar 2022 10:20:54 +0000 (13:20 +0300)
Fixed problem with too large box of the representation. In this case incorrect annotation plane is used as internal location.

src/STEPCAFControl/STEPCAFControl_Reader.cxx

index 5222f3a91222836d5b25f4360ac5dcc7bf2ad4f2..c2e825b11c0b239a8971cedf0ddd5b0e1171b5cf 100644 (file)
@@ -2043,12 +2043,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR,
   {
     Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
     aBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-    if (isHasPlane && !aBox.IsOut(aPlaneAxes.Location())) {
-      aPtext = aPlaneAxes.Location();
-    }
-    else {
-      aPtext = gp_Pnt((aXmin + aXmax) * 0.5, (aYmin + aYmax) * 0.5, (aZmin + aZmax) * 0.5);
-    }
+    aPtext = gp_Pnt((aXmin + aXmax) * 0.5, (aYmin + aYmax) * 0.5, (aZmin + aZmax) * 0.5);
   }
   else {
     aPtext = aPlaneAxes.Location();