0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / Prs3d / Prs3d_ShapeTool.cxx
index cb67429..96feda1 100644 (file)
@@ -146,7 +146,7 @@ Standard_Boolean Prs3d_ShapeTool::IsPlanarFace() const
 
   if (TheType == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
     Handle(Geom_RectangularTrimmedSurface) 
-       RTS = *((Handle(Geom_RectangularTrimmedSurface)*)&S);
+       RTS = Handle(Geom_RectangularTrimmedSurface)::DownCast (S);
     TheType = RTS->BasisSurface()->DynamicType();
   }
   return (TheType == STANDARD_TYPE(Geom_Plane));