]> OCCT Git - occt.git/commitdiff
0033165: Data exchange - Instance name is not saved during writing step file CR0-76-Hybrid
authorvmigunov <viktor.migunov@opencascade.com>
Tue, 18 Oct 2022 08:07:46 +0000 (11:07 +0300)
committervmigunov <viktor.migunov@opencascade.com>
Tue, 18 Oct 2022 08:07:46 +0000 (11:07 +0300)
Instance name is saved also with identity location transformation

src/STEPControl/STEPControl_ActorWrite.cxx

index 73bb2f08ae26f787a0df9e291be6e6b24a8a02ca..7ac757f8e6370417b83a63a6cb2eea54db870bb4 100644 (file)
@@ -1569,8 +1569,10 @@ Handle(Transfer_Binder)  STEPControl_ActorWrite::TransferSubShape
   //   SINON, la shape est prise et transferee telle quelle
   TopoDS_Shape sh0 = shape;
   gp_Trsf aLoc;
+  Standard_Boolean isShapeLocated = Standard_False;
   if ( GroupMode() >0) {
     TopLoc_Location shloc = shape.Location();
+    isShapeLocated = !shloc.IsIdentity();
     aLoc = shloc.Transformation();
     TopLoc_Location shident;
     sh0.Location (shident);
@@ -1649,7 +1651,7 @@ Handle(Transfer_Binder)  STEPControl_ActorWrite::TransferSubShape
   myContext.NextIndex();
 
   // abv 16.10.00: bind CDSR (et al) to located shape in order to be able to track instances
-  if (mapper != start && aLoc.Form() != gp_Identity) {
+  if (mapper != start && isShapeLocated) {
     Handle(Transfer_Binder) bnd = FP->Find ( start );
     for ( Standard_Integer j=1; j <= roots->Length(); j++ ) 
       if ( bnd.IsNull() ) bnd = TransientResult ( roots->Value(j) );