1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0033165: Data exchange - Instance name is not saved during writing step file

Instance name is saved also with identity location transformation
This commit is contained in:
vmigunov
2022-10-19 12:15:09 +03:00
committed by smoskvin
parent f73592edf0
commit 3c9178dd5c
2 changed files with 44 additions and 1 deletions

View File

@@ -1595,8 +1595,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);
@@ -1676,7 +1678,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) );