#include <AIS.hxx>
#include <AIS_Shape.hxx>
-#include <AIS_Drawer.hxx>
#include <BRep_Tool.hxx>
#include <Select3D_SensitiveCurve.hxx>
#include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx>
+#include <SelectMgr_Selection.hxx>
#include <TColStd_ListIteratorOfListOfTransient.hxx>
if ( isCircle ) // case of Circles
{
- Handle(Geom_Circle) thecirc = (Handle(Geom_Circle)&) curv1;
+ Handle(Geom_Circle) thecirc = Handle(Geom_Circle)::DownCast (curv1);
Standard_Real udeb = ElCLib::Parameter(thecirc->Circ(),myFAttach);
Standard_Real ufin = ElCLib::Parameter(thecirc->Circ(),mySAttach);
Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
}
else if ( curv1->IsInstance(STANDARD_TYPE(Geom_Ellipse)) ) // case of ellipses
{
- Handle(Geom_Ellipse) theEll = (Handle(Geom_Ellipse)&) curv1;
+ Handle(Geom_Ellipse) theEll = Handle(Geom_Ellipse)::DownCast (curv1);
Standard_Real udeb = ElCLib::Parameter(theEll->Elips(),myFAttach);
Standard_Real ufin = ElCLib::Parameter(theEll->Elips(),mySAttach);
if ( curv1->IsInstance(STANDARD_TYPE(Geom_Line)) && curv2->IsInstance(STANDARD_TYPE(Geom_Line)) ) {
// we take the line curv1 like support
Handle(Geom_Line) thelin;
- if (isInfinite1 && !isInfinite2) thelin = (Handle(Geom_Line)&) curv2;
- else if (!isInfinite1 && isInfinite2) thelin = (Handle(Geom_Line)&) curv1;
- else thelin = (Handle(Geom_Line)&) curv1;
+ if (isInfinite1 && !isInfinite2) thelin = Handle(Geom_Line)::DownCast (curv2);
+ else if (!isInfinite1 && isInfinite2) thelin = Handle(Geom_Line)::DownCast (curv1);
+ else thelin = Handle(Geom_Line)::DownCast (curv1);
ComputeTwoLinesPresentation(aPrs, thelin, firstp1, lastp1, firstp2, lastp2, isInfinite1, isInfinite2);
}
else if ( curv1->IsInstance(STANDARD_TYPE(Geom_Circle)) && curv2->IsInstance(STANDARD_TYPE(Geom_Circle)) ) {
//gp_Pnt curpos;
isCircle = Standard_True; // useful for ComputeSelection
- const Handle(Geom_Circle)& thecirc = (Handle(Geom_Circle)&) curv1;
+ Handle(Geom_Circle) thecirc (Handle(Geom_Circle)::DownCast (curv1));
ComputeTwoCirclesPresentation(aPrs, thecirc, firstp1, lastp1, firstp2, lastp2);
}
// Treatement of the case of ellipses
else if ( curv1->IsInstance(STANDARD_TYPE(Geom_Ellipse)) && curv2->IsInstance(STANDARD_TYPE(Geom_Ellipse)) )
{
- const Handle(Geom_Ellipse)& theEll = (Handle(Geom_Ellipse)&) curv1;
+ Handle(Geom_Ellipse) theEll (Handle(Geom_Ellipse)::DownCast (curv1));
ComputeTwoEllipsesPresentation(aPrs, theEll, firstp1, lastp1, firstp2, lastp2);
}
// jfa 10/10/2000 end
TColStd_ListIteratorOfListOfTransient it(Users());
if (it.More())
{
- const Handle(AIS_Shape)& USER = Handle(AIS_Shape)::DownCast(it.Value());
+ Handle(AIS_Shape) USER (Handle(AIS_Shape)::DownCast(it.Value()));
if (!USER.IsNull())
{
const TopoDS_Shape& SH =USER->Shape();
gp_Dir d1, d2;
if ( curv1->IsInstance(STANDARD_TYPE(Geom_Circle)) ) {
- d1 = ComputeCircleDirection((Handle(Geom_Circle)&) curv1, VERT);
+ d1 = ComputeCircleDirection(Handle(Geom_Circle)::DownCast (curv1), VERT);
}
else if (curv1->IsInstance(STANDARD_TYPE(Geom_Line)) ) {
- d1 = ComputeLineDirection((Handle(Geom_Line)&) curv1, firstp1);
+ d1 = ComputeLineDirection(Handle(Geom_Line)::DownCast (curv1), firstp1);
}
else
return Standard_False;
if ( curv2->IsInstance(STANDARD_TYPE(Geom_Circle)) ) {
- d2 = ComputeCircleDirection( (Handle(Geom_Circle)&) curv2, VERT);
+ d2 = ComputeCircleDirection( Handle(Geom_Circle)::DownCast (curv2), VERT);
}
else if (curv2->IsInstance(STANDARD_TYPE(Geom_Line)) ) {
- d2 =ComputeLineDirection( (Handle(Geom_Line)&) curv2, firstp2);
+ d2 =ComputeLineDirection( Handle(Geom_Line)::DownCast (curv2), firstp2);
}
else
return Standard_False;
if ( !AIS::ComputeGeometry(VEdge, curv1, firstp1, lastp1) )
return Standard_False;
if ( curv1->IsInstance(STANDARD_TYPE(Geom_Circle)) ) {
- dF = ComputeCircleDirection( (Handle(Geom_Circle)&) curv1, VERT);
+ dF = ComputeCircleDirection( Handle(Geom_Circle)::DownCast (curv1), VERT);
}
else if (curv1->IsInstance(STANDARD_TYPE(Geom_Line)) ) {
- dF = ComputeLineDirection( (Handle(Geom_Line)&) curv1, firstp1);
+ dF = ComputeLineDirection( Handle(Geom_Line)::DownCast (curv1), firstp1);
}
else
return Standard_False;
// we take the median of the edges connected to vertices
gp_Dir myDir;
if ( aCurve->IsKind(STANDARD_TYPE(Geom_Line))) {
- myDir = ((Handle(Geom_Line)&) aCurve)->Lin().Direction();
+ myDir = Handle(Geom_Line)::DownCast (aCurve)->Lin().Direction();
myDir.Cross(myPlane->Pln().Axis().Direction());
}
else if (aCurve->IsKind(STANDARD_TYPE(Geom_Circle))) {
- Handle(Geom_Circle) CIR = (Handle(Geom_Circle)&) aCurve;
+ Handle(Geom_Circle) CIR = Handle(Geom_Circle)::DownCast (aCurve);
myDir.SetXYZ(myFAttach.XYZ() - CIR->Location().XYZ());
}
// jfa 10/10/2000
else if (aCurve->IsKind(STANDARD_TYPE(Geom_Ellipse))) {
- Handle(Geom_Ellipse) CIR = (Handle(Geom_Ellipse)&) aCurve;
+ Handle(Geom_Ellipse) CIR = Handle(Geom_Ellipse)::DownCast (aCurve);
myDir.SetXYZ(myFAttach.XYZ() - CIR->Location().XYZ());
}
// jfa 10/10/2000 end
curpos);
if (myExtShape != 0) {
if (!extCurv.IsNull()) { // the edge is not in the WP
- ComputeProjEdgePresentation(aPrs,E,(Handle(Geom_Line)&) aCurve,ptonedge1,ptonedge2);
+ ComputeProjEdgePresentation(aPrs,E,Handle(Geom_Line)::DownCast (aCurve),ptonedge1,ptonedge2);
}
}
}