mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0032914: Data Exchange - Some parts of compound are lost while writing STEP in nonmanifold mode
This commit is contained in:
parent
3bb90fed54
commit
43e50342ae
@ -1241,8 +1241,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
|
|||||||
Handle(StepRepr_HArray1OfRepresentationItem) newItems =
|
Handle(StepRepr_HArray1OfRepresentationItem) newItems =
|
||||||
new StepRepr_HArray1OfRepresentationItem(1, oldItems->Length() + 1);
|
new StepRepr_HArray1OfRepresentationItem(1, oldItems->Length() + 1);
|
||||||
Standard_Integer el = 1;
|
Standard_Integer el = 1;
|
||||||
for (Standard_Integer i = 1; i <= oldItems->Length(); i++)
|
for (Standard_Integer i = 1; i <= oldItems->Length(); i++)
|
||||||
newItems->SetValue( el++, oldItems->Value(i) );
|
newItems->SetValue(el++, oldItems->Value(i));
|
||||||
newItems->SetValue( el, items->Value( items->Length() ) );
|
newItems->SetValue( el, items->Value( items->Length() ) );
|
||||||
shapeRep->SetItems(newItems);
|
shapeRep->SetItems(newItems);
|
||||||
}
|
}
|
||||||
@ -1276,7 +1276,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
|
|||||||
return resbind;
|
return resbind;
|
||||||
} else return FP->Find(start);
|
} else return FP->Find(start);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : TransferCompound
|
//function : TransferCompound
|
||||||
@ -1381,11 +1381,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound
|
|||||||
Handle(Transfer_SimpleBinderOfTransient) bx =
|
Handle(Transfer_SimpleBinderOfTransient) bx =
|
||||||
Handle(Transfer_SimpleBinderOfTransient)::DownCast(bnd);
|
Handle(Transfer_SimpleBinderOfTransient)::DownCast(bnd);
|
||||||
if ( !bx.IsNull() ) {
|
if ( !bx.IsNull() ) {
|
||||||
// Single SDR is created for a non-manifold group (ssv: 12.11.2010)
|
binder->AddResult( TransientResult( bx->Result() ) );
|
||||||
if (!isManifold && i > 1)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
binder->AddResult( TransientResult( bx->Result() ) );
|
|
||||||
}
|
}
|
||||||
bnd = bnd->NextResult();
|
bnd = bnd->NextResult();
|
||||||
}
|
}
|
||||||
@ -1465,7 +1461,10 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape
|
|||||||
//:abv 20.05.02: see comment in TransferShape(): added "! iasdr ||"
|
//:abv 20.05.02: see comment in TransferShape(): added "! iasdr ||"
|
||||||
Handle(Transfer_Binder) resprod = TransientResult(sdr); //KA - OCC7141(skl 10.11.2004)
|
Handle(Transfer_Binder) resprod = TransientResult(sdr); //KA - OCC7141(skl 10.11.2004)
|
||||||
if ( ! iasdr || resbind.IsNull() ) {
|
if ( ! iasdr || resbind.IsNull() ) {
|
||||||
resbind = TransferShape(mapper, sdr, FP, shapeGroup, isManifold, theProgress);
|
Handle(Transfer_Binder) resbind1 = TransferShape(mapper, sdr, FP, shapeGroup, isManifold, theProgress);
|
||||||
|
if (resbind1.IsNull() || sdr->UsedRepresentation().IsNull())
|
||||||
|
return Handle(Transfer_Binder)();
|
||||||
|
resbind = resbind1;
|
||||||
Handle(Transfer_Binder) oldbind = FP->Find ( mapper );
|
Handle(Transfer_Binder) oldbind = FP->Find ( mapper );
|
||||||
if ( ! oldbind.IsNull() && !resbind.IsNull()) resbind->AddResult ( oldbind );
|
if ( ! oldbind.IsNull() && !resbind.IsNull()) resbind->AddResult ( oldbind );
|
||||||
FP->Bind (mapper,resbind);
|
FP->Bind (mapper,resbind);
|
||||||
|
19
tests/bugs/step/bug32914
Normal file
19
tests/bugs/step/bug32914
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
puts "==================================================="
|
||||||
|
puts " 0032914: Data Exchange - Some parts of compound are lost while writing STEP in nonmanifold mode "
|
||||||
|
puts "==================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
set BugNumber OCC32914
|
||||||
|
|
||||||
|
set filepath [locate_data_file ${BugNumber}.brep]
|
||||||
|
|
||||||
|
restore ${filepath} s
|
||||||
|
|
||||||
|
param write.step.nonmanifold 1
|
||||||
|
stepwrite 0 s ${imagedir}/${BugNumber}.step
|
||||||
|
|
||||||
|
testreadstep ${imagedir}/${BugNumber}.step result
|
||||||
|
|
||||||
|
checknbshapes result -vertex 16 -edge 17 -wire 7 -face 7 -shell 2 -solid 0 -compsolid 0 -compound 4 -shape 53
|
||||||
|
|
||||||
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user