According to the OCC example here, MyAisObject is a inherent class of AIS_InteractiveObject.
What I am trying to do is get the TopoDS_Shape from a MyAisObject class object, which should be the same as the one made in Compute() member function of MyAisObject class.
Now, I cannot directly downcast MyAisObject to AIS_Shape, and then get the TopoDS_Shape from AIS_Shape. The reason is because MyAisObject is in no relation to AIS_Shape.
I try to cast the MyAisObject to AIS_InteractiveObject first and then cast AIS_InteractiveObject to AIS_Shape. The result is a NULL Handle(AIS_Shape).
What I am trying to do is get the TopoDS_Shape from a MyAisObject class object, which should be the same as the one made in Compute() member function of MyAisObject class.
Now, I cannot directly downcast MyAisObject to AIS_Shape, and then get the TopoDS_Shape from AIS_Shape. The reason is because MyAisObject is in no relation to AIS_Shape.
I try to cast the MyAisObject to AIS_InteractiveObject first and then cast AIS_InteractiveObject to AIS_Shape. The result is a NULL Handle(AIS_Shape).