Sun, 03/22/2020 - 17:42
Hello. I've got the following code fragment, in which I'm trying, in several ways, to detect to which layer[s] a shape is assigned:
TDF_LabelSequence Labels; LayerTool->GetLayerLabels(Labels); std::cout<<Labels.Size()<<std::endl;
for (Standard_Integer i=1;i<=Labels.Size();++i)
std::cout<<LayerTool->IsSet(Shape,Labels(i))<<" ";
std::cout<<std::endl;
Handle(TColStd_HSequenceOfExtendedString) aLayerS; Standard_Boolean a=LayerTool->GetLayers(Shape,aLayerS);
std::cout<<a; if (a) std::cout<<" "<<aLayerS->Size(); std::cout<<std::endl;
All of them work on 7.3.0, but don't on 7.4.0.
I tracked this to the changes in XCAFDoc_ShapeTool::FindShape (XCAFDoc_ShapeTool.cxx:291).
Is this a regression? Would taking the previous version of this method have any side-effect?
Or am I doing it wrong? Is any of the above a supported way to get shape's layer info? How should I do it instead?
Thanks in advance.
Sun, 03/22/2020 - 20:28
This is difficult to tell straight ahead, as provided code snippet looks incomplete.
If you can provide a reproducible test case (with all necessary details, including a shape), then you may register an issue on Bugtracker:
https://dev.opencascade.org/index.php?q=home/get_involved
I suppose you are referring to the following commit, you can use git to traverse OCCT history: