diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/IGESCAFControl/IGESCAFControl_Reader.cxx index 062bf3c9bc..964be28343 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -127,12 +127,14 @@ static void AddCompositeShape (const Handle(XCAFDoc_ShapeTool)& theSTool, if( nbSimple && aHasCompositeSubShape) { theSTool->AddShape( aSimpleShape, Standard_False, Standard_False ); + TopoDS_Compound aNewShape; aB.MakeCompound(aNewShape); aB.Add(aNewShape, aSimpleShape); aB.Add(aNewShape,aCompShape); - //if (!aLoc.IsIdentity()) - // aNewShape.Location(aLoc ); + + if (!aLoc.IsIdentity()) + aNewShape.Location(aLoc ); aNewShape.Orientation(theShape.Orientation()); theSTool->AddShape( aNewShape, aHasCompositeSubShape, Standard_False ); } diff --git a/tests/bugs/iges/bug30356 b/tests/bugs/iges/bug30356 new file mode 100644 index 0000000000..b1104c7fbb --- /dev/null +++ b/tests/bugs/iges/bug30356 @@ -0,0 +1,11 @@ +puts "============" +puts "0030356: Data Exchange - IGES model after importing into document has location issues" +puts "============" + +XNewDoc d +ReadIges d [locate_data_file bug30356_GES-13500-000.igs] + +XShow d +vfit +vsetdispmode 1 +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/de/iges_2/F4 b/tests/de/iges_2/F4 index 2d2f3cdf36..504206b59e 100755 --- a/tests/de/iges_2/F4 +++ b/tests/de/iges_2/F4 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 30 ( 36 ) Warnings = 599 ( 1854 ) Summary = 629 ( CHECKSHAPE : Wires = 5 ( 6 ) Faces = 5 ( 6 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3499 ( 3499 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3499 ( 3499 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9816000285 ( 5.284023931 ) AvgTol = 0.02484143791 ( 0.02770136168 ) -LABELS : N0Labels = 12 ( 30 ) N1Labels = 3661 ( 3676 ) N2Labels = 0 ( 0 ) TotalLabels = 3673 ( 3706 ) NameLabels = 1379 ( 3694 ) ColorLabels = 3661 ( 3672 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.9816000285 ( 5.284023931 ) AvgTol = 0.02484144483 ( 0.02770136168 ) +LABELS : N0Labels = 12 ( 32 ) N1Labels = 3661 ( 3676 ) N2Labels = 0 ( 0 ) TotalLabels = 3673 ( 3708 ) NameLabels = 12 ( 3696 ) ColorLabels = 3661 ( 3672 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 10 ( 11 ) COLORS : Colors = BLUE1 DEEPSKYBLUE2 DODGERBLUE2 GREEN MAGENTA1 ORANGE ORANGERED RED TURQUOISE4 WHITE ( BLUE1 DEEPSKYBLUE2 DODGERBLUE2 GREEN MAGENTA1 ORANGE ORANGERED RED TURQUOISE4 WHITE YELLOW ) diff --git a/tests/de/iges_2/F5 b/tests/de/iges_2/F5 index aba702a0f4..477283ced2 100755 --- a/tests/de/iges_2/F5 +++ b/tests/de/iges_2/F5 @@ -14,11 +14,11 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 91 ( 91 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 91 ( 91 ) FreeWire = 304 ( 372 ) TOLERANCE : MaxTol = 0.0779303086 ( 0.07793030858 ) AvgTol = 6.708091639e-005 ( 0.0001034077705 ) -LABELS : N0Labels = 4 ( 38 ) N1Labels = 2509 ( 4252 ) N2Labels = 0 ( 0 ) TotalLabels = 2513 ( 4290 ) NameLabels = 2357 ( 2884 ) ColorLabels = 2509 ( 4217 ) LayerLabels = 249 ( 515 ) +LABELS : N0Labels = 4 ( 39 ) N1Labels = 2431 ( 4252 ) N2Labels = 0 ( 0 ) TotalLabels = 2435 ( 4291 ) NameLabels = 2357 ( 2885 ) ColorLabels = 2431 ( 4217 ) LayerLabels = 220 ( 515 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 7 ) COLORS : Colors = BLUE1 GREEN MAGENTA1 RED WHITE YELLOW ( BLUE1 CYAN1 GREEN MAGENTA1 RED WHITE YELLOW ) -NLAYERS : NLayers = 3 ( 4 ) -LAYERS : Layers = 255 30 50 ( 255 30 5 50 ) +NLAYERS : NLayers = 1 ( 4 ) +LAYERS : Layers = 50 ( 255 30 5 50 ) } diff --git a/tests/de/iges_2/F6 b/tests/de/iges_2/F6 index 50bf10c2b5..35bc1ba303 100755 --- a/tests/de/iges_2/F6 +++ b/tests/de/iges_2/F6 @@ -13,11 +13,11 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 7 ( 7 ) TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 5 ( 16 ) N1Labels = 284 ( 298 ) N2Labels = 0 ( 0 ) TotalLabels = 289 ( 314 ) NameLabels = 5 ( 27 ) ColorLabels = 284 ( 309 ) LayerLabels = 124 ( 309 ) +LABELS : N0Labels = 5 ( 17 ) N1Labels = 284 ( 298 ) N2Labels = 0 ( 0 ) TotalLabels = 289 ( 315 ) NameLabels = 5 ( 28 ) ColorLabels = 284 ( 309 ) LayerLabels = 0 ( 309 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 5 ) COLORS : Colors = RED WHITE ( CYAN1 GREEN RED WHITE YELLOW ) -NLAYERS : NLayers = 3 ( 4 ) -LAYERS : Layers = 1 2 3 ( 1 11 2 3 ) +NLAYERS : NLayers = 0 ( 4 ) +LAYERS : Layers = ( 1 11 2 3 ) }