I tried to use the following code to get the AIS_Shape out
But the judgment method confuses me, the return result is not a AIS_Shape
Is there any good solution for this situation?
thank you
//------------------------------------------
Handle(AIS_Shape) anAIS_Shape = Handle(AIS_Shape):ownCast(gfxObject);
if (anAIS_Shape.IsNull()) {
std::cout << "anAIS_Shape is null" << std::endl;
}
if (gfxObject->IsKind(STANDARD_TYPE(AIS_Shape)))
{
std::cout << "gfxObject is shape" << std::endl;
Handle(AIS_Shape) anAIS_Shape = Handle(AIS_Shape):ownCast(gfxObject);
}
else
{
std::cout << "gfxObject not shape" << std::endl;
}
//------------------------------------------
But the judgment method confuses me, the return result is not a AIS_Shape
Is there any good solution for this situation?
thank you
//------------------------------------------
Handle(AIS_Shape) anAIS_Shape = Handle(AIS_Shape):ownCast(gfxObject);
if (anAIS_Shape.IsNull()) {
std::cout << "anAIS_Shape is null" << std::endl;
}
if (gfxObject->IsKind(STANDARD_TYPE(AIS_Shape)))
{
std::cout << "gfxObject is shape" << std::endl;
Handle(AIS_Shape) anAIS_Shape = Handle(AIS_Shape):ownCast(gfxObject);
}
else
{
std::cout << "gfxObject not shape" << std::endl;
}
//------------------------------------------