]> 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)
committerika <ika@opencascade.com>
Mon, 13 May 2024 12:00:32 +0000 (13:00 +0100)
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 41c6e8788256fa86c748322c7a1e35915b162c33..ac50c771bb521d8ed6de7325eb9f3ff9d08c6bd1 100644 (file)
@@ -2394,12 +2394,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();