mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024023: Revamp the OCCT Handle -- downcast (automatic)
Automatic update by command "occt_upgrade . -downcast" C-style cast of Handle to that of derived type (now illegal) is replaced by call to DownCast() Const reference local variables of Handle type initialized by result of DownCast are replaced by normal variables.
This commit is contained in:
@@ -188,30 +188,30 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theEdge,
|
||||
if (!anEdgeLoc.IsIdentity())
|
||||
{
|
||||
Handle(Geom_Geometry) aGeometry = theCurve->Transformed (anEdgeLoc.Transformation());
|
||||
theCurve = (Handle(Geom_Curve)&) aGeometry;
|
||||
theCurve = Handle(Geom_Curve)::DownCast (aGeometry);
|
||||
}
|
||||
|
||||
if (theCurve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
|
||||
{
|
||||
theCurve = ((Handle(Geom_TrimmedCurve)&) theCurve)->BasisCurve();
|
||||
theCurve = Handle(Geom_TrimmedCurve)::DownCast (theCurve)->BasisCurve();
|
||||
}
|
||||
|
||||
if (theCurve->IsInstance (STANDARD_TYPE (Geom_Line)))
|
||||
{
|
||||
Handle(Geom_Line) aLine = (Handle(Geom_Line)&) theCurve;
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (theCurve);
|
||||
theFirstPnt = ElCLib::Value (aFirst, aLine->Lin());
|
||||
theLastPnt = ElCLib::Value (aLast, aLine->Lin());
|
||||
}
|
||||
else if (theCurve->IsInstance (STANDARD_TYPE (Geom_Circle)))
|
||||
{
|
||||
Handle(Geom_Circle) aCirc = (Handle(Geom_Circle)&) theCurve;
|
||||
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast (theCurve);
|
||||
|
||||
theFirstPnt = ElCLib::Value (aFirst, aCirc->Circ());
|
||||
theLastPnt = ElCLib::Value (aLast, aCirc->Circ());
|
||||
}
|
||||
else if (theCurve->IsInstance (STANDARD_TYPE (Geom_Ellipse)))
|
||||
{
|
||||
Handle(Geom_Ellipse) anEllipse = (Handle(Geom_Ellipse)&) theCurve;
|
||||
Handle(Geom_Ellipse) anEllipse = Handle(Geom_Ellipse)::DownCast (theCurve);
|
||||
theFirstPnt = ElCLib::Value (aFirst, anEllipse->Elips());
|
||||
theLastPnt = ElCLib::Value (aLast, anEllipse->Elips());
|
||||
}
|
||||
@@ -252,7 +252,7 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theEdge,
|
||||
|
||||
if (theCurve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
|
||||
{
|
||||
theCurve = ((Handle(Geom_TrimmedCurve)&) theCurve)->BasisCurve();
|
||||
theCurve = Handle(Geom_TrimmedCurve)::DownCast (theCurve)->BasisCurve();
|
||||
}
|
||||
|
||||
if (!theIsInfinite)
|
||||
@@ -306,19 +306,19 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theEdge,
|
||||
theIsOnPlane = Standard_True;
|
||||
if (theExtCurve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
|
||||
{
|
||||
theExtCurve = ((Handle(Geom_TrimmedCurve)&) theExtCurve)->BasisCurve();
|
||||
theExtCurve = Handle(Geom_TrimmedCurve)::DownCast (theExtCurve)->BasisCurve();
|
||||
}
|
||||
|
||||
if (theExtCurve->IsInstance (STANDARD_TYPE (Geom_Line)))
|
||||
{
|
||||
Handle(Geom_Line) aLine = (Handle(Geom_Line)&) theExtCurve;
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (theExtCurve);
|
||||
theIsOnPlane = thePlane->Pln().Contains (aLine->Lin(),
|
||||
Precision::Confusion(),
|
||||
Precision::Angular());
|
||||
}
|
||||
else if (theExtCurve->IsInstance (STANDARD_TYPE (Geom_Circle)))
|
||||
{
|
||||
Handle(Geom_Circle) aCircle = (Handle(Geom_Circle)&) theExtCurve;
|
||||
Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast (theExtCurve);
|
||||
|
||||
gp_Ax3 aCircPos (aCircle->Position());
|
||||
theIsOnPlane = aCircPos.IsCoplanar (thePlane->Pln().Position(),
|
||||
@@ -337,7 +337,7 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theEdge,
|
||||
|
||||
if (theCurve->IsInstance (STANDARD_TYPE (Geom_Line)))
|
||||
{
|
||||
Handle(Geom_Line) aLine = (Handle(Geom_Line)&) theCurve;
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (theCurve);
|
||||
if (!theIsInfinite)
|
||||
{
|
||||
theFirstPnt = ElCLib::Value (aFirst, aLine->Lin());
|
||||
@@ -346,14 +346,14 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theEdge,
|
||||
}
|
||||
else if (theCurve->IsInstance (STANDARD_TYPE (Geom_Circle)))
|
||||
{
|
||||
Handle(Geom_Circle) aCirc = (Handle(Geom_Circle)&) theCurve;
|
||||
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast (theCurve);
|
||||
|
||||
theFirstPnt = ElCLib::Value (aFirst, aCirc->Circ());
|
||||
theLastPnt = ElCLib::Value (aLast, aCirc->Circ());
|
||||
}
|
||||
else if (theCurve->IsInstance (STANDARD_TYPE (Geom_Ellipse)))
|
||||
{
|
||||
Handle(Geom_Ellipse) anEllipse = (Handle(Geom_Ellipse)&) theCurve;
|
||||
Handle(Geom_Ellipse) anEllipse = Handle(Geom_Ellipse)::DownCast (theCurve);
|
||||
|
||||
theFirstPnt = ElCLib::Value (aFirst, anEllipse->Elips());
|
||||
theLastPnt = ElCLib::Value (aLast, anEllipse->Elips());
|
||||
@@ -404,13 +404,13 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
|
||||
if (!aFirstEdgeLoc.IsIdentity())
|
||||
{
|
||||
Handle(Geom_Geometry) aGeomGeometry = theFirstCurve->Transformed (aFirstEdgeLoc.Transformation());
|
||||
theFirstCurve = (Handle(Geom_Curve)&) aGeomGeometry;
|
||||
theFirstCurve = Handle(Geom_Curve)::DownCast (aGeomGeometry);
|
||||
}
|
||||
|
||||
if (!aSecondEdgeLoc.IsIdentity())
|
||||
{
|
||||
Handle(Geom_Geometry) aGeomGeometry = theSecondCurve->Transformed (aSecondEdgeLoc.Transformation());
|
||||
theSecondCurve = (Handle(Geom_Curve)&) aGeomGeometry;
|
||||
theSecondCurve = Handle(Geom_Curve)::DownCast (aGeomGeometry);
|
||||
}
|
||||
|
||||
theFirstCurve = GeomProjLib::ProjectOnPlane (theFirstCurve, thePlane,
|
||||
@@ -425,24 +425,24 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
|
||||
|
||||
if (theFirstCurve->IsInstance (STANDARD_TYPE(Geom_TrimmedCurve)))
|
||||
{
|
||||
theFirstCurve = ((Handle(Geom_TrimmedCurve)&) theFirstCurve)->BasisCurve();
|
||||
theFirstCurve = Handle(Geom_TrimmedCurve)::DownCast (theFirstCurve)->BasisCurve();
|
||||
}
|
||||
|
||||
if (theSecondCurve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
|
||||
{
|
||||
theSecondCurve = ((Handle(Geom_TrimmedCurve)&) theSecondCurve)->BasisCurve();
|
||||
theSecondCurve = Handle(Geom_TrimmedCurve)::DownCast (theSecondCurve)->BasisCurve();
|
||||
}
|
||||
|
||||
if (theFirstCurve->IsInstance(STANDARD_TYPE(Geom_Line)))
|
||||
{
|
||||
Handle(Geom_Line) aLine = (Handle(Geom_Line)&) theFirstCurve;
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (theFirstCurve);
|
||||
|
||||
theFirstPnt1 = ElCLib::Value (aFirst1, aLine->Lin());
|
||||
theLastPnt1 = ElCLib::Value (aLast1, aLine->Lin());
|
||||
}
|
||||
else if (theFirstCurve->IsInstance(STANDARD_TYPE(Geom_Circle)))
|
||||
{
|
||||
Handle(Geom_Circle) aCirc = (Handle(Geom_Circle)&) theFirstCurve;
|
||||
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast (theFirstCurve);
|
||||
|
||||
theFirstPnt1 = ElCLib::Value (aFirst1, aCirc->Circ());
|
||||
theLastPnt1 = ElCLib::Value (aLast1, aCirc->Circ());
|
||||
@@ -454,14 +454,14 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
|
||||
|
||||
if (theSecondCurve->IsInstance (STANDARD_TYPE (Geom_Line)))
|
||||
{
|
||||
Handle(Geom_Line) aLine = (Handle(Geom_Line)&) theSecondCurve;
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (theSecondCurve);
|
||||
|
||||
theFirstPnt2 = ElCLib::Value (aFirst2, aLine->Lin());
|
||||
theLastPnt2 = ElCLib::Value (aLast2, aLine->Lin());
|
||||
}
|
||||
else if (theSecondCurve->IsInstance (STANDARD_TYPE (Geom_Circle)))
|
||||
{
|
||||
Handle(Geom_Circle) aCirc = (Handle(Geom_Circle)&) theSecondCurve;
|
||||
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast (theSecondCurve);
|
||||
|
||||
theFirstPnt2 = ElCLib::Value (aFirst2, aCirc->Circ());
|
||||
theLastPnt2 = ElCLib::Value (aLast2, aCirc->Circ());
|
||||
@@ -505,8 +505,8 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
|
||||
{
|
||||
if (theFirstCurve->DynamicType() == theSecondCurve->DynamicType())
|
||||
{
|
||||
gp_Lin aLin1 = ((Handle(Geom_Line)&) theFirstCurve)->Lin();
|
||||
gp_Lin aLin2 = ((Handle(Geom_Line)&) theSecondCurve)->Lin();
|
||||
gp_Lin aLin1 = Handle(Geom_Line)::DownCast (theFirstCurve)->Lin();
|
||||
gp_Lin aLin2 = Handle(Geom_Line)::DownCast (theSecondCurve)->Lin();
|
||||
|
||||
if (theIsInfinite1)
|
||||
{
|
||||
@@ -597,11 +597,11 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
|
||||
|
||||
if (theFirstCurve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
|
||||
{
|
||||
theFirstCurve = ((Handle(Geom_TrimmedCurve)&) theFirstCurve)->BasisCurve();
|
||||
theFirstCurve = Handle(Geom_TrimmedCurve)::DownCast (theFirstCurve)->BasisCurve();
|
||||
}
|
||||
if (theSecondCurve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
|
||||
{
|
||||
theSecondCurve = ((Handle(Geom_TrimmedCurve)&) theSecondCurve)->BasisCurve();
|
||||
theSecondCurve = Handle(Geom_TrimmedCurve)::DownCast (theSecondCurve)->BasisCurve();
|
||||
}
|
||||
|
||||
aFirst1 = aFirstAdaptor.FirstParameter();
|
||||
@@ -646,8 +646,8 @@ Standard_Boolean AIS::ComputeGeometry (const TopoDS_Edge& theFirstEdge,
|
||||
{
|
||||
if (theFirstCurve->DynamicType() == theSecondCurve->DynamicType())
|
||||
{
|
||||
gp_Lin aLin1 = ((Handle(Geom_Line)&) theFirstCurve)->Lin();
|
||||
gp_Lin aLin2 = ((Handle(Geom_Line)&) theSecondCurve)->Lin();
|
||||
gp_Lin aLin1 = Handle(Geom_Line)::DownCast (theFirstCurve)->Lin();
|
||||
gp_Lin aLin2 = Handle(Geom_Line)::DownCast (theSecondCurve)->Lin();
|
||||
|
||||
if (theExtIndex == 1)
|
||||
{
|
||||
@@ -735,7 +735,7 @@ Standard_Boolean AIS::ComputeGeomCurve (Handle(Geom_Curve)& aCurve,
|
||||
aCurve = aGeomCurve;
|
||||
if (aCurve->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
|
||||
{
|
||||
aCurve = ((Handle(Geom_TrimmedCurve)&) aCurve)->BasisCurve();
|
||||
aCurve = Handle(Geom_TrimmedCurve)::DownCast (aCurve)->BasisCurve();
|
||||
}
|
||||
if (! Precision::IsInfinite(first1) && ! Precision::IsInfinite(last1))
|
||||
{
|
||||
@@ -1426,8 +1426,8 @@ void AIS::ComputeProjEdgePresentation (const Handle(Prs3d_Presentation)& aPresen
|
||||
// Calculate presentation of the edge
|
||||
if (ProjCurve->IsInstance(STANDARD_TYPE(Geom_Line)) ) {
|
||||
// CLE
|
||||
// const Handle(Geom_Line) & gl = (Handle(Geom_Line)&) ProjCurve;
|
||||
Handle(Geom_Line) gl = (Handle(Geom_Line)&) ProjCurve;
|
||||
// Handle(Geom_Line) gl (Handle(Geom_Line)::DownCast (ProjCurve));
|
||||
Handle(Geom_Line) gl = Handle(Geom_Line)::DownCast (ProjCurve);
|
||||
// ENDCLE
|
||||
if ( !isInfinite) {
|
||||
pf = ElCLib::Parameter(gl->Lin(),FirstP);
|
||||
@@ -1442,8 +1442,8 @@ void AIS::ComputeProjEdgePresentation (const Handle(Prs3d_Presentation)& aPresen
|
||||
}
|
||||
else if (ProjCurve->IsInstance(STANDARD_TYPE(Geom_Circle)) ) {
|
||||
// CLE
|
||||
// const Handle(Geom_Circle) & gc = (Handle(Geom_Circle)&) ProjCurve;
|
||||
Handle(Geom_Circle) gc = (Handle(Geom_Circle)&) ProjCurve;
|
||||
// Handle(Geom_Circle) gc (Handle(Geom_Circle)::DownCast (ProjCurve));
|
||||
Handle(Geom_Circle) gc = Handle(Geom_Circle)::DownCast (ProjCurve);
|
||||
// ENDCLE
|
||||
pf = ElCLib::Parameter(gc->Circ(),FirstP);
|
||||
pl = ElCLib::Parameter(gc->Circ(),LastP);
|
||||
|
@@ -43,19 +43,19 @@ Standard_Boolean AIS_AttributeFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
|
||||
|
||||
//#ifndef OCCT_DEBUG
|
||||
Handle(SelectMgr_SelectableObject) aSelectable = anObj->Selectable() ;
|
||||
if( hasC && ((Handle(AIS_InteractiveObject)&) aSelectable)->HasColor() )
|
||||
if( hasC && Handle(AIS_InteractiveObject)::DownCast (aSelectable)->HasColor() )
|
||||
//#else
|
||||
// if(hasC && ((Handle(AIS_InteractiveObject)&) anObj->Selectable())->HasColor())
|
||||
//#endif
|
||||
okstat = (myCol == ((Handle(AIS_InteractiveObject)&) anObj)->Color());
|
||||
okstat = (myCol == Handle(AIS_InteractiveObject)::DownCast (anObj)->Color());
|
||||
|
||||
//#ifndef OCCT_DEBUG
|
||||
aSelectable = anObj->Selectable() ;
|
||||
if( hasW && ((Handle(AIS_InteractiveObject)&) aSelectable)->HasWidth() )
|
||||
if( hasW && Handle(AIS_InteractiveObject)::DownCast (aSelectable)->HasWidth() )
|
||||
//#else
|
||||
// if(hasW && ((Handle(AIS_InteractiveObject)&) anObj->Selectable())->HasWidth())
|
||||
//#endif
|
||||
okstat = (myWid == ((Handle(AIS_InteractiveObject)&) anObj)->Width()) && okstat;
|
||||
okstat = (myWid == Handle(AIS_InteractiveObject)::DownCast (anObj)->Width()) && okstat;
|
||||
|
||||
return okstat;
|
||||
|
||||
|
@@ -59,7 +59,7 @@ Standard_Boolean AIS_BadEdgeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& EO
|
||||
if (myContour==0)
|
||||
return Standard_True;
|
||||
|
||||
const TopoDS_Shape& aShape = ((Handle(StdSelect_BRepOwner)&)EO)->Shape();
|
||||
const TopoDS_Shape& aShape = Handle(StdSelect_BRepOwner)::DownCast (EO)->Shape();
|
||||
|
||||
if (myBadEdges.IsBound(myContour)) {
|
||||
TopTools_ListIteratorOfListOfShape it(myBadEdges.Find(myContour));
|
||||
|
@@ -80,7 +80,7 @@ Standard_Boolean AIS_C0RegularityFilter::IsOk(const Handle(SelectMgr_EntityOwner
|
||||
if (Handle(StdSelect_BRepOwner)::DownCast(EO).IsNull())
|
||||
return Standard_False;
|
||||
|
||||
const TopoDS_Shape& aShape = ((Handle(StdSelect_BRepOwner)&)EO)->Shape();
|
||||
const TopoDS_Shape& aShape = Handle(StdSelect_BRepOwner)::DownCast (EO)->Shape();
|
||||
|
||||
if(aShape.ShapeType()!= TopAbs_EDGE)
|
||||
return Standard_False;
|
||||
|
@@ -118,7 +118,7 @@ void AIS_ConcentricRelation::ComputeEdgeVertexConcentric(const Handle(Prs3d_Pres
|
||||
gp_Pnt P;
|
||||
AIS::ComputeGeometry(V,P, myPlane, isOnPlanVertex);
|
||||
|
||||
const Handle(Geom_Circle)& CIRCLE = (Handle(Geom_Circle)&) C;
|
||||
Handle(Geom_Circle) CIRCLE (Handle(Geom_Circle)::DownCast (C));
|
||||
myCenter = CIRCLE->Location();
|
||||
myRad = Min(CIRCLE->Radius()/5.,15.);
|
||||
gp_Dir vec(p1.XYZ() - myCenter.XYZ() );
|
||||
@@ -180,8 +180,8 @@ void AIS_ConcentricRelation::ComputeTwoEdgesConcentric(const Handle(Prs3d_Presen
|
||||
return;
|
||||
}
|
||||
|
||||
const Handle(Geom_Circle)& gcirc1 = (Handle(Geom_Circle)&) geom1;
|
||||
const Handle(Geom_Circle)& gcirc2 = (Handle(Geom_Circle)&) geom2;
|
||||
Handle(Geom_Circle) gcirc1 (Handle(Geom_Circle)::DownCast (geom1));
|
||||
Handle(Geom_Circle) gcirc2 (Handle(Geom_Circle)::DownCast (geom2));
|
||||
|
||||
myCenter = gcirc1->Location();
|
||||
|
||||
|
@@ -401,8 +401,8 @@ void AIS_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Prese
|
||||
|
||||
if (cu1.GetType() == GeomAbs_Line && cu2.GetType() == GeomAbs_Line)
|
||||
{
|
||||
const Handle(Geom_Line)& geom_lin1 = (Handle(Geom_Line)&) geom1;
|
||||
const Handle(Geom_Line)& geom_lin2 = (Handle(Geom_Line)&) geom2;
|
||||
Handle(Geom_Line) geom_lin1 (Handle(Geom_Line)::DownCast (geom1));
|
||||
Handle(Geom_Line) geom_lin2 (Handle(Geom_Line)::DownCast (geom2));
|
||||
const gp_Lin& l1 = geom_lin1->Lin();
|
||||
const gp_Lin& l2 = geom_lin2->Lin();
|
||||
|
||||
@@ -494,8 +494,8 @@ void AIS_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Prese
|
||||
}
|
||||
if (cu1.GetType() == GeomAbs_Circle && cu2.GetType() == GeomAbs_Circle){
|
||||
//Get first and last points of circles
|
||||
const Handle(Geom_Circle)& aCir1 = Handle(Geom_Circle)::DownCast(geom1);
|
||||
const Handle(Geom_Circle)& aCir2 = Handle(Geom_Circle)::DownCast(geom2);
|
||||
Handle(Geom_Circle) aCir1 (Handle(Geom_Circle)::DownCast(geom1));
|
||||
Handle(Geom_Circle) aCir2 (Handle(Geom_Circle)::DownCast(geom2));
|
||||
gp_Circ aCirc1 = aCir1->Circ();
|
||||
gp_Circ aCirc2 = aCir2->Circ();
|
||||
|
||||
@@ -725,7 +725,7 @@ void AIS_EqualDistanceRelation::ComputeOneEdgeOneVertexLength( const Handle( Prs
|
||||
|
||||
if ( aCurve->IsInstance(STANDARD_TYPE(Geom_Line)) )
|
||||
{
|
||||
const Handle(Geom_Line)& geom_lin = (Handle(Geom_Line)&) aCurve;
|
||||
Handle(Geom_Line) geom_lin (Handle(Geom_Line)::DownCast (aCurve));
|
||||
const gp_Lin& l = geom_lin->Lin();
|
||||
|
||||
// computation of Val
|
||||
|
@@ -420,7 +420,7 @@ void AIS_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aS
|
||||
|
||||
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);
|
||||
@@ -433,7 +433,7 @@ void AIS_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aS
|
||||
}
|
||||
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);
|
||||
@@ -510,9 +510,9 @@ void AIS_IdenticRelation::ComputeTwoEdgesPresentation(const Handle(Prs3d_Present
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ void AIS_IdenticRelation::ComputeTwoEdgesPresentation(const Handle(Prs3d_Present
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ void AIS_IdenticRelation::ComputeTwoEdgesPresentation(const Handle(Prs3d_Present
|
||||
// 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
|
||||
@@ -1477,7 +1477,7 @@ void AIS_IdenticRelation::ComputeTwoVerticesPresentation(const Handle(Prs3d_Pres
|
||||
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();
|
||||
@@ -1576,19 +1576,19 @@ Standard_Boolean AIS_IdenticRelation::ComputeDirection(const TopoDS_Wire& aWire,
|
||||
|
||||
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;
|
||||
@@ -1613,10 +1613,10 @@ Standard_Boolean AIS_IdenticRelation::ComputeDirection(const TopoDS_Wire& aWire,
|
||||
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;
|
||||
@@ -1704,16 +1704,16 @@ void AIS_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3d_P
|
||||
// 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
|
||||
@@ -1735,7 +1735,7 @@ void AIS_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3d_P
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -213,7 +213,7 @@ void AIS_InteractiveContext::DisplayedObjects (AIS_ListOfInteractive& theListOfI
|
||||
for (TColStd_MapIteratorOfMapOfTransient aDispMapIter (aDispMap); aDispMapIter.More(); aDispMapIter.Next())
|
||||
{
|
||||
const Handle(Standard_Transient)& aTransient = aDispMapIter.Key();
|
||||
anObj = *((Handle(AIS_InteractiveObject)* )&aTransient);
|
||||
anObj = Handle(AIS_InteractiveObject)::DownCast (aTransient);
|
||||
theListOfIO.Append (anObj);
|
||||
}
|
||||
}
|
||||
@@ -2821,15 +2821,13 @@ void AIS_InteractiveContext::Disconnect (const Handle(AIS_InteractiveObject)& th
|
||||
{
|
||||
if (theAssembly->IsInstance ("AIS_MultipleConnectedInteractive"))
|
||||
{
|
||||
const Handle(AIS_MultipleConnectedInteractive)& theObj =
|
||||
Handle(AIS_MultipleConnectedInteractive)::DownCast (theAssembly);
|
||||
Handle(AIS_MultipleConnectedInteractive) theObj (Handle(AIS_MultipleConnectedInteractive)::DownCast (theAssembly));
|
||||
theObj->Disconnect (theObjToDisconnect);
|
||||
mgrSelector->Remove (theObjToDisconnect);
|
||||
}
|
||||
else if (theAssembly->IsInstance ("AIS_ConnectedInteractive") && theObjToDisconnect.IsNull())
|
||||
{
|
||||
const Handle(AIS_ConnectedInteractive)& theObj =
|
||||
Handle(AIS_ConnectedInteractive)::DownCast (theAssembly);
|
||||
Handle(AIS_ConnectedInteractive) theObj (Handle(AIS_ConnectedInteractive)::DownCast (theAssembly));
|
||||
theObj->Disconnect();
|
||||
mgrSelector->Remove (theObj);
|
||||
}
|
||||
@@ -2855,8 +2853,7 @@ void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView,
|
||||
AIS_MapOfObjectOwners anObjectOwnerMap;
|
||||
for (aSelection->Init(); aSelection->More(); aSelection->Next())
|
||||
{
|
||||
const Handle(AIS_InteractiveObject)& anObj =
|
||||
Handle(AIS_InteractiveObject)::DownCast (aSelection->Value());
|
||||
Handle(AIS_InteractiveObject) anObj (Handle(AIS_InteractiveObject)::DownCast (aSelection->Value()));
|
||||
if (!anObj.IsNull())
|
||||
{
|
||||
if (anObj->IsInfinite())
|
||||
@@ -2868,8 +2865,7 @@ void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView,
|
||||
}
|
||||
else
|
||||
{
|
||||
const Handle(SelectMgr_EntityOwner)& anOwner =
|
||||
Handle(SelectMgr_EntityOwner)::DownCast (aSelection->Value());
|
||||
Handle(SelectMgr_EntityOwner) anOwner (Handle(SelectMgr_EntityOwner)::DownCast (aSelection->Value()));
|
||||
if (anOwner.IsNull())
|
||||
continue;
|
||||
|
||||
|
@@ -541,7 +541,7 @@ void AIS_InteractiveContext::SetCurrentObject(const Handle(AIS_InteractiveObject
|
||||
sel->Init();
|
||||
while (sel->More()) {
|
||||
TR = sel->Value();
|
||||
IO = *((Handle(AIS_InteractiveObject)*)&TR);
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (TR);
|
||||
Unhilight(IO,Standard_False);
|
||||
IO->State(0);
|
||||
sel->Next();
|
||||
@@ -675,7 +675,7 @@ void AIS_InteractiveContext::NextCurrent()
|
||||
Handle(AIS_InteractiveObject) AIS_InteractiveContext::Current() const
|
||||
{
|
||||
Handle(Standard_Transient) TR = AIS_Selection::Selection(myCurrentName.ToCString())->Value();
|
||||
Handle(AIS_InteractiveObject) IO = *((Handle(AIS_InteractiveObject)*)&TR);
|
||||
Handle(AIS_InteractiveObject) IO = Handle(AIS_InteractiveObject)::DownCast (TR);
|
||||
return IO;
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ void AIS_InteractiveContext::HilightCurrents(const Standard_Boolean updateviewer
|
||||
sel->Init();
|
||||
while (sel->More()) {
|
||||
TR = sel->Value();
|
||||
IO = *((Handle(AIS_InteractiveObject)*)&TR);
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (TR);
|
||||
HilightWithColor(IO,mySelectionColor,Standard_False);
|
||||
sel->Next();
|
||||
}
|
||||
@@ -740,7 +740,7 @@ void AIS_InteractiveContext::UnhilightCurrents(const Standard_Boolean updateview
|
||||
sel->Init();
|
||||
while (sel->More()) {
|
||||
TR = sel->Value();
|
||||
IO = *((Handle(AIS_InteractiveObject)*)&TR);
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (TR);
|
||||
Unhilight(IO,Standard_False);
|
||||
sel->Next();
|
||||
}
|
||||
@@ -762,7 +762,7 @@ void AIS_InteractiveContext::ClearCurrents(const Standard_Boolean updateviewer)
|
||||
Handle(AIS_InteractiveObject) IO;
|
||||
for(S->Init();S->More();S->Next()){
|
||||
Tr = S->Value();
|
||||
IO = (*((Handle(AIS_InteractiveObject)*)&Tr));
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (Tr);
|
||||
IO->State(0);
|
||||
Unhilight(IO,Standard_False);
|
||||
}
|
||||
@@ -787,7 +787,7 @@ void AIS_InteractiveContext::HilightSelected(const Standard_Boolean updateviewer
|
||||
sel->Init();
|
||||
while (sel->More()) {
|
||||
TR = sel->Value();
|
||||
IO = *((Handle(AIS_InteractiveObject)*)&TR);
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (TR);
|
||||
HilightWithColor(IO,mySelectionColor,Standard_False);
|
||||
sel->Next();
|
||||
}
|
||||
@@ -815,7 +815,7 @@ void AIS_InteractiveContext::UnhilightSelected(const Standard_Boolean updateview
|
||||
sel->Init();
|
||||
while (sel->More()) {
|
||||
TR = sel->Value();
|
||||
IO = *((Handle(AIS_InteractiveObject)*)&TR);
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (TR);
|
||||
Unhilight(IO,Standard_False);
|
||||
sel->Next();
|
||||
}
|
||||
@@ -1055,7 +1055,7 @@ Handle(AIS_InteractiveObject) AIS_InteractiveContext::SelectedInteractive() cons
|
||||
if (AIS_Selection::Selection(myCurrentName.ToCString())->Extent() == 0)
|
||||
return NULL;
|
||||
Handle(Standard_Transient) TR =AIS_Selection::Selection(myCurrentName.ToCString())->Value();
|
||||
Handle(AIS_InteractiveObject) IO = *((Handle(AIS_InteractiveObject)*)&TR);
|
||||
Handle(AIS_InteractiveObject) IO = Handle(AIS_InteractiveObject)::DownCast (TR);
|
||||
return IO;}
|
||||
|
||||
return myLocalContexts(myCurLocalIndex)->SelectedInteractive();
|
||||
|
@@ -633,7 +633,7 @@ void AIS_InteractiveObject::BoundingBox (Bnd_Box& theBndBox)
|
||||
{
|
||||
for (PrsMgr_ListOfPresentableObjectsIter aPrsIter (Children()); aPrsIter.More(); aPrsIter.Next())
|
||||
{
|
||||
const Handle(AIS_InteractiveObject)& aChild = Handle(AIS_InteractiveObject)::DownCast (aPrsIter.Value());
|
||||
Handle(AIS_InteractiveObject) aChild (Handle(AIS_InteractiveObject)::DownCast (aPrsIter.Value()));
|
||||
if (aChild.IsNull())
|
||||
{
|
||||
continue;
|
||||
|
@@ -411,7 +411,7 @@ Standard_Boolean AIS_LengthDimension::InitEdgeVertexLength (const TopoDS_Edge& t
|
||||
|
||||
myFirstPoint = BRep_Tool::Pnt (theVertex);
|
||||
|
||||
const Handle(Geom_Line)& aGeomLine = (Handle(Geom_Line)&) aCurve;
|
||||
Handle(Geom_Line) aGeomLine (Handle(Geom_Line)::DownCast (aCurve));
|
||||
const gp_Lin& aLin = aGeomLine->Lin();
|
||||
|
||||
// Get direction of edge to build plane automatically.
|
||||
|
@@ -620,7 +620,7 @@ void AIS_LocalContext::Terminate (const Standard_Boolean theToUpdate)
|
||||
Handle(Standard_Transient) Tr;
|
||||
for(S->Init();S->More();S->Next()){
|
||||
Tr = S->Value();
|
||||
(*((Handle(SelectMgr_EntityOwner)*)&Tr))->SetSelected (Standard_False);
|
||||
Handle(SelectMgr_EntityOwner)::DownCast (Tr)->SetSelected (Standard_False);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -533,11 +533,11 @@ void AIS_LocalContext::HilightPicked(const Standard_Boolean updateviewer)
|
||||
Handle(StdSelect_BRepOwner) BROwnr = Handle(StdSelect_BRepOwner)::DownCast(Ownr);
|
||||
if(BROwnr.IsNull() || !BROwnr->ComesFromDecomposition()){
|
||||
Handle(SelectMgr_SelectableObject) SO = Ownr->Selectable();
|
||||
IO = *((Handle(AIS_InteractiveObject)*)&SO);
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (SO);
|
||||
}
|
||||
}
|
||||
Handle(SelectMgr_SelectableObject) SO = Ownr->Selectable();
|
||||
Standard_Integer HM = GetHiMod(*((Handle(AIS_InteractiveObject)*)&SO));
|
||||
Standard_Integer HM = GetHiMod(Handle(AIS_InteractiveObject)::DownCast (SO));
|
||||
if ( Ownr->IsAutoHilight() )
|
||||
Ownr->HilightWithColor(PM,myCTX->SelectionColor(),HM);
|
||||
else if ( aMap.IsBound (SO) )
|
||||
@@ -585,7 +585,7 @@ void AIS_LocalContext::UnhilightPicked (const Standard_Boolean updateviewer)
|
||||
Standard_Integer HM(0);
|
||||
if(Ownr->HasSelectable()){
|
||||
Handle(SelectMgr_SelectableObject) SO = Ownr->Selectable();
|
||||
Handle(AIS_InteractiveObject) IO = *((Handle(AIS_InteractiveObject)*)&SO);
|
||||
Handle(AIS_InteractiveObject) IO = Handle(AIS_InteractiveObject)::DownCast (SO);
|
||||
anObjMap.Add (IO);
|
||||
|
||||
HM = GetHiMod(IO);
|
||||
@@ -667,7 +667,7 @@ HasShape() const
|
||||
{
|
||||
Handle(Standard_Transient) Tr = AIS_Selection::CurrentSelection()->Value();
|
||||
if( Tr.IsNull() ) return Standard_False;
|
||||
Handle(SelectMgr_EntityOwner) EO = *((Handle(SelectMgr_EntityOwner)*)&Tr);
|
||||
Handle(SelectMgr_EntityOwner) EO = Handle(SelectMgr_EntityOwner)::DownCast (Tr);
|
||||
Handle(StdSelect_BRepOwner) BRO = Handle(StdSelect_BRepOwner)::DownCast(EO);
|
||||
if(BRO.IsNull()) return Standard_False;
|
||||
Standard_Boolean hasshape = BRO->HasShape();
|
||||
@@ -704,7 +704,7 @@ Standard_Boolean AIS_LocalContext::HasSelectedShape() const
|
||||
TopoDS_Shape AIS_LocalContext::SelectedShape() const
|
||||
{
|
||||
Handle(Standard_Transient) aTr = AIS_Selection::CurrentSelection()->Value();
|
||||
Handle(SelectMgr_EntityOwner) anEO = *((Handle(SelectMgr_EntityOwner)*)&aTr);
|
||||
Handle(SelectMgr_EntityOwner) anEO = Handle(SelectMgr_EntityOwner)::DownCast (aTr);
|
||||
Handle(StdSelect_BRepOwner) aBRO = Handle(StdSelect_BRepOwner)::DownCast(anEO);
|
||||
if( aBRO.IsNull() )
|
||||
{
|
||||
@@ -724,11 +724,11 @@ SelectedInteractive() const
|
||||
Handle(AIS_InteractiveObject) IO;
|
||||
Handle(Standard_Transient) Tr = AIS_Selection::CurrentSelection()->Value();
|
||||
if( !Tr.IsNull() ) {
|
||||
Handle(SelectMgr_EntityOwner) EO = *((Handle(SelectMgr_EntityOwner)*)&Tr);
|
||||
Handle(SelectMgr_EntityOwner) EO = Handle(SelectMgr_EntityOwner)::DownCast (Tr);
|
||||
Handle(SelectMgr_SelectableObject) SO;
|
||||
if(EO->HasSelectable()){
|
||||
SO = EO->Selectable();
|
||||
IO = *((Handle(AIS_InteractiveObject)*)&SO);
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast (SO);
|
||||
}
|
||||
}
|
||||
return IO;
|
||||
@@ -743,7 +743,7 @@ SelectedOwner() const
|
||||
Handle(SelectMgr_EntityOwner) EO;
|
||||
Handle(Standard_Transient) Tr = AIS_Selection::CurrentSelection()->Value();
|
||||
if( !Tr.IsNull() )
|
||||
EO = *((Handle(SelectMgr_EntityOwner)*)&Tr);
|
||||
EO = Handle(SelectMgr_EntityOwner)::DownCast (Tr);
|
||||
return EO;
|
||||
}
|
||||
|
||||
@@ -1016,7 +1016,7 @@ void AIS_LocalContext::SetSelected(const Handle(AIS_InteractiveObject)& anIObj,
|
||||
SIOBJ->Init();
|
||||
if(SIOBJ->More()){
|
||||
Handle(SelectBasics_EntityOwner) BO = SIOBJ->Sensitive()->BaseSensitive()->OwnerId();
|
||||
EO = *((Handle(SelectMgr_EntityOwner)*)&BO);
|
||||
EO = Handle(SelectMgr_EntityOwner)::DownCast (BO);
|
||||
}
|
||||
}
|
||||
if(EO.IsNull())
|
||||
@@ -1054,7 +1054,7 @@ void AIS_LocalContext::AddOrRemoveSelected(const Handle(AIS_InteractiveObject)&
|
||||
SIOBJ->Init();
|
||||
if(SIOBJ->More()){
|
||||
Handle(SelectBasics_EntityOwner) BO = SIOBJ->Sensitive()->BaseSensitive()->OwnerId();
|
||||
EO = *((Handle(SelectMgr_EntityOwner)*)&BO);
|
||||
EO = Handle(SelectMgr_EntityOwner)::DownCast (BO);
|
||||
}
|
||||
}
|
||||
if(EO.IsNull())
|
||||
@@ -1242,7 +1242,7 @@ AIS_LocalContext::DetectedInteractive() const
|
||||
Handle(AIS_InteractiveObject) Iobj;
|
||||
if(IsValidIndex(mylastindex)){
|
||||
Handle(SelectMgr_SelectableObject) SO = myMapOfOwner->FindKey(mylastindex)->Selectable();
|
||||
Iobj = *((Handle(AIS_InteractiveObject)*) &SO);
|
||||
Iobj = Handle(AIS_InteractiveObject)::DownCast (SO);
|
||||
}
|
||||
return Iobj;
|
||||
}
|
||||
@@ -1420,7 +1420,7 @@ Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromIO
|
||||
for(; anIter.More(); anIter.Next()){
|
||||
const Handle(Standard_Transient)& Tr = anIter.Value();
|
||||
if(!Tr.IsNull()){
|
||||
EO = *((Handle(SelectMgr_EntityOwner)*)&Tr);
|
||||
EO = Handle(SelectMgr_EntityOwner)::DownCast (Tr);
|
||||
if(EO->HasSelectable()){
|
||||
Handle(StdSelect_BRepOwner) BROwnr = Handle(StdSelect_BRepOwner)::DownCast(EO);
|
||||
if(BROwnr.IsNull() || !BROwnr->ComesFromDecomposition()){
|
||||
|
@@ -212,7 +212,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
|
||||
else if ( curv->IsInstance(STANDARD_TYPE(Geom_Circle)) ) // case of circle
|
||||
{
|
||||
// segment on circle
|
||||
Handle(Geom_Circle) thecirc = (Handle(Geom_Circle)&) curv;
|
||||
Handle(Geom_Circle) thecirc = Handle(Geom_Circle)::DownCast (curv);
|
||||
Standard_Real udeb = ElCLib::Parameter(thecirc->Circ(),myFirstPnt1);
|
||||
Standard_Real ufin = ElCLib::Parameter(thecirc->Circ(),myFirstPnt2);
|
||||
Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
|
||||
@@ -223,7 +223,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
|
||||
else if ( curv->IsInstance(STANDARD_TYPE(Geom_Ellipse)) ) // case of ellipse
|
||||
{
|
||||
// segment on ellipse
|
||||
Handle(Geom_Ellipse) theEll = (Handle(Geom_Ellipse)&) curv;
|
||||
Handle(Geom_Ellipse) theEll = Handle(Geom_Ellipse)::DownCast (curv);
|
||||
Standard_Real udeb = ElCLib::Parameter(theEll->Elips(),myFirstPnt1);
|
||||
Standard_Real ufin = ElCLib::Parameter(theEll->Elips(),myFirstPnt2);
|
||||
Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
|
||||
@@ -247,7 +247,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
|
||||
else if ( curv->IsInstance(STANDARD_TYPE(Geom_Circle)) ) // case of circle
|
||||
{
|
||||
// segment on circle
|
||||
Handle(Geom_Circle) thecirc = (Handle(Geom_Circle)&) curv;
|
||||
Handle(Geom_Circle) thecirc = Handle(Geom_Circle)::DownCast (curv);
|
||||
Standard_Real udeb = ElCLib::Parameter(thecirc->Circ(),mySecondPnt1);
|
||||
Standard_Real ufin = ElCLib::Parameter(thecirc->Circ(),mySecondPnt2);
|
||||
Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
|
||||
@@ -258,7 +258,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
|
||||
else if ( curv->IsInstance(STANDARD_TYPE(Geom_Ellipse)) ) // case of ellipse
|
||||
{
|
||||
// segment on ellipse
|
||||
Handle(Geom_Ellipse) theEll = (Handle(Geom_Ellipse)&) curv;
|
||||
Handle(Geom_Ellipse) theEll = Handle(Geom_Ellipse)::DownCast (curv);
|
||||
Standard_Real udeb = ElCLib::Parameter(theEll->Elips(),mySecondPnt1);
|
||||
Standard_Real ufin = ElCLib::Parameter(theEll->Elips(),mySecondPnt2);
|
||||
Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
|
||||
@@ -302,7 +302,7 @@ void AIS_MidPointRelation::ComputeEdgeFromPnt(const Handle(Prs3d_Presentation)&
|
||||
if ( !isInfinite ) ComputePointsOnLine(ptat1,ptat2,first);
|
||||
else
|
||||
{
|
||||
const gp_Lin& line = ((Handle(Geom_Line)&) geom)->Lin();
|
||||
const gp_Lin& line = Handle(Geom_Line)::DownCast (geom)->Lin();
|
||||
ComputePointsOnLine(line,first);
|
||||
}
|
||||
if ( first ) DsgPrs_MidPointPresentation::Add(aprs,myDrawer,ax,myMidPoint,myPosition,
|
||||
@@ -312,7 +312,7 @@ void AIS_MidPointRelation::ComputeEdgeFromPnt(const Handle(Prs3d_Presentation)&
|
||||
}
|
||||
else if ( geom->IsInstance(STANDARD_TYPE(Geom_Circle)) )
|
||||
{
|
||||
const Handle(Geom_Circle)& geom_cir = (Handle(Geom_Circle)&) geom;
|
||||
Handle(Geom_Circle) geom_cir (Handle(Geom_Circle)::DownCast (geom));
|
||||
gp_Circ circ (geom_cir->Circ());
|
||||
ComputePointsOnCirc(circ,ptat1,ptat2,first);
|
||||
if ( first ) DsgPrs_MidPointPresentation::Add(aprs,myDrawer,circ,myMidPoint,myPosition,
|
||||
@@ -322,7 +322,7 @@ void AIS_MidPointRelation::ComputeEdgeFromPnt(const Handle(Prs3d_Presentation)&
|
||||
}
|
||||
else if ( geom->IsInstance(STANDARD_TYPE(Geom_Ellipse)) )
|
||||
{
|
||||
const Handle(Geom_Ellipse)& geom_ell = (Handle(Geom_Ellipse)&) geom;
|
||||
Handle(Geom_Ellipse) geom_ell (Handle(Geom_Ellipse)::DownCast (geom));
|
||||
gp_Elips elips (geom_ell->Elips());
|
||||
ComputePointsOnElips(elips,ptat1,ptat2,first);
|
||||
if ( first ) DsgPrs_MidPointPresentation::Add(aprs,myDrawer,elips,myMidPoint,myPosition,
|
||||
|
@@ -248,7 +248,7 @@ void AIS_ParallelRelation::ComputeTwoEdgesParallel(const Handle(Prs3d_Presentati
|
||||
|
||||
if (geom1->IsInstance(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
const Handle(Geom_Ellipse)& geom_el1 = (Handle(Geom_Ellipse)&) geom1;
|
||||
Handle(Geom_Ellipse) geom_el1 (Handle(Geom_Ellipse)::DownCast (geom1));
|
||||
// construct lines through focuses
|
||||
gp_Ax1 elAx = geom_el1->XAxis();
|
||||
l1 = gp_Lin(elAx);
|
||||
@@ -260,14 +260,14 @@ void AIS_ParallelRelation::ComputeTwoEdgesParallel(const Handle(Prs3d_Presentati
|
||||
}
|
||||
else if (geom1->IsInstance(STANDARD_TYPE(Geom_Line)))
|
||||
{
|
||||
const Handle(Geom_Line)& geom_lin1 = (Handle(Geom_Line)&) geom1;
|
||||
Handle(Geom_Line) geom_lin1 (Handle(Geom_Line)::DownCast (geom1));
|
||||
l1 = geom_lin1->Lin();
|
||||
}
|
||||
else return;
|
||||
|
||||
if (geom2->IsInstance(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
const Handle(Geom_Ellipse)& geom_el2 = (Handle(Geom_Ellipse)&) geom2;
|
||||
Handle(Geom_Ellipse) geom_el2 (Handle(Geom_Ellipse)::DownCast (geom2));
|
||||
// construct lines through focuses
|
||||
gp_Ax1 elAx = geom_el2->XAxis();
|
||||
l2 = gp_Lin(elAx);
|
||||
@@ -279,7 +279,7 @@ void AIS_ParallelRelation::ComputeTwoEdgesParallel(const Handle(Prs3d_Presentati
|
||||
}
|
||||
else if (geom2->IsInstance(STANDARD_TYPE(Geom_Line)))
|
||||
{
|
||||
const Handle(Geom_Line)& geom_lin2 = (Handle(Geom_Line)&) geom2;
|
||||
Handle(Geom_Line) geom_lin2 (Handle(Geom_Line)::DownCast (geom2));
|
||||
l2 = geom_lin2->Lin();
|
||||
}
|
||||
else return;
|
||||
|
@@ -212,7 +212,7 @@ void AIS_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs3d_
|
||||
Handle(Geom_Line) geom_lin2;
|
||||
if ( geom1->IsInstance(STANDARD_TYPE(Geom_Ellipse)) )
|
||||
{
|
||||
const Handle(Geom_Ellipse)& geom_el = (Handle(Geom_Ellipse)&) geom1;
|
||||
Handle(Geom_Ellipse) geom_el (Handle(Geom_Ellipse)::DownCast (geom1));
|
||||
// construct lines through focuses
|
||||
gp_Ax1 elAx = geom_el->XAxis();
|
||||
gp_Lin ll (elAx);
|
||||
@@ -225,13 +225,13 @@ void AIS_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs3d_
|
||||
}
|
||||
else if ( geom1->IsInstance(STANDARD_TYPE(Geom_Line)) )
|
||||
{
|
||||
geom_lin1 = (Handle(Geom_Line)&) geom1;
|
||||
geom_lin1 = Handle(Geom_Line)::DownCast (geom1);
|
||||
}
|
||||
else return;
|
||||
|
||||
if (geom2->IsInstance(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
const Handle(Geom_Ellipse)& geom_el = (Handle(Geom_Ellipse)&) geom2;
|
||||
Handle(Geom_Ellipse) geom_el (Handle(Geom_Ellipse)::DownCast (geom2));
|
||||
// construct lines through focuses
|
||||
gp_Ax1 elAx = geom_el->XAxis();
|
||||
gp_Lin ll (elAx);
|
||||
@@ -244,7 +244,7 @@ void AIS_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs3d_
|
||||
}
|
||||
else if ( geom2->IsInstance(STANDARD_TYPE(Geom_Line)) )
|
||||
{
|
||||
geom_lin2 = (Handle(Geom_Line)&) geom2;
|
||||
geom_lin2 = Handle(Geom_Line)::DownCast (geom2);
|
||||
}
|
||||
else return;
|
||||
|
||||
@@ -255,9 +255,9 @@ void AIS_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs3d_
|
||||
|
||||
// 2d lines => projection of 3d on current plane
|
||||
Handle(Geom2d_Curve) aGeom2dCurve = GeomAPI::To2d(geom_lin1,myPlane->Pln());
|
||||
Handle(Geom2d_Line) lin1_2d = (Handle(Geom2d_Line)&) aGeom2dCurve ;
|
||||
Handle(Geom2d_Line) lin1_2d = Handle(Geom2d_Line)::DownCast (aGeom2dCurve) ;
|
||||
aGeom2dCurve = GeomAPI::To2d(geom_lin2,myPlane->Pln());
|
||||
Handle(Geom2d_Line) lin2_2d = (Handle(Geom2d_Line)&) aGeom2dCurve ;
|
||||
Handle(Geom2d_Line) lin2_2d = Handle(Geom2d_Line)::DownCast (aGeom2dCurve) ;
|
||||
IntAna2d_AnaIntersection inter(lin1_2d->Lin2d(),lin2_2d->Lin2d());
|
||||
if (!inter.IsDone()) return;
|
||||
if (!inter.NbPoints()) return;
|
||||
|
@@ -251,7 +251,7 @@ void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
|
||||
{
|
||||
ComputeFrame();
|
||||
const Handle(Geom_Plane)& pl = myComponent;
|
||||
const Handle(Geom_Plane)& thegoodpl = Handle(Geom_Plane)::DownCast(pl->Translated(pl->Location(),myCenter));
|
||||
Handle(Geom_Plane) thegoodpl (Handle(Geom_Plane)::DownCast(pl->Translated(pl->Location(),myCenter)));
|
||||
GeomAdaptor_Surface surf(thegoodpl);
|
||||
StdPrs_Plane::Add(aPresentation,surf,myDrawer);
|
||||
}
|
||||
@@ -531,8 +531,7 @@ void AIS_Plane::ComputeFrame()
|
||||
pl->D0 (U, V, myCenter);
|
||||
}
|
||||
else {
|
||||
const Handle(Geom_Plane)& thegoodpl =
|
||||
Handle(Geom_Plane)::DownCast(pl->Translated(pl->Location(),myCenter));
|
||||
Handle(Geom_Plane) thegoodpl (Handle(Geom_Plane)::DownCast(pl->Translated(pl->Location(),myCenter)));
|
||||
ElSLib::Parameters(thegoodpl->Pln(),myPmin,U,V);
|
||||
|
||||
U = 2.4*Abs(U);
|
||||
|
@@ -101,7 +101,7 @@ void AIS_Relation::ComputeProjEdgePresentation(const Handle(Prs3d_Presentation)&
|
||||
|
||||
// Calcul de la presentation de l'edge
|
||||
if (ProjCurv->IsInstance(STANDARD_TYPE(Geom_Line)) ) {
|
||||
const Handle(Geom_Line) & gl = (Handle(Geom_Line)&) ProjCurv;
|
||||
Handle(Geom_Line) gl (Handle(Geom_Line)::DownCast (ProjCurv));
|
||||
if ( !isInfinite) {
|
||||
pf = ElCLib::Parameter(gl->Lin(),FirstP);
|
||||
pl = ElCLib::Parameter(gl->Lin(),LastP);
|
||||
@@ -114,7 +114,7 @@ void AIS_Relation::ComputeProjEdgePresentation(const Handle(Prs3d_Presentation)&
|
||||
}
|
||||
}
|
||||
else if (ProjCurv->IsInstance(STANDARD_TYPE(Geom_Circle)) ) {
|
||||
const Handle(Geom_Circle) & gc = (Handle(Geom_Circle)&) ProjCurv;
|
||||
Handle(Geom_Circle) gc (Handle(Geom_Circle)::DownCast (ProjCurv));
|
||||
pf = ElCLib::Parameter(gc->Circ(),FirstP);
|
||||
pl = ElCLib::Parameter(gc->Circ(),LastP);
|
||||
BRepBuilderAPI_MakeEdge MakEd(gc->Circ(),pf, pl);
|
||||
|
@@ -79,7 +79,7 @@ Handle(AIS_Selection) AIS_Selection::Selection(const Standard_CString aName)
|
||||
// Standard_Boolean found(Standard_False);
|
||||
for(Standard_Integer I =1; I<= AIS_Sel_GetSelections().Length();I++){
|
||||
curobj = AIS_Sel_GetSelections().Value(I);
|
||||
Sel = *((Handle(AIS_Selection)*)&curobj);
|
||||
Sel = Handle(AIS_Selection)::DownCast (curobj);
|
||||
if(Sel->myName.IsEqual(aName))
|
||||
return Sel;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ Standard_Integer AIS_Selection::Index(const Standard_CString aName)
|
||||
Handle (Standard_Transient) curobj;
|
||||
for(Standard_Integer I =1; I<= AIS_Sel_GetSelections().Length();I++){
|
||||
curobj = AIS_Sel_GetSelections().Value(I);
|
||||
if((*((Handle(AIS_Selection)*)&curobj))->myName.IsEqual(aName))
|
||||
if(Handle(AIS_Selection)::DownCast (curobj)->myName.IsEqual(aName))
|
||||
return I;
|
||||
}
|
||||
return 0;
|
||||
|
@@ -241,7 +241,7 @@ void AIS_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
|
||||
// Handle(Geom_Circle) geom_circ1 = (Handle(Geom_Circle)&) BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);
|
||||
//JR/Hp
|
||||
Handle(Geom_Curve) aGeomCurve = BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);
|
||||
Handle(Geom_Circle) geom_circ1 = (Handle(Geom_Circle)&) aGeomCurve ;
|
||||
Handle(Geom_Circle) geom_circ1 = Handle(Geom_Circle)::DownCast (aGeomCurve) ;
|
||||
// Handle(Geom_Circle) geom_circ1 = (const Handle(Geom_Circle)&) BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);
|
||||
gp_Circ circ1(geom_circ1->Circ());
|
||||
gp_Pnt OffsetPnt(myPosition.X(),myPosition.Y(),myPosition.Z());
|
||||
@@ -417,13 +417,13 @@ void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presenta
|
||||
myAxisDirAttach = laxis.Direction();
|
||||
|
||||
if(cu1.GetType() == GeomAbs_Line){
|
||||
const Handle(Geom_Line)& geom_lin1 = (Handle(Geom_Line)&) geom1;
|
||||
Handle(Geom_Line) geom_lin1 (Handle(Geom_Line)::DownCast (geom1));
|
||||
gp_Lin l1(geom_lin1->Lin());
|
||||
myFDirAttach = l1.Direction();
|
||||
}
|
||||
gp_Circ circ;
|
||||
if(cu1.GetType() == GeomAbs_Circle){
|
||||
const Handle(Geom_Circle)& geom_cir1 = (Handle(Geom_Circle)&) geom1;
|
||||
Handle(Geom_Circle) geom_cir1 (Handle(Geom_Circle)::DownCast (geom1));
|
||||
gp_Circ c(geom_cir1->Circ());
|
||||
circ = c;
|
||||
}
|
||||
@@ -444,13 +444,13 @@ void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presenta
|
||||
*/
|
||||
Standard_Boolean idem = Standard_False;
|
||||
if (isInfinite1 && isInfinite2) { // geom1 et geom2 sont des lignes
|
||||
const gp_Lin& line2 = ((Handle(Geom_Line)&) geom2)->Lin();
|
||||
const gp_Lin& line2 = Handle(Geom_Line)::DownCast (geom2)->Lin();
|
||||
if (myAutomaticPosition) {
|
||||
myFAttach = ((Handle(Geom_Line)&) geom1)->Lin().Location();
|
||||
myFAttach = Handle(Geom_Line)::DownCast (geom1)->Lin().Location();
|
||||
mySAttach = ElCLib::Value(ElCLib::Parameter(line2,myFAttach),line2);
|
||||
}
|
||||
else {
|
||||
const gp_Lin& line1 = ((Handle(Geom_Line)&) geom1)->Lin();
|
||||
const gp_Lin& line1 = Handle(Geom_Line)::DownCast (geom1)->Lin();
|
||||
myFAttach = ElCLib::Value(ElCLib::Parameter(line1,myPosition),line1);
|
||||
mySAttach = ElCLib::Value(ElCLib::Parameter(line2,myFAttach),line2);
|
||||
}
|
||||
@@ -486,12 +486,12 @@ void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presenta
|
||||
}
|
||||
else if (isInfinite1) {// geom1 et geom2 sont des lignes
|
||||
mySAttach = ptat21;
|
||||
const gp_Lin& line1 = ((Handle(Geom_Line)&) geom1)->Lin();
|
||||
const gp_Lin& line1 = Handle(Geom_Line)::DownCast (geom1)->Lin();
|
||||
myFAttach = ElCLib::Value(ElCLib::Parameter(line1,mySAttach),line1);
|
||||
}
|
||||
else if (isInfinite2) {// geom1 et geom2 sont des lignes
|
||||
myFAttach = ptat11;
|
||||
const gp_Lin& line2 = ((Handle(Geom_Line)&) geom2)->Lin();
|
||||
const gp_Lin& line2 = Handle(Geom_Line)::DownCast (geom2)->Lin();
|
||||
mySAttach = ElCLib::Value(ElCLib::Parameter(line2,myFAttach),line2);
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presenta
|
||||
gp_Pnt PjFAttach = ElCLib::Value(ElCLib::Parameter(laxis,myFAttach),laxis);
|
||||
|
||||
if (PjFAttach.IsEqual(myFAttach,Precision::Confusion())){
|
||||
const Handle(Geom_Line)& geom_lin2 = (Handle(Geom_Line)&) geom2;
|
||||
Handle(Geom_Line) geom_lin2 (Handle(Geom_Line)::DownCast (geom2));
|
||||
gp_Lin l2(geom_lin2->Lin());
|
||||
myFDirAttach = l2.Direction();
|
||||
gp_Pnt PntTempo;
|
||||
|
@@ -204,25 +204,25 @@ static Standard_Boolean ComputeTangencyPoint(const Handle(Geom_Curve)& GC1,
|
||||
gp_Vec aVector1,aVector2;
|
||||
if (GC1->IsInstance(STANDARD_TYPE(Geom_Circle)))
|
||||
{
|
||||
const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) GC1;
|
||||
Handle(Geom_Circle) circle (Handle(Geom_Circle)::DownCast (GC1));
|
||||
Standard_Real par_inter = ElCLib::Parameter(circle->Circ(), P1);
|
||||
ElCLib::D1(par_inter,circle->Circ(),P1,aVector1);
|
||||
}
|
||||
else if (GC1->IsInstance(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
const Handle(Geom_Ellipse)& ellipse = (Handle(Geom_Ellipse)&) GC1;
|
||||
Handle(Geom_Ellipse) ellipse (Handle(Geom_Ellipse)::DownCast (GC1));
|
||||
Standard_Real par_inter = ElCLib::Parameter(ellipse->Elips(), P1);
|
||||
ElCLib::D1(par_inter,ellipse->Elips(),P1,aVector1);
|
||||
}
|
||||
if (GC2->IsInstance(STANDARD_TYPE(Geom_Circle)))
|
||||
{
|
||||
const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) GC2;
|
||||
Handle(Geom_Circle) circle (Handle(Geom_Circle)::DownCast (GC2));
|
||||
Standard_Real par_inter = ElCLib::Parameter(circle->Circ(), P2);
|
||||
ElCLib::D1(par_inter,circle->Circ(),P2,aVector2);
|
||||
}
|
||||
else if (GC2->IsInstance(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
const Handle(Geom_Ellipse)& ellipse = (Handle(Geom_Ellipse)&) GC2;
|
||||
Handle(Geom_Ellipse) ellipse (Handle(Geom_Ellipse)::DownCast (GC2));
|
||||
Standard_Real par_inter = ElCLib::Parameter(ellipse->Elips(), P2);
|
||||
ElCLib::D1(par_inter,ellipse->Elips(),P2,aVector2);
|
||||
}
|
||||
@@ -333,8 +333,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
{
|
||||
case 12: // circle line
|
||||
{
|
||||
const Handle(Geom_Line)& line = (Handle(Geom_Line)&) copy1;
|
||||
const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) copy2;
|
||||
Handle(Geom_Line) line (Handle(Geom_Line)::DownCast (copy1));
|
||||
Handle(Geom_Circle) circle (Handle(Geom_Circle)::DownCast (copy2));
|
||||
|
||||
if ( !found )
|
||||
{
|
||||
@@ -355,8 +355,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
break;
|
||||
case 21: // circle line
|
||||
{
|
||||
const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) copy1;
|
||||
const Handle(Geom_Line)& line = (Handle(Geom_Line)&) copy2;
|
||||
Handle(Geom_Circle) circle (Handle(Geom_Circle)::DownCast (copy1));
|
||||
Handle(Geom_Line) line (Handle(Geom_Line)::DownCast (copy2));
|
||||
|
||||
if (!found)
|
||||
{
|
||||
@@ -378,8 +378,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
// jfa 19/10/2000 begin
|
||||
case 13: // line ellipse
|
||||
{
|
||||
const Handle(Geom_Line)& line = (Handle(Geom_Line)&) copy1;
|
||||
const Handle(Geom_Ellipse)& ellipse = (Handle(Geom_Ellipse)&) copy2;
|
||||
Handle(Geom_Line) line (Handle(Geom_Line)::DownCast (copy1));
|
||||
Handle(Geom_Ellipse) ellipse (Handle(Geom_Ellipse)::DownCast (copy2));
|
||||
|
||||
if (!found)
|
||||
{
|
||||
@@ -399,8 +399,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
break;
|
||||
case 31: // ellipse line
|
||||
{
|
||||
const Handle(Geom_Ellipse)& ellipse = (Handle(Geom_Ellipse)&) copy1;
|
||||
const Handle(Geom_Line)& line = (Handle(Geom_Line)&) copy2;
|
||||
Handle(Geom_Ellipse) ellipse (Handle(Geom_Ellipse)::DownCast (copy1));
|
||||
Handle(Geom_Line) line (Handle(Geom_Line)::DownCast (copy2));
|
||||
|
||||
if (!found)
|
||||
{
|
||||
@@ -420,8 +420,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
break;
|
||||
case 22: // circle circle
|
||||
{
|
||||
const Handle(Geom_Circle)& circle1 = (Handle(Geom_Circle)&) copy1;
|
||||
const Handle(Geom_Circle)& circle2 = (Handle(Geom_Circle)&) copy2;
|
||||
Handle(Geom_Circle) circle1 (Handle(Geom_Circle)::DownCast (copy1));
|
||||
Handle(Geom_Circle) circle2 (Handle(Geom_Circle)::DownCast (copy2));
|
||||
Standard_Real R1 = circle1->Radius();
|
||||
Standard_Real R2 = circle2->Radius();
|
||||
myLength = Max(R1,R2)/5.0;
|
||||
@@ -462,8 +462,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
break;
|
||||
case 23: // circle ellipse
|
||||
{
|
||||
const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) copy1;
|
||||
const Handle(Geom_Ellipse)& ellipse = (Handle(Geom_Ellipse)&) copy2;
|
||||
Handle(Geom_Circle) circle (Handle(Geom_Circle)::DownCast (copy1));
|
||||
Handle(Geom_Ellipse) ellipse (Handle(Geom_Ellipse)::DownCast (copy2));
|
||||
Standard_Real R1 = circle->Radius();
|
||||
Standard_Real R2 = ellipse->MajorRadius();
|
||||
myLength = Max(R1,R2)/5.0;
|
||||
@@ -492,8 +492,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
break;
|
||||
case 32: // ellipse circle
|
||||
{
|
||||
const Handle(Geom_Ellipse)& ellipse = (Handle(Geom_Ellipse)&) copy1;
|
||||
const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) copy2;
|
||||
Handle(Geom_Ellipse) ellipse (Handle(Geom_Ellipse)::DownCast (copy1));
|
||||
Handle(Geom_Circle) circle (Handle(Geom_Circle)::DownCast (copy2));
|
||||
Standard_Real R1 = ellipse->MajorRadius();
|
||||
Standard_Real R2 = circle->Radius();
|
||||
myLength = Max(R1,R2)/5.0;
|
||||
@@ -522,8 +522,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
|
||||
break;
|
||||
case 33: // ellipse ellipse
|
||||
{
|
||||
const Handle(Geom_Ellipse)& ellipse1 = (Handle(Geom_Ellipse)&) copy1;
|
||||
const Handle(Geom_Ellipse)& ellipse2 = (Handle(Geom_Ellipse)&) copy2;
|
||||
Handle(Geom_Ellipse) ellipse1 (Handle(Geom_Ellipse)::DownCast (copy1));
|
||||
Handle(Geom_Ellipse) ellipse2 (Handle(Geom_Ellipse)::DownCast (copy2));
|
||||
Standard_Real R1 = ellipse1->MajorRadius();
|
||||
Standard_Real R2 = ellipse2->MajorRadius();
|
||||
myLength = Max(R1,R2)/5.0;
|
||||
|
@@ -27,7 +27,7 @@ Standard_Boolean AIS_TypeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& anObj
|
||||
|
||||
//#ifndef OCCT_DEBUG
|
||||
Handle(SelectMgr_SelectableObject) aSelectableObject = anObj->Selectable() ;
|
||||
return ((Handle(AIS_InteractiveObject)&) aSelectableObject)->Type()== myKind;
|
||||
return Handle(AIS_InteractiveObject)::DownCast (aSelectableObject)->Type()== myKind;
|
||||
//#else
|
||||
// return ((Handle(AIS_InteractiveObject)&)anObj->Selectable())->Type()== myKind;
|
||||
//#endif
|
||||
|
Reference in New Issue
Block a user