mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0030411: Data Exchange - attached model is exported as empty JT and VRML file
VrmlData_ShapeConvert::ConvertDocument() now handles reference labels within free shapes in the document.
This commit is contained in:
parent
7803c28d96
commit
3d999c6090
@ -862,13 +862,17 @@ void VrmlData_ShapeConvert::ConvertDocument(const Handle(TDocStd_Document) &theD
|
|||||||
for (TDF_LabelSequence::Iterator aRootIter(aFreeShapeLabels); aRootIter.More(); aRootIter.Next())
|
for (TDF_LabelSequence::Iterator aRootIter(aFreeShapeLabels); aRootIter.More(); aRootIter.Next())
|
||||||
{
|
{
|
||||||
const TDF_Label& aFreeShapeLabel = aRootIter.Value();
|
const TDF_Label& aFreeShapeLabel = aRootIter.Value();
|
||||||
if (aShapeTool->IsSimpleShape(aFreeShapeLabel))
|
if (aShapeTool->IsAssembly (aFreeShapeLabel))
|
||||||
{
|
{
|
||||||
addShape(aGroup, aFreeShapeLabel, theDoc);
|
addAssembly (aGroup, aFreeShapeLabel, theDoc, Standard_True);
|
||||||
}
|
}
|
||||||
else if (aShapeTool->IsAssembly(aFreeShapeLabel))
|
else if (aShapeTool->IsReference (aFreeShapeLabel))
|
||||||
{
|
{
|
||||||
addAssembly(aGroup, aFreeShapeLabel, theDoc, Standard_True);
|
addInstance (aGroup, aFreeShapeLabel, theDoc);
|
||||||
|
}
|
||||||
|
else if (aShapeTool->IsSimpleShape (aFreeShapeLabel))
|
||||||
|
{
|
||||||
|
addShape (aGroup, aFreeShapeLabel, theDoc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
tests/bugs/xde/bug30411
Normal file
13
tests/bugs/xde/bug30411
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
puts "================"
|
||||||
|
puts "0030411: Data Exchange - attached model is exported as empty JT and VRML file"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload XDE VISUALIZATION
|
||||||
|
restore [locate_data_file bug27821_nullsurf.brep] s
|
||||||
|
explode s F
|
||||||
|
XNewDoc D
|
||||||
|
XAddShape D s_6 0
|
||||||
|
WriteVrml D $imagedir/${casename}.wrl
|
||||||
|
loadvrml w $imagedir/${casename}.wrl
|
||||||
|
checktrinfo w -tri 18 -nod 20
|
Loading…
x
Reference in New Issue
Block a user