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());
}
if (theCurve->IsInstance (STANDARD_TYPE (Geom_TrimmedCurve)))
{
- theCurve = ((Handle(Geom_TrimmedCurve)&) theCurve)->BasisCurve();
+ theCurve = Handle(Geom_TrimmedCurve)::DownCast (theCurve)->BasisCurve();
}
if (!theIsInfinite)
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(),
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());
}
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());
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,
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());
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());
{
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)
{
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();
{
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)
{
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))
{
// 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);
}
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);
//#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;
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));
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;
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() );
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();
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();
}
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();
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
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);
}
}
}
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);
}
}
{
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);
}
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())
}
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;
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();
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;
}
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();
}
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();
}
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);
}
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();
}
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();
}
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();
{
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;
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.
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);
}
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) )
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);
{
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();
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() )
{
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;
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;
}
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())
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())
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;
}
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()){
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);
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);
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);
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);
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,
}
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,
}
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,
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);
}
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);
}
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;
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);
}
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);
}
else if ( geom2->IsInstance(STANDARD_TYPE(Geom_Line)) )
{
- geom_lin2 = (Handle(Geom_Line)&) geom2;
+ geom_lin2 = Handle(Geom_Line)::DownCast (geom2);
}
else return;
// 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;
{
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);
}
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);
// 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);
}
}
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);
// 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;
}
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;
// 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());
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;
}
*/
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);
}
}
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);
}
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;
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);
}
{
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 )
{
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)
{
// 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)
{
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)
{
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;
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;
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;
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;
//#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
#include <TColgp_HArray1OfVec2d.hxx>
-#define tabTang (*(Handle(TColgp_HArray1OfVec)*)&ttabTang)
-#define tabCurv (*(Handle(TColgp_HArray1OfVec)*)&ttabCurv)
-#define tabTang2d (*(Handle(TColgp_HArray1OfVec2d)*)&ttabTang2d)
-#define tabCurv2d (*(Handle(TColgp_HArray1OfVec2d)*)&ttabCurv2d)
+#define tabTang Handle(TColgp_HArray1OfVec)::DownCast (ttabTang)
+#define tabCurv Handle(TColgp_HArray1OfVec)::DownCast (ttabCurv)
+#define tabTang2d Handle(TColgp_HArray1OfVec2d)::DownCast (ttabTang2d)
+#define tabCurv2d Handle(TColgp_HArray1OfVec2d)::DownCast (ttabCurv2d)
Standard_Real t, R1, R2;
Handle(PLib_Base) myBase = Curve->Base();
- Handle(PLib_HermitJacobi) myHermitJacobi = (*((Handle(PLib_HermitJacobi)*)&myBase));
+ Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
Standard_Integer Order = myHermitJacobi->NivConstr() + 1;
Standard_Real UFirst, ULast, coeff, c0, mfact, mfact1;
#include <Standard_OutOfRange.hxx>
-#define tabPoint (*(Handle(TColgp_HArray1OfPnt)*)&ttabPoint)
-#define tabPoint2d (*(Handle(TColgp_HArray1OfPnt2d)*)&ttabPoint2d)
+#define tabPoint Handle(TColgp_HArray1OfPnt)::DownCast (ttabPoint)
+#define tabPoint2d Handle(TColgp_HArray1OfPnt2d)::DownCast (ttabPoint2d)
AppParCurves_MultiPoint::AppParCurves_MultiPoint() {}
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,l)) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
GC->Range(First,Last);
if (GC->IsCurveOnClosedSurface() && Eisreversed)
return GC->PCurve2();
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,loc)) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
GC->Range(First,Last);
if (GC->IsCurveOnClosedSurface() && Eisreversed)
return GC->PCurve2();
if (!LC.IsIdentity()) {
const gp_Trsf& T = LC.Transformation();
Handle(Geom_Geometry) GPT = GP->Transformed(T);
- Plane = *((Handle(Geom_Plane)*)&GPT);
+ Plane = Handle(Geom_Plane)::DownCast (GPT);
}
GeomAdaptor_Surface& GAS = HS->ChangeSurface();
GAS.Load(Plane);
if (pc->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
Handle(Geom2d_TrimmedCurve) TC =
- (*((Handle(Geom2d_TrimmedCurve)*)&pc));
+ Handle(Geom2d_TrimmedCurve)::DownCast (pc);
pc = TC->BasisCurve();
}
First = f; Last = l;
//
aOrV=aV.Orientation();
if (aOrV==TopAbs_FORWARD || aOrV==TopAbs_REVERSED) {
- const Handle(BRep_GCurve)& aGC=*((Handle(BRep_GCurve)*)&aCR);
+ Handle(BRep_GCurve) aGC (Handle(BRep_GCurve)::DownCast (aCR));
if (aOrV==TopAbs_FORWARD) {
aPC=aC->Value(aGC->First());
}
if (!myCref.IsNull()) {
- const Handle(BRep_GCurve)& GCref =
- *((Handle(BRep_GCurve)*)&myCref);
+ Handle(BRep_GCurve) GCref (Handle(BRep_GCurve)::DownCast (myCref));
Standard_Real First,Last;
GCref->Range(First,Last);
if (Last<=First) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
pcurvefound = Standard_True;
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
Standard_Real f,l;
GC->Range(f,l);
if (SameRange && (f != First || l != Last)) {
Handle(Geom_Geometry) S1;
if (!L.IsIdentity()) {
S1 = S->Copy();
- S = *((Handle(Geom_Surface)*)&S1);
+ S = Handle(Geom_Surface)::DownCast (S1);
S->Transform(L.Transformation());
}
return S;
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurve3D()) {
- const Handle(BRep_Curve3D)& GC = *((Handle(BRep_Curve3D)*)&cr);
+ Handle(BRep_Curve3D) GC (Handle(BRep_Curve3D)::DownCast (cr));
L = E.Location() * GC->Location();
GC->Range(First,Last);
return GC->Curve3D();
Handle(Geom_Geometry) C1;
if ( !L.IsIdentity() ) {
C1 = C->Copy();
- C = *((Handle(Geom_Curve)*)&C1);
+ C = Handle(Geom_Curve)::DownCast (C1);
C->Transform(L.Transformation());
}
}
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsPolygon3D()) {
- const Handle(BRep_Polygon3D)& GC = *((Handle(BRep_Polygon3D)*)&cr);
+ Handle(BRep_Polygon3D) GC (Handle(BRep_Polygon3D)::DownCast (cr));
L = E.Location() * GC->Location();
return GC->Polygon3D();
}
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,loc)) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
GC->Range(First,Last);
if (GC->IsCurveOnClosedSurface() && Eisreversed)
return GC->PCurve2();
{
const gp_Trsf& T = aCurveLocation.Transformation();
Handle(Geom_Geometry) GC3d = C3d->Transformed(T);
- C3d = *((Handle(Geom_Curve)*)&GC3d);
+ C3d = Handle(Geom_Curve)::DownCast (GC3d);
f = C3d->TransformedParameter(f, T);
l = C3d->TransformedParameter(l, T);
}
if (pc->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
Handle(Geom2d_TrimmedCurve) TC =
- (*((Handle(Geom2d_TrimmedCurve)*)&pc));
+ Handle(Geom2d_TrimmedCurve)::DownCast (pc);
pc = TC->BasisCurve();
}
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface()) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
C = GC->PCurve();
S = GC->Surface();
L = E.Location() * GC->Location();
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface()) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
i++;
if (i > Index) break;
if (i == Index) {
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsPolygonOnSurface()) {
- const Handle(BRep_PolygonOnSurface)& PS =
- *((Handle(BRep_PolygonOnSurface)*)&cr);
+ Handle(BRep_PolygonOnSurface) PS (Handle(BRep_PolygonOnSurface)::DownCast (cr));
P = PS->Polygon();
S = PS->Surface();
L = E.Location() * PS->Location();
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsPolygonOnSurface()) {
- const Handle(BRep_PolygonOnSurface)& PS =
- *((Handle(BRep_PolygonOnSurface)*)&cr);
+ Handle(BRep_PolygonOnSurface) PS (Handle(BRep_PolygonOnSurface)::DownCast (cr));
i++;
if (i > Index) break;
if (i == Index) {
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsPolygonOnTriangulation()) {
- const Handle(BRep_PolygonOnTriangulation)& PT =
- *((Handle(BRep_PolygonOnTriangulation)*)&cr);
+ Handle(BRep_PolygonOnTriangulation) PT (Handle(BRep_PolygonOnTriangulation)::DownCast (cr));
P = PT->PolygonOnTriangulation();
T = PT->Triangulation();
L = E.Location() * PT->Location();
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsPolygonOnTriangulation()) {
- const Handle(BRep_PolygonOnTriangulation)& PT =
- *((Handle(BRep_PolygonOnTriangulation)*)&cr);
+ Handle(BRep_PolygonOnTriangulation) PT (Handle(BRep_PolygonOnTriangulation)::DownCast (cr));
i++;
if (i > Index) break;
if (i == Index) {
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurve3D()) {
- const Handle(BRep_Curve3D)& CR = *((Handle(BRep_Curve3D)*)&cr);
+ Handle(BRep_Curve3D) CR (Handle(BRep_Curve3D)::DownCast (cr));
if (!CR->Curve3D().IsNull()) {
First = CR->First();
Last = CR->Last();
}
}
else if (cr->IsCurveOnSurface()) {
- const Handle(BRep_GCurve)& CR = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) CR (Handle(BRep_GCurve)::DownCast (cr));
First = CR->First();
Last = CR->Last();
break;
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,l)) {
- (*((Handle(BRep_GCurve)*)&cr))->Range(First,Last);
+ Handle(BRep_GCurve)::DownCast (cr)->Range(First,Last);
break;
}
itcr.Next();
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,l)) {
if (cr->IsCurveOnClosedSurface() && Eisreversed)
- (*((Handle(BRep_CurveOnClosedSurface)*)&cr))->UVPoints2(PFirst,PLast);
+ Handle(BRep_CurveOnClosedSurface)::DownCast (cr)->UVPoints2(PFirst,PLast);
else
- (*((Handle(BRep_CurveOnSurface)*)&cr))->UVPoints(PFirst,PLast);
+ Handle(BRep_CurveOnSurface)::DownCast (cr)->UVPoints(PFirst,PLast);
return;
}
itcr.Next();
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,l)) {
if (cr->IsCurveOnClosedSurface() && Eisreversed)
- (*((Handle(BRep_CurveOnClosedSurface)*) &cr))->
+ Handle(BRep_CurveOnClosedSurface)::DownCast (cr)->
SetUVPoints2(PFirst,PLast);
else
- (*((Handle(BRep_CurveOnSurface)*) &cr))->
+ Handle(BRep_CurveOnSurface)::DownCast (cr)->
SetUVPoints(PFirst,PLast);
}
itcr.Next();
}
if (!myCref.IsNull()) {
- const Handle(BRep_GCurve)& GCref = *((Handle(BRep_GCurve)*)&myCref);
+ Handle(BRep_GCurve) GCref (Handle(BRep_GCurve)::DownCast (myCref));
Standard_Real First,Last;
GCref->Range(First,Last);
if (Last<=First) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
pcurvefound = Standard_True;
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
Standard_Real f,l;
GC->Range(f,l);
Standard_Real ff = f, ll = l;
}
const Handle(BRep_CurveRepresentation) aCR = anITCR.Value();
- const Handle(BRep_PolygonOnTriangulation)& aPT =
- Handle(BRep_PolygonOnTriangulation)::DownCast(aCR);
+ Handle(BRep_PolygonOnTriangulation) aPT (Handle(BRep_PolygonOnTriangulation)::DownCast(aCR));
const TopLoc_Location aLL = theEdge.Location() * aPT->Location();
itpr.Next();
}
if (orv == TopAbs_FORWARD || orv == TopAbs_REVERSED) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
if (orv == TopAbs_FORWARD || multiple) {
Controlp = C->Value(GC->First());
Controlp.Transform(L.Transformation());
typS2 = S2->DynamicType();
if (typS1 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S1 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S1))->BasisSurface();
+ S1 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S1)->BasisSurface();
typS1 = S1->DynamicType();
}
if (typS2 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S2 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S2))->BasisSurface();
+ S2 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S2)->BasisSurface();
typS2 = S2->DynamicType();
}
if (typS1 == STANDARD_TYPE(Geom_Plane)) {
S1 = BRep_Tool::Surface(F1); // to apply the location.
S2 = BRep_Tool::Surface(F2);
- gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln());
- gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln());
+ gp_Pln pl1( Handle(Geom_Plane)::DownCast (S1)->Pln());
+ gp_Pln pl2( Handle(Geom_Plane)::DownCast (S2)->Pln());
if (pl1.Position().IsCoplanar(pl2.Position(),tollin,tolang)) {
ValRet = Standard_True;
typS2 = S2->DynamicType();
if (typS1 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S1 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S1))->BasisSurface();
+ S1 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S1)->BasisSurface();
typS1 = S1->DynamicType();
}
if (typS2 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S2 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S2))->BasisSurface();
+ S2 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S2)->BasisSurface();
typS2 = S2->DynamicType();
}
if (typS1 == STANDARD_TYPE(Geom_Plane)) {
S1 = BRep_Tool::Surface(F1); // to apply the location.
S2 = BRep_Tool::Surface(F2);
- gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln());
- gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln());
+ gp_Pln pl1( Handle(Geom_Plane)::DownCast (S1)->Pln());
+ gp_Pln pl2( Handle(Geom_Plane)::DownCast (S2)->Pln());
if (pl1.Position().IsCoplanar(pl2.Position(),tollin,tolang)) {
ValRet = Standard_True;
typS2 = S2->DynamicType();
if (typS1 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S1 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S1))->BasisSurface();
+ S1 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S1)->BasisSurface();
typS1 = S1->DynamicType();
}
if (typS2 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S2 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S2))->BasisSurface();
+ S2 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S2)->BasisSurface();
typS2 = S2->DynamicType();
}
if (typS1 == STANDARD_TYPE(Geom_Plane)) {
S1 = BRep_Tool::Surface(F1); // to apply the location.
S2 = BRep_Tool::Surface(F2);
- gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln());
- gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln());
+ gp_Pln pl1( Handle(Geom_Plane)::DownCast (S1)->Pln());
+ gp_Pln pl2( Handle(Geom_Plane)::DownCast (S2)->Pln());
if (pl1.Position().IsCoplanar(pl2.Position(),tollin,tolang)) {
ValRet = Standard_True;
C->DynamicType() == STANDARD_TYPE(Geom_OffsetCurve))
{
if (C->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve))
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
if (C->DynamicType() == STANDARD_TYPE(Geom_OffsetCurve))
- C = (*((Handle(Geom_OffsetCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_OffsetCurve)::DownCast (C)->BasisCurve();
}
if (C->DynamicType() == STANDARD_TYPE(Geom_BSplineCurve))
{
- const Handle(Geom_BSplineCurve)& BC = *((Handle(Geom_BSplineCurve)*)&C);
+ Handle(Geom_BSplineCurve) BC (Handle(Geom_BSplineCurve)::DownCast (C));
Standard_Integer NbKnots = BC->NbKnots();
Standard_Integer RealNbKnots = NbKnots;
if (first > BC->FirstParameter())
while (itcr.More()) {
Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,l)) {
- Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve)& GC = Handle(BRep_GCurve)::DownCast (cr);
if (GC->IsCurveOnClosedSurface() && Eisreversed)
return GC->PCurve2();
else
const Handle(BRep_CurveRepresentation)& CurveRep = itrep.Value();
if (CurveRep->IsCurveOnSurface())
{
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&CurveRep);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (CurveRep));
Handle(Geom2d_Curve) aPCurve = GC->PCurve();
Handle(Geom_Surface) aSurf = GC->Surface();
TopLoc_Location aLoc = aNewEdge.Location() * GC->Location();
{
const GeomAdaptor_Curve& GAC = BAC.Curve();
const Handle(Geom_Curve)& GC = GAC.Curve();
- const Handle(Geom_BezierCurve)& GBZC = (*((Handle(Geom_BezierCurve)*)&GC));
+ Handle(Geom_BezierCurve) GBZC (Handle(Geom_BezierCurve)::DownCast (GC));
Standard_Integer n = 2*(GBZC->NbPoles()) - 1;
return n;
}
{
const GeomAdaptor_Curve& GAC = BAC.Curve();
const Handle(Geom_Curve)& GC = GAC.Curve();
- const Handle(Geom_BSplineCurve)& GBSC = (*((Handle(Geom_BSplineCurve)*)&GC));
+ Handle(Geom_BSplineCurve) GBSC (Handle(Geom_BSplineCurve)::DownCast (GC));
Standard_Integer n = 2*(GBSC->NbPoles()) - 1;
return n;
}
GeomAdaptor_Curve aCurve;
Handle(Geom_Surface) aSurf = mySurface.Surface().Surface();
- aCurve.Load((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&aSurf))->BasisCurve());
+ aCurve.Load(Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (aSurf)->BasisCurve());
isCBSpline = aCurve.GetType() == GeomAbs_BSplineCurve;
}
}
Handle(Geom_Surface) aSurf = mySurface.Surface().Surface();
Handle(Geom_BSplineCurve) aBSplCurve;
- aCurve.Load((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&aSurf))->BasisCurve());
+ aCurve.Load(Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (aSurf)->BasisCurve());
aBSplCurve = aCurve.BSpline();
aNbKnots = aBSplCurve->NbKnots();
aKnots = new TColStd_HArray1OfReal(1, aNbKnots);
Handle(Standard_Type) TheType = C3d->DynamicType();
if( TheType == STANDARD_TYPE(Geom_TrimmedCurve))
{
- const Handle(Geom_Curve)& gtC = (*((Handle(Geom_TrimmedCurve)*)&C3d))->BasisCurve();
+ Handle(Geom_Curve) gtC (Handle(Geom_TrimmedCurve)::DownCast (C3d)->BasisCurve());
m_TrimmedPeriodical = gtC->IsPeriodic();
}
// modified by NIZHNY-OCC486 Tue Aug 27 17:15:17 2002 .
aB.SetVoid();
BRepBndLib::Add(curf,aB);
if (S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S = (*((Handle(Geom_RectangularTrimmedSurface)*)&S))->BasisSurface();
+ S = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
}
GeomAdaptor_Surface AS(S);
switch (AS.GetType()) {
S = BRep_Tool::Surface(F, l);
if (!S.IsNull()) {
if (S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S = (*((Handle(Geom_RectangularTrimmedSurface)*)&S))->BasisSurface();
+ S = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
}
GeomAdaptor_Surface AS(S);
switch (AS.GetType()) {
S = BRep_Tool::Surface(F, l);
if (!S.IsNull()) {
if (S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S = (*((Handle(Geom_RectangularTrimmedSurface)*)&S))->BasisSurface();
+ S = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
}
GeomAdaptor_Surface AS(S);
switch (AS.GetType()) {
static void MakeClosedCurve(Handle(Geom_Curve)& C, const gp_Pnt& PF,
Standard_Real& f, Standard_Real& l)
{
- Handle(Geom_BSplineCurve) aBC = (*((Handle(Geom_BSplineCurve)*)&C));
+ Handle(Geom_BSplineCurve) aBC = Handle(Geom_BSplineCurve)::DownCast (C);
GeomAbs_Shape aCont = aBC->Continuity();
//Find new origin
aBC->SetPeriodic();
// if the curve is trimmed we get the basis curve to fit the new vertices
// otherwise the makeedge will fail.
if (C->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
}
if(myConcatBSpl) {
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG1 = C1->Transformed(loc.Transformation());
- C1 = *((Handle(Geom_Curve)*)&GG1);
+ C1 = Handle(Geom_Curve)::DownCast (GG1);
}
C2 = BRep_Tool::Curve(E2,loc,f2,l2);
//modified by NIZNHY-PKV Mon Nov 15 16:24:38 1999
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG2 = C2->Transformed(loc.Transformation());
- C2 = *((Handle(Geom_Curve)*)&GG2);
+ C2 = Handle(Geom_Curve)::DownCast (GG2);
}
typC1 = C1->DynamicType();
typC2 = C2->DynamicType();
if (typC1 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C1 = (*((Handle(Geom_TrimmedCurve)*)&C1))->BasisCurve();
+ C1 = Handle(Geom_TrimmedCurve)::DownCast (C1)->BasisCurve();
typC1 = C1->DynamicType();
}
if (typC2 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C2 = (*((Handle(Geom_TrimmedCurve)*)&C2))->BasisCurve();
+ C2 = Handle(Geom_TrimmedCurve)::DownCast (C2)->BasisCurve();
typC2 = C2->DynamicType();
}
const Standard_Real tollin = Precision::Confusion();
const Standard_Real tolang = Precision::Angular();
if (typC1 == STANDARD_TYPE(Geom_Line)) {
- gp_Lin li1( (*((Handle(Geom_Line)*)&C1))->Lin());
- gp_Lin li2( (*((Handle(Geom_Line)*)&C2))->Lin());
+ gp_Lin li1( Handle(Geom_Line)::DownCast (C1)->Lin());
+ gp_Lin li2( Handle(Geom_Line)::DownCast (C2)->Lin());
gp_Dir dir1(li1.Direction());
gp_Dir dir2(li2.Direction());
return Standard_False;
}
else if (typC1 == STANDARD_TYPE(Geom_Circle)) {
- gp_Circ ci1 = (*((Handle(Geom_Circle)*)&C1))->Circ();
- gp_Circ ci2 = (*((Handle(Geom_Circle)*)&C2))->Circ();
+ gp_Circ ci1 = Handle(Geom_Circle)::DownCast (C1)->Circ();
+ gp_Circ ci2 = Handle(Geom_Circle)::DownCast (C2)->Circ();
if (Abs(ci1.Radius()-ci2.Radius()) <= tollin &&
ci1.Location().SquareDistance(ci2.Location()) <= tollin*tollin &&
ci1.Axis().IsParallel(ci2.Axis(),tolang) ) {
return Standard_False;
}
else if (typC1 == STANDARD_TYPE(Geom_Ellipse)) {
- gp_Elips ci1 = (*((Handle(Geom_Ellipse)*)&C1))->Elips();
- gp_Elips ci2 = (*((Handle(Geom_Ellipse)*)&C2))->Elips();
+ gp_Elips ci1 = Handle(Geom_Ellipse)::DownCast (C1)->Elips();
+ gp_Elips ci2 = Handle(Geom_Ellipse)::DownCast (C2)->Elips();
if (Abs(ci1.MajorRadius()-ci2.MajorRadius()) <= tollin &&
Abs(ci1.MinorRadius()-ci2.MinorRadius()) <= tollin &&
return Standard_False;
}
- Handle(Geom_BSplineCurve) B1 = *((Handle(Geom_BSplineCurve)*)&C1);
- Handle(Geom_BSplineCurve) B2 = *((Handle(Geom_BSplineCurve)*)&C2);
+ Handle(Geom_BSplineCurve) B1 = Handle(Geom_BSplineCurve)::DownCast (C1);
+ Handle(Geom_BSplineCurve) B2 = Handle(Geom_BSplineCurve)::DownCast (C2);
Standard_Integer nbpoles = B1->NbPoles();
if (nbpoles != B2->NbPoles()) {
return Standard_False;
}
- Handle(Geom_BezierCurve) B1 = *((Handle(Geom_BezierCurve)*)&C1);
- Handle(Geom_BezierCurve) B2 = *((Handle(Geom_BezierCurve)*)&C2);
+ Handle(Geom_BezierCurve) B1 = Handle(Geom_BezierCurve)::DownCast (C1);
+ Handle(Geom_BezierCurve) B2 = Handle(Geom_BezierCurve)::DownCast (C2);
Standard_Integer nbpoles = B1->NbPoles();
if (nbpoles != B2->NbPoles()) {
Handle(Geom2d_Curve) Curv2dR = BRep_Tool::CurveOnSurface(aFEdge,
aFFace,cf,cl);
if (Curv2d->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
- Curv2d = (*((Handle(Geom2d_TrimmedCurve)*)&Curv2d))->BasisCurve();
+ Curv2d = Handle(Geom2d_TrimmedCurve)::DownCast (Curv2d)->BasisCurve();
if (Curv2dR->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
- Curv2dR = (*((Handle(Geom2d_TrimmedCurve)*)&Curv2dR))->BasisCurve();
+ Curv2dR = Handle(Geom2d_TrimmedCurve)::DownCast (Curv2dR)->BasisCurve();
B.UpdateEdge (theNewEdge,Curv2d,Curv2dR,Surf,loc,BRep_Tool::Tolerance(theNewEdge));
}
else {
// update the new edge
if (Curv2d->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
- Curv2d = (*((Handle(Geom2d_TrimmedCurve)*)&Curv2d))->BasisCurve();
+ Curv2d = Handle(Geom2d_TrimmedCurve)::DownCast (Curv2d)->BasisCurve();
Standard_Real f, l;
f = Curv2d->FirstParameter();
l = Curv2d->LastParameter();
GeomAbs_CurveType aTypeCurve = GeomAbs_OtherCurve;
Handle(Standard_Type) TheType = theC2d->DynamicType();
if ( TheType == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
- TheType = (*((Handle(Geom2d_TrimmedCurve)*)&theC2d))->BasisCurve()->DynamicType();
+ TheType = Handle(Geom2d_TrimmedCurve)::DownCast (theC2d)->BasisCurve()->DynamicType();
}
if ( TheType == STANDARD_TYPE(Geom2d_Circle)) {
{
NewPCurve = aPCurve;
if (NewPCurve->IsInstance(STANDARD_TYPE(Geom2d_TrimmedCurve)))
- NewPCurve = (*((Handle(Geom2d_TrimmedCurve)*)&NewPCurve))->BasisCurve();
+ NewPCurve = Handle(Geom2d_TrimmedCurve)::DownCast (NewPCurve)->BasisCurve();
Standard_Real FirstPar = NewPCurve->FirstParameter();
Standard_Real LastPar = NewPCurve->LastParameter();
{
if (NewPCurve->IsInstance(STANDARD_TYPE(Geom2d_BezierCurve)))
{
- Handle(Geom2d_BezierCurve) aBezier = *((Handle(Geom2d_BezierCurve)*)&NewPCurve);
+ Handle(Geom2d_BezierCurve) aBezier = Handle(Geom2d_BezierCurve)::DownCast (NewPCurve);
if (aBezier->NbPoles() == 2)
{
TColgp_Array1OfPnt2d thePoles(1,2);
}
else if (NewPCurve->IsInstance(STANDARD_TYPE(Geom2d_BSplineCurve)))
{
- Handle(Geom2d_BSplineCurve) aBSpline = *((Handle(Geom2d_BSplineCurve)*)&NewPCurve);
+ Handle(Geom2d_BSplineCurve) aBSpline = Handle(Geom2d_BSplineCurve)::DownCast (NewPCurve);
if (aBSpline->NbKnots() == 2 && aBSpline->NbPoles() == 2)
{
TColgp_Array1OfPnt2d thePoles(1,2);
else if (MinSurf->IsInstance(STANDARD_TYPE(Geom_CylindricalSurface)) ||
MinSurf->IsInstance(STANDARD_TYPE(Geom_ConicalSurface)))
{
- Handle(Geom2d_Line) theLine = *((Handle(Geom2d_Line)*)&MinPC);
+ Handle(Geom2d_Line) theLine = Handle(Geom2d_Line)::DownCast (MinPC);
gp_Dir2d LineDir = theLine->Direction();
if (LineDir.IsParallel( gp::DY2d(), Precision::Angular() ))
IsLine = Standard_True;
if (theCurve->IsInstance(STANDARD_TYPE(Geom2d_Line)) &&
theSurf->IsKind(STANDARD_TYPE(Geom_BoundedSurface)))
{
- gp_Dir2d theDir = (*((Handle(Geom2d_Line)*)&theCurve))->Direction();
+ gp_Dir2d theDir = Handle(Geom2d_Line)::DownCast (theCurve)->Direction();
if (theDir.IsParallel(gp::DX2d(), Precision::Angular()) ||
theDir.IsParallel(gp::DY2d(), Precision::Angular()))
{
Standard_Real U1, U2, V1, V2;
theSurf->Bounds(U1, U2, V1, V2);
- gp_Pnt2d Origin = (*((Handle(Geom2d_Line)*)&theCurve))->Location();
+ gp_Pnt2d Origin = Handle(Geom2d_Line)::DownCast (theCurve)->Location();
if (Abs(Origin.X()-U1) <= Precision::Confusion() ||
Abs(Origin.X()-U2) <= Precision::Confusion() ||
Abs(Origin.Y()-V1) <= Precision::Confusion() ||
}
if (TheSurf->DynamicType() == STANDARD_TYPE(Geom_ConicalSurface))
{
- gp_Cone theCone = (*((Handle(Geom_ConicalSurface)*)&TheSurf))->Cone();
+ gp_Cone theCone = Handle(Geom_ConicalSurface)::DownCast (TheSurf)->Cone();
gp_Pnt apex = theCone.Apex();
Standard_Real Uapex, Vapex;
ElSLib::Parameters( theCone, apex, Uapex, Vapex );
Handle(Geom_Curve) uiso = TheSurf->UIso( uf1 );
if (BRepOffset_Tool::Gabarit( uiso ) > TolApex)
{
- Handle(Geom_Surface) BasisSurf = (*((Handle(Geom_OffsetSurface)*)&TheSurf))->BasisSurface();
+ Handle(Geom_Surface) BasisSurf = Handle(Geom_OffsetSurface)::DownCast (TheSurf)->BasisSurface();
gp_Pnt Papex, Pfirst, Pquart, Pmid;
Papex = BasisSurf->Value( uf1, vf1 );
Pfirst = TheSurf->Value( uf1, vf1 );
if (OffsetOutside)
{
TheSurf = new Geom_RectangularTrimmedSurface(TheSurf, uf1, uf2, vf1, vf2);
- GeomLib::ExtendSurfByLength(*((Handle(Geom_BoundedSurface)*)&TheSurf), length, 1,
+ GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)::DownCast (TheSurf), length, 1,
Standard_True, Standard_False);
Standard_Real u1, u2, v1, v2;
TheSurf->Bounds( u1, u2, v1, v2 );
Handle(Geom_Curve) uiso = TheSurf->UIso( uf2 );
if (BRepOffset_Tool::Gabarit( uiso ) > TolApex)
{
- Handle(Geom_Surface) BasisSurf = (*((Handle(Geom_OffsetSurface)*)&TheSurf))->BasisSurface();
+ Handle(Geom_Surface) BasisSurf = Handle(Geom_OffsetSurface)::DownCast (TheSurf)->BasisSurface();
gp_Pnt Papex, Pfirst, Pquart, Pmid;
Papex = BasisSurf->Value( uf2, vf1 );
Pfirst = TheSurf->Value( uf2, vf1 );
if (OffsetOutside)
{
TheSurf = new Geom_RectangularTrimmedSurface(TheSurf, uf1, uf2, vf1, vf2);
- GeomLib::ExtendSurfByLength(*((Handle(Geom_BoundedSurface)*)&TheSurf), length, 1,
+ GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)::DownCast (TheSurf), length, 1,
Standard_True, Standard_True);
Standard_Real u1, u2, v1, v2;
TheSurf->Bounds( u1, u2, v1, v2 );
Handle(Geom_Curve) viso = TheSurf->VIso( vf1 );
if (BRepOffset_Tool::Gabarit( viso ) > TolApex)
{
- Handle(Geom_Surface) BasisSurf = (*((Handle(Geom_OffsetSurface)*)&TheSurf))->BasisSurface();
+ Handle(Geom_Surface) BasisSurf = Handle(Geom_OffsetSurface)::DownCast (TheSurf)->BasisSurface();
gp_Pnt Papex, Pfirst, Pquart, Pmid;
Papex = BasisSurf->Value( uf1, vf1 );
Pfirst = TheSurf->Value( uf1, vf1 );
if (OffsetOutside)
{
TheSurf = new Geom_RectangularTrimmedSurface(TheSurf, uf1, uf2, vf1, vf2);
- GeomLib::ExtendSurfByLength(*((Handle(Geom_BoundedSurface)*)&TheSurf), length, 1,
+ GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)::DownCast (TheSurf), length, 1,
Standard_False, Standard_False);
Standard_Real u1, u2, v1, v2;
TheSurf->Bounds( u1, u2, v1, v2 );
Handle(Geom_Curve) viso = TheSurf->VIso( vf2 );
if (BRepOffset_Tool::Gabarit( viso ) > TolApex)
{
- Handle(Geom_Surface) BasisSurf = (*((Handle(Geom_OffsetSurface)*)&TheSurf))->BasisSurface();
+ Handle(Geom_Surface) BasisSurf = Handle(Geom_OffsetSurface)::DownCast (TheSurf)->BasisSurface();
gp_Pnt Papex, Pfirst, Pquart, Pmid;
Papex = BasisSurf->Value( uf1, vf2 );
Pfirst = TheSurf->Value( uf1, vf2 );
if (OffsetOutside)
{
TheSurf = new Geom_RectangularTrimmedSurface(TheSurf, uf1, uf2, vf1, vf2);
- GeomLib::ExtendSurfByLength(*((Handle(Geom_BoundedSurface)*)&TheSurf), length, 1,
+ GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)::DownCast (TheSurf), length, 1,
Standard_False, Standard_True);
Standard_Real u1, u2, v1, v2;
TheSurf->Bounds( u1, u2, v1, v2 );
Handle (Geom_Surface) S = BRep_Tool::Surface(F,L);
if (S->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
- S = (*(Handle(Geom_RectangularTrimmedSurface)*)&S)->BasisSurface();
+ S = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
}
//---------------
// Recadre en U.
Handle( Geom_Surface ) theSurf = BRep_Tool::Surface( F );
Handle( Standard_Type ) typS = theSurf->DynamicType();
if (typS == STANDARD_TYPE(Geom_OffsetSurface))
- typS = (*((Handle(Geom_OffsetSurface)*)&theSurf))->BasisSurface()->DynamicType();
+ typS = Handle(Geom_OffsetSurface)::DownCast (theSurf)->BasisSurface()->DynamicType();
if (typS == STANDARD_TYPE(Geom_BezierSurface) || typS == STANDARD_TYPE(Geom_BSplineSurface))
{
gp_Pnt fpoint = AC.Value( AC.FirstParameter() );
Standard_Real f, l;
Handle(Geom_Curve) C1 = BRep_Tool::Curve( E1, f, l );
if (C1->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- C1 = (*((Handle(Geom_TrimmedCurve)*)&C1))->BasisCurve();
+ C1 = Handle(Geom_TrimmedCurve)::DownCast (C1)->BasisCurve();
Handle(Geom_Curve) C2 = BRep_Tool::Curve( E2, f, l );
if (C2->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- C2 = (*((Handle(Geom_TrimmedCurve)*)&C2))->BasisCurve();
+ C2 = Handle(Geom_TrimmedCurve)::DownCast (C2)->BasisCurve();
if (C1->IsInstance(STANDARD_TYPE(Geom_Line)) &&
C2->IsInstance(STANDARD_TYPE(Geom_Line)))
{
- Handle(Geom_Line) L1 = *((Handle(Geom_Line)*) &C1);
+ Handle(Geom_Line) L1 = Handle(Geom_Line)::DownCast (C1);
gp_Ax1 Axis1 = L1->Position();
- Handle(Geom_Line) L2 = *((Handle(Geom_Line)*) &C2);
+ Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast (C2);
gp_Ax1 Axis2 = L2->Position();
if (! Axis1.IsParallel( Axis2, Precision::Angular() ))
return Standard_False;
Handle(Geom_Curve) C1 = BRep_Tool::Curve( E1, first1, last1 );
if (C1->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- C1 = (*((Handle(Geom_TrimmedCurve)*)&C1))->BasisCurve();
+ C1 = Handle(Geom_TrimmedCurve)::DownCast (C1)->BasisCurve();
Handle(Geom_Curve) C2 = BRep_Tool::Curve( E2, first2, last2 );
if (C2->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- C2 = (*((Handle(Geom_TrimmedCurve)*)&C2))->BasisCurve();
+ C2 = Handle(Geom_TrimmedCurve)::DownCast (C2)->BasisCurve();
if (!C1->IsInstance(STANDARD_TYPE(Geom_BSplineCurve)) ||
!C2->IsInstance(STANDARD_TYPE(Geom_BSplineCurve)))
PCurve1 = BRep_Tool::CurveOnSurface( E1, F, first1, last1 );
if (PCurve1->IsInstance(STANDARD_TYPE(Geom2d_TrimmedCurve)))
- PCurve1 = (*((Handle(Geom2d_TrimmedCurve)*)&PCurve1))->BasisCurve();
+ PCurve1 = Handle(Geom2d_TrimmedCurve)::DownCast (PCurve1)->BasisCurve();
PCurve2 = BRep_Tool::CurveOnSurface( E2, F, first2, last2 );
if (PCurve2->IsInstance(STANDARD_TYPE(Geom2d_TrimmedCurve)))
- PCurve2 = (*((Handle(Geom2d_TrimmedCurve)*)&PCurve2))->BasisCurve();
+ PCurve2 = Handle(Geom2d_TrimmedCurve)::DownCast (PCurve2)->BasisCurve();
if (PCurve1 == PCurve2)
{
P2 = PCurve2->Value( last2 );
if (PCurve1->IsInstance(STANDARD_TYPE(Geom2d_Line)))
{
- Handle(Geom2d_Line) Lin1 = *((Handle(Geom2d_Line)*) &PCurve1);
+ Handle(Geom2d_Line) Lin1 = Handle(Geom2d_Line)::DownCast (PCurve1);
gp_Lin2d theLin = Lin1->Lin2d();
first2 = ElCLib::Parameter( theLin, P1 );
last2 = ElCLib::Parameter( theLin, P2 );
}
else if (PCurve1->IsInstance(STANDARD_TYPE(Geom2d_Circle)))
{
- Handle(Geom2d_Circle) Circ1 = *((Handle(Geom2d_Circle)*) &PCurve1);
+ Handle(Geom2d_Circle) Circ1 = Handle(Geom2d_Circle)::DownCast (PCurve1);
gp_Circ2d theCirc = Circ1->Circ2d();
first2 = ElCLib::Parameter( theCirc, P1 );
last2 = ElCLib::Parameter( theCirc, P2 );
}
else if (PCurve1->IsInstance(STANDARD_TYPE(Geom2d_Ellipse)))
{
- Handle(Geom2d_Ellipse) Ell1 = *((Handle(Geom2d_Ellipse)*) &PCurve1);
+ Handle(Geom2d_Ellipse) Ell1 = Handle(Geom2d_Ellipse)::DownCast (PCurve1);
gp_Elips2d theElips = Ell1->Elips2d();
first2 = ElCLib::Parameter( theElips, P1 );
last2 = ElCLib::Parameter( theElips, P2 );
}
else if (PCurve1->IsInstance(STANDARD_TYPE(Geom2d_Parabola)))
{
- Handle(Geom2d_Parabola) Parab1 = *((Handle(Geom2d_Parabola)*) &PCurve1);
+ Handle(Geom2d_Parabola) Parab1 = Handle(Geom2d_Parabola)::DownCast (PCurve1);
gp_Parab2d theParab = Parab1->Parab2d();
first2 = ElCLib::Parameter( theParab, P1 );
last2 = ElCLib::Parameter( theParab, P2 );
}
else if (PCurve1->IsInstance(STANDARD_TYPE(Geom2d_Hyperbola)))
{
- Handle(Geom2d_Hyperbola) Hypr1 = *((Handle(Geom2d_Hyperbola)*) &PCurve1);
+ Handle(Geom2d_Hyperbola) Hypr1 = Handle(Geom2d_Hyperbola)::DownCast (PCurve1);
gp_Hypr2d theHypr = Hypr1->Hypr2d();
first2 = ElCLib::Parameter( theHypr, P1 );
last2 = ElCLib::Parameter( theHypr, P2 );
C1 = BRep_Tool::Curve( E1, first1, last1 );
if (C1->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- C1 = (*((Handle(Geom_TrimmedCurve)*)&C1))->BasisCurve();
+ C1 = Handle(Geom_TrimmedCurve)::DownCast (C1)->BasisCurve();
C2 = BRep_Tool::Curve( E2, first2, last2 );
if (C2->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- C2 = (*((Handle(Geom_TrimmedCurve)*)&C2))->BasisCurve();
+ C2 = Handle(Geom_TrimmedCurve)::DownCast (C2)->BasisCurve();
if (C1 == C2)
{
Handle(Geom_Surface) aSurf = BRep_Tool::Surface(F1);
if (aSurf->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
- aSurf = (*((Handle(Geom_RectangularTrimmedSurface)*)&aSurf))->BasisSurface();
+ aSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (aSurf)->BasisSurface();
if (aSurf->IsInstance(STANDARD_TYPE(Geom_Plane)))
isPlane1 = Standard_True;
else if (aSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
aSurf = BRep_Tool::Surface(F2);
if (aSurf->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
- aSurf = (*((Handle(Geom_RectangularTrimmedSurface)*)&aSurf))->BasisSurface();
+ aSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (aSurf)->BasisSurface();
if (aSurf->IsInstance(STANDARD_TYPE(Geom_Plane)))
isPlane2 = Standard_True;
else if (aSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
Handle(Geom_Surface) aSurf = BRep_Tool::Surface(cpF1);
if (aSurf->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
- aSurf = (*((Handle(Geom_RectangularTrimmedSurface)*)&aSurf))->BasisSurface();
+ aSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (aSurf)->BasisSurface();
if (aSurf->IsInstance(STANDARD_TYPE(Geom_Plane)))
addPCurve1 = Standard_False;
else if (aSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
aSurf = BRep_Tool::Surface(cpF2);
if (aSurf->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
- aSurf = (*((Handle(Geom_RectangularTrimmedSurface)*)&aSurf))->BasisSurface();
+ aSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (aSurf)->BasisSurface();
if (aSurf->IsInstance(STANDARD_TYPE(Geom_Plane)))
addPCurve2 = Standard_False;
else if (aSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
if (S1->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
Handle(Geom_RectangularTrimmedSurface) RTS ;
- RTS = *((Handle(Geom_RectangularTrimmedSurface)*) &S1);
+ RTS = Handle(Geom_RectangularTrimmedSurface)::DownCast (S1);
if (RTS->BasisSurface()->DynamicType() == STANDARD_TYPE(Geom_Plane)) {
S1 = RTS->BasisSurface();
}
}
if (S2->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
Handle(Geom_RectangularTrimmedSurface) RTS ;
- RTS = *((Handle(Geom_RectangularTrimmedSurface)*) &S2);
+ RTS = Handle(Geom_RectangularTrimmedSurface)::DownCast (S2);
if (RTS->BasisSurface()->DynamicType() == STANDARD_TYPE(Geom_Plane)) {
S2 = RTS->BasisSurface();
}
Standard_Boolean IsSuclosed = S->IsUClosed(), IsSvclosed = S->IsVClosed();
if (S->DynamicType() == STANDARD_TYPE(Geom_OffsetSurface))
{
- Handle(Geom_Surface) BasisSurf = (*((Handle(Geom_OffsetSurface)*)&S))->BasisSurface();
+ Handle(Geom_Surface) BasisSurf = Handle(Geom_OffsetSurface)::DownCast (S)->BasisSurface();
IsSuclosed = BasisSurf->IsUClosed();
IsSvclosed = BasisSurf->IsVClosed();
}
Standard_Boolean vmindegen = isVminDegen, vmaxdegen = isVmaxDegen;
Handle(Geom_Surface) theSurf = S;
if (S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
- theSurf = (*(Handle(Geom_RectangularTrimmedSurface)*)&S)->BasisSurface();
+ theSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
if (theSurf->DynamicType() == STANDARD_TYPE(Geom_ConicalSurface))
{
- Handle(Geom_ConicalSurface) ConicalS = *((Handle(Geom_ConicalSurface)*) &theSurf);
+ Handle(Geom_ConicalSurface) ConicalS = Handle(Geom_ConicalSurface)::DownCast (theSurf);
gp_Cone theCone = ConicalS->Cone();
gp_Pnt theApex = theCone.Apex();
Standard_Real Uapex, Vapex;
Standard_Boolean SurfaceChange = Standard_False;
if ( S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- Handle(Geom_Surface) BS = (*((Handle(Geom_RectangularTrimmedSurface)*)&S))->BasisSurface();
+ Handle(Geom_Surface) BS = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
EnlargeGeometry(BS,U1,U2,V1,V2,IsV1degen,IsV2degen,
uf1,uf2,vf1,vf2,GlobalEnlargeU,GlobalEnlargeVfirst,GlobalEnlargeVlast);
if (!GlobalEnlargeVfirst)
if (!GlobalEnlargeVlast)
V2 = vf2;
if (!GlobalEnlargeVfirst || !GlobalEnlargeVlast)
- //(*((Handle(Geom_RectangularTrimmedSurface)*)&S))->SetTrim( U1, U2, V1, V2 );
+ //Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->SetTrim( U1, U2, V1, V2 );
S = new Geom_RectangularTrimmedSurface( BS, U1, U2, V1, V2 );
else
S = BS;
SurfaceChange = Standard_True;
}
else if (S->DynamicType() == STANDARD_TYPE(Geom_OffsetSurface)) {
- Handle(Geom_Surface) Surf = (*((Handle(Geom_OffsetSurface)*)&S))->BasisSurface();
+ Handle(Geom_Surface) Surf = Handle(Geom_OffsetSurface)::DownCast (S)->BasisSurface();
SurfaceChange = EnlargeGeometry(Surf,U1,U2,V1,V2,IsV1degen,IsV2degen,
uf1,uf2,vf1,vf2,GlobalEnlargeU,GlobalEnlargeVfirst,GlobalEnlargeVlast);
Handle(Geom_OffsetSurface)::DownCast(S)->SetBasisSurface(Surf);
if (enlargeU)
{
if (enlargeUfirst)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), du, 1, Standard_True, Standard_False );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), du, 1, Standard_True, Standard_False );
if (enlargeUlast)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), du, 1, Standard_True, Standard_True );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), du, 1, Standard_True, Standard_True );
}
if (enlargeV)
{
if (enlargeVfirst)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), dv, 1, Standard_False, Standard_False );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), dv, 1, Standard_False, Standard_False );
if (enlargeVlast)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), dv, 1, Standard_False, Standard_True );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), dv, 1, Standard_False, Standard_True );
}
S->Bounds( U1, U2, V1, V2 );
SurfaceChange = Standard_True;
if (enlargeU)
{
if (enlargeUfirst && uf1-u1 < duf)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), du, 1, Standard_True, Standard_False );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), du, 1, Standard_True, Standard_False );
if (enlargeUlast && u2-uf2 < duf)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), du, 1, Standard_True, Standard_True );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), du, 1, Standard_True, Standard_True );
}
if (enlargeV)
{
if (enlargeVfirst && vf1-v1 < dvf)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), dv, 1, Standard_False, Standard_False );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), dv, 1, Standard_False, Standard_False );
if (enlargeVlast && v2-vf2 < dvf)
- GeomLib::ExtendSurfByLength( *((Handle(Geom_BoundedSurface)*)&S), dv, 1, Standard_False, Standard_True );
+ GeomLib::ExtendSurfByLength( Handle(Geom_BoundedSurface)::DownCast (S), dv, 1, Standard_False, Standard_True );
}
S->Bounds( U1, U2, V1, V2 );
Handle(Geom_Surface) theSurf = BRep_Tool::Surface(F);
if (theSurf->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
- theSurf = (*((Handle(Geom_RectangularTrimmedSurface)*)&theSurf))->BasisSurface();
+ theSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (theSurf)->BasisSurface();
if (theSurf->DynamicType() == STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion) ||
theSurf->DynamicType() == STANDARD_TYPE(Geom_SurfaceOfRevolution) ||
Standard_Real fpar, lpar;
Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface(anEdge, F, fpar, lpar);
if (aCurve->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
- aCurve = (*((Handle(Geom2d_TrimmedCurve)*)&aCurve))->BasisCurve();
+ aCurve = Handle(Geom2d_TrimmedCurve)::DownCast (aCurve)->BasisCurve();
Handle(Geom2d_Line) theLine;
if (aCurve->DynamicType() == STANDARD_TYPE(Geom2d_Line))
- theLine = *((Handle(Geom2d_Line)*)&aCurve);
+ theLine = Handle(Geom2d_Line)::DownCast (aCurve);
else if (aCurve->DynamicType() == STANDARD_TYPE(Geom2d_BezierCurve) ||
aCurve->DynamicType() == STANDARD_TYPE(Geom2d_BSplineCurve))
{
//Special treatment for conical surfaces
Handle(Geom_Surface) theSurf = S;
if (S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
- theSurf = (*(Handle(Geom_RectangularTrimmedSurface)*)&S)->BasisSurface();
+ theSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
if (theSurf->DynamicType() == STANDARD_TYPE(Geom_ConicalSurface))
{
- Handle(Geom_ConicalSurface) ConicalS = *((Handle(Geom_ConicalSurface)*) &theSurf);
+ Handle(Geom_ConicalSurface) ConicalS = Handle(Geom_ConicalSurface)::DownCast (theSurf);
gp_Cone theCone = ConicalS->Cone();
gp_Pnt theApex = theCone.Apex();
Standard_Real Uapex, Vapex;
void BRepOffsetAPI_DraftAngle::Clear ()
{
if (!myModification.IsNull()) {
- (*((Handle(Draft_Modification)*)&myModification))->Clear();
+ Handle(Draft_Modification)::DownCast (myModification)->Clear();
}
}
myInitialShape = S;
NotDone();
if (!myModification.IsNull()) {
- (*((Handle(Draft_Modification)*)&myModification))->Init(S);
+ Handle(Draft_Modification)::DownCast (myModification)->Init(S);
}
else {
myModification = new Draft_Modification(S);
if ( Abs(Angle) <= 1.e-04 )
return;
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- (*((Handle(Draft_Modification)*)&myModification))->Add(F,D,Angle,Plane, Flag);
+ Handle(Draft_Modification)::DownCast (myModification)->Add(F,D,Angle,Plane, Flag);
}
Standard_Boolean BRepOffsetAPI_DraftAngle::AddDone () const
{
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- return (*((Handle(Draft_Modification)*)&myModification))
+ return Handle(Draft_Modification)::DownCast (myModification)
->ProblematicShape().IsNull();
}
void BRepOffsetAPI_DraftAngle::Remove(const TopoDS_Face& F)
{
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- (*((Handle(Draft_Modification)*)&myModification))->Remove(F);
+ Handle(Draft_Modification)::DownCast (myModification)->Remove(F);
}
const TopoDS_Shape& BRepOffsetAPI_DraftAngle::ProblematicShape () const
{
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- return (*((Handle(Draft_Modification)*)&myModification))->ProblematicShape();
+ return Handle(Draft_Modification)::DownCast (myModification)->ProblematicShape();
}
Draft_ErrorStatus BRepOffsetAPI_DraftAngle::Status () const
{
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- return (*((Handle(Draft_Modification)*)&myModification))->Error();
+ return Handle(Draft_Modification)::DownCast (myModification)->Error();
}
(const TopoDS_Face& F) const
{
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- return (*((Handle(Draft_Modification)*)&myModification))->ConnectedFaces(F);
+ return Handle(Draft_Modification)::DownCast (myModification)->ConnectedFaces(F);
}
const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::ModifiedFaces() const
{
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- return (*((Handle(Draft_Modification)*)&myModification))->ModifiedFaces();
+ return Handle(Draft_Modification)::DownCast (myModification)->ModifiedFaces();
}
//=======================================================================
{
myGenerated.Clear();
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- Handle(Draft_Modification) DMod = (*((Handle(Draft_Modification)*)&myModification));
+ Handle(Draft_Modification) DMod = Handle(Draft_Modification)::DownCast (myModification);
if (S.ShapeType() == TopAbs_FACE) {
Handle(Geom_Surface) Surf;
{
myGenerated.Clear();
Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
- Handle(Draft_Modification) DMod = (*((Handle(Draft_Modification)*)&myModification));
+ Handle(Draft_Modification) DMod = Handle(Draft_Modification)::DownCast (myModification);
if (S.ShapeType() == TopAbs_FACE) {
Handle(Geom_Surface) Surf;
void BRepOffsetAPI_DraftAngle::Build()
{
- (*((Handle(Draft_Modification)*)&myModification))->Perform();
- if (!(*((Handle(Draft_Modification)*)&myModification))->IsDone()) {
+ Handle(Draft_Modification)::DownCast (myModification)->Perform();
+ if (!Handle(Draft_Modification)::DownCast (myModification)->IsDone()) {
NotDone();
}
else {
Standard_Real fpar, lpar;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
if (aCurve->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- aCurve = ((Handle(Geom_TrimmedCurve)&) aCurve)->BasisCurve();
+ aCurve = Handle(Geom_TrimmedCurve)::DownCast (aCurve)->BasisCurve();
gp_Pnt Pnt1, Pnt2;
if (aCurve->IsKind(STANDARD_TYPE(Geom_Line)))
{
- aLine = ((Handle(Geom_Line)&) aCurve)->Lin();
+ aLine = Handle(Geom_Line)::DownCast (aCurve)->Lin();
return Standard_True;
}
else if (aCurve->IsKind(STANDARD_TYPE(Geom_BezierCurve)))
{
- Handle(Geom_BezierCurve) theBezier = (Handle(Geom_BezierCurve)&) aCurve;
+ Handle(Geom_BezierCurve) theBezier = Handle(Geom_BezierCurve)::DownCast (aCurve);
if (theBezier->NbPoles() == 2)
{
Pnt1 = theBezier->Pole(1);
}
else if (aCurve->IsKind(STANDARD_TYPE(Geom_BSplineCurve)))
{
- Handle(Geom_BSplineCurve) theBSpline = (Handle(Geom_BSplineCurve)&) aCurve;
+ Handle(Geom_BSplineCurve) theBSpline = Handle(Geom_BSplineCurve)::DownCast (aCurve);
if (theBSpline->NbPoles() == 2)
{
Pnt1 = theBSpline->Pole(1);
Standard_Real fpar, lpar;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
if (aCurve->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- aCurve = ((Handle(Geom_TrimmedCurve)&) aCurve)->BasisCurve();
+ aCurve = Handle(Geom_TrimmedCurve)::DownCast (aCurve)->BasisCurve();
Pnt1 = aCurve->Value(fpar);
Pnt2 = aCurve->Value(lpar);
Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve);
Draw_Color Couleur;
if (type == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
- curve = (*(Handle(Geom2d_TrimmedCurve)*)&aCurve)->BasisCurve();
+ curve = Handle(Geom2d_TrimmedCurve)::DownCast (aCurve)->BasisCurve();
type = curve->DynamicType();
if (type == STANDARD_TYPE(Bisector_BisecAna)) {
- curve =(*(Handle(Bisector_BisecAna)*)&curve)->Geom2dCurve();
+ curve =Handle(Bisector_BisecAna)::DownCast (curve)->Geom2dCurve();
type = curve->DynamicType();
}
// PB of representation of semi_infinite curves.
myMapId.Clear();
Standard_Integer i;
for (i=1; i <= theTypes.Extent(); i++) {
- const Handle(Standard_Type)& aType =
- Handle(Standard_Type)::DownCast (theTypes(i));
+ Handle(Standard_Type) aType (Handle(Standard_Type)::DownCast (theTypes(i)));
if (myMap.IsBound (aType)) {
myMapId.Bind (aType, i);
}
Handle(Standard_Type) type = afirstcurve->DynamicType();
if (type == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
- curve = (*(Handle(Geom2d_TrimmedCurve)*)&afirstcurve)->BasisCurve();
+ curve = Handle(Geom2d_TrimmedCurve)::DownCast (afirstcurve)->BasisCurve();
}
else {
curve = afirstcurve;
Abs(Bs->LastParameter() - U2) > Precision::Parametric(Tol)) {
Handle(Geom_Geometry) G = Bs->Copy();
- Handle(Geom_BSplineCurve)& Bsaux = (*((Handle(Geom_BSplineCurve)*)&G));
+ Handle(Geom_BSplineCurve)& Bsaux = Handle(Geom_BSplineCurve)::DownCast (G);
Standard_Real u1 = U1, u2 = U2;
//// modified by jgv, 24.10.01 for BUC61031 ////
if (Bsaux->IsPeriodic())
bs.Update(umin,vmin,umax,vmax);
Standard_Boolean aIN = Standard_True;
for(Standard_Integer ii = 1; ii <= 4 && aIN; ii++) {
- if(bs.IsOut((*((Handle(Geom2d_BezierCurve)*) &Pcurv))->Pole(ii))) {
+ if(bs.IsOut(Handle(Geom2d_BezierCurve)::DownCast (Pcurv)->Pole(ii))) {
aIN = Standard_False;
TColgp_Array1OfPnt2d qoles(1,2);
qoles(1)=UV1;
TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
for (; it.More(); it.Next() ) {
const Handle(TopOpeBRepDS_Interference)& cur = it.Value();
- const Handle(TopOpeBRepDS_CurvePointInterference)& cpi =
- Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(cur);
+ Handle(TopOpeBRepDS_CurvePointInterference) cpi (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(cur));
if(!cpi.IsNull()) {
Standard_Integer newIV = cpi->Geometry();
TopOpeBRepDS_Kind kv = cpi->GeometryType();
cout<<"Surface Dynamic TYPE = "<<s<<endl;
#endif
if (aSurf->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
- aSurf = ((Handle(Geom_RectangularTrimmedSurface)&) aSurf)->BasisSurface();
+ aSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (aSurf)->BasisSurface();
aPlane = Handle(Geom_Plane)::DownCast(aSurf);
}
if (!curve1->IsKind(STANDARD_TYPE(Geom_Line)) || !curve2->IsKind(STANDARD_TYPE(Geom_Line))) return;
Handle(Geom2d_Geometry) L1 = GeomAPI::To2d (curve1,plane);
if (L1->IsInstance(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
- L1 = ((Handle(Geom2d_TrimmedCurve)&) L1)->BasisCurve();
+ L1 = Handle(Geom2d_TrimmedCurve)::DownCast (L1)->BasisCurve();
}
- gp_Lin2d l1 = ((Handle(Geom2d_Line)&) L1)->Lin2d();
+ gp_Lin2d l1 = Handle(Geom2d_Line)::DownCast (L1)->Lin2d();
Handle(Geom2d_Geometry) L2 = GeomAPI::To2d (curve2,plane);
if (L2->IsInstance(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
- L2 = ((Handle(Geom2d_TrimmedCurve)&) L2)->BasisCurve();
+ L2 = Handle(Geom2d_TrimmedCurve)::DownCast (L2)->BasisCurve();
}
- gp_Lin2d l2 = ((Handle(Geom2d_Line)&) L2)->Lin2d();
+ gp_Lin2d l2 = Handle(Geom2d_Line)::DownCast (L2)->Lin2d();
//
IntAna2d_AnaIntersection inter;
inter.Perform(l1,l2);
// retour au plan
Handle(Geom_Curve) C = GeomAPI::To3d (new Geom2d_Circle(c),plane);
- gp_Circ circle = ((Handle(Geom_Circle)&) C)->Circ();
+ gp_Circ circle = Handle(Geom_Circle)::DownCast (C)->Circ();
//
Standard_Real p1=0., p2=0.;
angle = Abs(angle);
Standard_Real stenor = (myKnots->Value(IndexOfElement + 1) - myKnots->Value(IndexOfElement)) / 2.,
mfact;
- Handle(PLib_HermitJacobi) myHermitJacobi = (*((Handle(PLib_HermitJacobi)*)&myBase));
+ Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
i1 = iBase;
i2 = iBase + (myHermitJacobi->NivConstr() + 1) * myDimension;
Standard_Real stenor = 2. / (myKnots->Value(IndexOfElement + 1) - myKnots->Value(IndexOfElement)),
mfact;
- Handle(PLib_HermitJacobi) myHermitJacobi = (*((Handle(PLib_HermitJacobi)*)&myBase));
+ Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
i2 = Coeffs.LowerRow();
Standard_Integer i3 = i2 + myHermitJacobi->NivConstr() + 1;
(myBase->WorkDegree() + 1)*myDimension + 1;
myBase->ReduceDegree(myDimension, deg, Tol, myCoeff.ChangeValue(Ptr), NewDegree, MaxError);
- Handle(PLib_HermitJacobi) myHermitJacobi = (*((Handle(PLib_HermitJacobi)*)&myBase));
+ Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
NewDegree = Max(NewDegree, 2 * myHermitJacobi->NivConstr() + 1);
if (myBasisSurf->IsKind(STANDARD_TYPE(Geom_BSplineSurface)))
{
Handle(Geom_BSplineSurface) BSur =
- *((Handle(Geom_BSplineSurface)*)& myBasisSurf);
+ Handle(Geom_BSplineSurface)::DownCast (myBasisSurf);
NbUK = BSur->NbUKnots();
NbVK = BSur->NbVKnots();
TColStd_Array1OfReal UKnots(1,NbUK);
if (myBasisSurf->IsKind(STANDARD_TYPE(Geom_BSplineSurface)))
{
Handle(Geom_BSplineSurface) BSur =
- *((Handle(Geom_BSplineSurface)*)& myBasisSurf);
+ Handle(Geom_BSplineSurface)::DownCast (myBasisSurf);
NbUK = BSur->NbUKnots();
NbVK = BSur->NbVKnots();
TColStd_Array1OfReal UKnots(1,NbUK);
#include <Standard_NullObject.hxx>
#include <Standard_NotImplemented.hxx>
-#define myBspl (*((Handle(Geom2d_BSplineCurve)*)&myCurve))
+#define myBspl Handle(Geom2d_BSplineCurve)::DownCast (myCurve)
#define PosTol Precision::PConfusion()/2
static const int maxDerivOrder = 3;
Handle(Standard_Type) TheType = C->DynamicType();
if ( TheType == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
- Load((*((Handle(Geom2d_TrimmedCurve)*)&C))->BasisCurve(),
+ Load(Handle(Geom2d_TrimmedCurve)::DownCast (C)->BasisCurve(),
UFirst,ULast);
}
else if ( TheType == STANDARD_TYPE(Geom2d_Circle)) {
}
else if (myCurve->DynamicType() == STANDARD_TYPE(Geom2d_OffsetCurve)){
GeomAbs_Shape S =
- (*((Handle(Geom2d_OffsetCurve)*)&myCurve))->GetBasisCurveContinuity();
+ Handle(Geom2d_OffsetCurve)::DownCast (myCurve)->GetBasisCurveContinuity();
switch(S){
case GeomAbs_CN: return GeomAbs_CN;
case GeomAbs_C3: return GeomAbs_C2;
case GeomAbs_Line :
return Ruv;
case GeomAbs_Circle: {
- Standard_Real R = (*((Handle(Geom2d_Circle)*)&myCurve))->Circ2d().Radius();
+ Standard_Real R = Handle(Geom2d_Circle)::DownCast (myCurve)->Circ2d().Radius();
if ( R > Ruv/2.)
return 2*ASin(Ruv/(2*R));
else
return 2*M_PI;
}
case GeomAbs_Ellipse: {
- return Ruv / (*((Handle(Geom2d_Ellipse)*)&myCurve))->MajorRadius();
+ return Ruv / Handle(Geom2d_Ellipse)::DownCast (myCurve)->MajorRadius();
}
case GeomAbs_BezierCurve: {
Standard_Real res;
- (*((Handle(Geom2d_BezierCurve)*)&myCurve))->Resolution(Ruv,res);
+ Handle(Geom2d_BezierCurve)::DownCast (myCurve)->Resolution(Ruv,res);
return res;
}
case GeomAbs_BSplineCurve: {
Standard_Real res;
- (*((Handle(Geom2d_BSplineCurve)*)&myCurve))->Resolution(Ruv,res);
+ Handle(Geom2d_BSplineCurve)::DownCast (myCurve)->Resolution(Ruv,res);
return res;
}
default:
gp_Lin2d Geom2dAdaptor_Curve::Line() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, "");
- return (*((Handle(Geom2d_Line)*)&myCurve))->Lin2d();
+ return Handle(Geom2d_Line)::DownCast (myCurve)->Lin2d();
}
//=======================================================================
gp_Circ2d Geom2dAdaptor_Curve::Circle() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, "");
- return (*((Handle(Geom2d_Circle)*)&myCurve))->Circ2d();
+ return Handle(Geom2d_Circle)::DownCast (myCurve)->Circ2d();
}
//=======================================================================
gp_Elips2d Geom2dAdaptor_Curve::Ellipse() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, "");
- return (*((Handle(Geom2d_Ellipse)*)&myCurve))->Elips2d();
+ return Handle(Geom2d_Ellipse)::DownCast (myCurve)->Elips2d();
}
//=======================================================================
gp_Hypr2d Geom2dAdaptor_Curve::Hyperbola() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, "");
- return (*((Handle(Geom2d_Hyperbola)*)&myCurve))->Hypr2d();
+ return Handle(Geom2d_Hyperbola)::DownCast (myCurve)->Hypr2d();
}
//=======================================================================
gp_Parab2d Geom2dAdaptor_Curve::Parabola() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, "");
- return (*((Handle(Geom2d_Parabola)*)&myCurve))->Parab2d();
+ return Handle(Geom2d_Parabola)::DownCast (myCurve)->Parab2d();
}
//=======================================================================
Standard_Integer Geom2dAdaptor_Curve::Degree() const
{
if (myTypeCurve == GeomAbs_BezierCurve)
- return (*((Handle(Geom2d_BezierCurve)*)&myCurve))->Degree();
+ return Handle(Geom2d_BezierCurve)::DownCast (myCurve)->Degree();
else if (myTypeCurve == GeomAbs_BSplineCurve)
- return (*((Handle(Geom2d_BSplineCurve)*)&myCurve))->Degree();
+ return Handle(Geom2d_BSplineCurve)::DownCast (myCurve)->Degree();
else
Standard_NoSuchObject::Raise();
// portage WNT
Standard_Boolean Geom2dAdaptor_Curve::IsRational() const {
switch( myTypeCurve) {
case GeomAbs_BSplineCurve:
- return (*((Handle(Geom2d_BSplineCurve)*)&myCurve))->IsRational();
+ return Handle(Geom2d_BSplineCurve)::DownCast (myCurve)->IsRational();
case GeomAbs_BezierCurve:
- return (*((Handle(Geom2d_BezierCurve)*)&myCurve))->IsRational();
+ return Handle(Geom2d_BezierCurve)::DownCast (myCurve)->IsRational();
default:
return Standard_False;
}
Standard_Integer Geom2dAdaptor_Curve::NbPoles() const
{
if (myTypeCurve == GeomAbs_BezierCurve)
- return (*((Handle(Geom2d_BezierCurve)*)&myCurve))->NbPoles();
+ return Handle(Geom2d_BezierCurve)::DownCast (myCurve)->NbPoles();
else if (myTypeCurve == GeomAbs_BSplineCurve)
- return (*((Handle(Geom2d_BSplineCurve)*)&myCurve))->NbPoles();
+ return Handle(Geom2d_BSplineCurve)::DownCast (myCurve)->NbPoles();
else
Standard_NoSuchObject::Raise();
// portage WNT
Standard_Integer Geom2dAdaptor_Curve::NbKnots() const {
if ( myTypeCurve != GeomAbs_BSplineCurve)
Standard_NoSuchObject::Raise("Geom2dAdaptor_Curve::NbKnots");
- return (*((Handle(Geom2d_BSplineCurve)*)&myCurve))->NbKnots();
+ return Handle(Geom2d_BSplineCurve)::DownCast (myCurve)->NbKnots();
}
Handle(Geom2d_BezierCurve) Geom2dAdaptor_Curve::Bezier() const
{
- return *((Handle(Geom2d_BezierCurve)*)&myCurve);
+ return Handle(Geom2d_BezierCurve)::DownCast (myCurve);
}
//=======================================================================
Handle(Geom2d_BSplineCurve) Geom2dAdaptor_Curve::BSpline() const
{
- return *((Handle(Geom2d_BSplineCurve)*)&myCurve);
+ return Handle(Geom2d_BSplineCurve)::DownCast (myCurve);
}
static Standard_Integer nbPoints(const Handle(Geom2d_Curve)& theCurve)
nbs = 2;
else if(theCurve->IsKind(STANDARD_TYPE( Geom2d_BezierCurve)))
{
- nbs = 3 + (*((Handle(Geom2d_BezierCurve)*)&theCurve))->NbPoles();
+ nbs = 3 + Handle(Geom2d_BezierCurve)::DownCast (theCurve)->NbPoles();
}
else if(theCurve->IsKind(STANDARD_TYPE( Geom2d_BSplineCurve))) {
- nbs = (*((Handle(Geom2d_BSplineCurve)*)&theCurve))->NbKnots();
- nbs*= (*((Handle(Geom2d_BSplineCurve)*)&theCurve))->Degree();
+ nbs = Handle(Geom2d_BSplineCurve)::DownCast (theCurve)->NbKnots();
+ nbs*= Handle(Geom2d_BSplineCurve)::DownCast (theCurve)->Degree();
if(nbs < 2.0) nbs=2;
}
else if (theCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve)))
{
- Handle(Geom2d_Curve) aCurve = (*((Handle(Geom2d_OffsetCurve)*)&theCurve))->BasisCurve();
+ Handle(Geom2d_Curve) aCurve = Handle(Geom2d_OffsetCurve)::DownCast (theCurve)->BasisCurve();
return Max(nbs, nbPoints(aCurve));
}
else if (theCurve->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve)))
{
- Handle(Geom2d_Curve) aCurve = (*((Handle(Geom2d_TrimmedCurve)*)&theCurve))->BasisCurve();
+ Handle(Geom2d_Curve) aCurve = Handle(Geom2d_TrimmedCurve)::DownCast (theCurve)->BasisCurve();
return Max(nbs, nbPoints(aCurve));
}
if(nbs>300)
#include <Geom_OffsetCurve.hxx>
#include <CSLib_Offset.hxx>
-#define myBspl (*((Handle(Geom_BSplineCurve)*)&myCurve))
+#define myBspl Handle(Geom_BSplineCurve)::DownCast (myCurve)
#define PosTol Precision::PConfusion()/2
static const int maxDerivOrder = 3;
const Handle(Standard_Type)& TheType = C->DynamicType();
if ( TheType == STANDARD_TYPE(Geom_TrimmedCurve)) {
- Load((*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve(),UFirst,ULast);
+ Load(Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve(),UFirst,ULast);
}
else if ( TheType == STANDARD_TYPE(Geom_Circle)) {
myTypeCurve = GeomAbs_Circle;
if (myCurve->IsKind(STANDARD_TYPE(Geom_OffsetCurve)))
{
const GeomAbs_Shape S =
- (*((Handle(Geom_OffsetCurve)*)&myCurve))->GetBasisCurveContinuity();
+ Handle(Geom_OffsetCurve)::DownCast (myCurve)->GetBasisCurveContinuity();
switch(S)
{
case GeomAbs_CN: return GeomAbs_CN;
default: BaseS = GeomAbs_CN;
}
GeomAdaptor_Curve C
- ((*((Handle(Geom_OffsetCurve)*)&myCurve))->BasisCurve());
+ (Handle(Geom_OffsetCurve)::DownCast (myCurve)->BasisCurve());
// akm 05/04/02 (OCC278) If our curve is trimmed we must recalculate
// the number of intervals obtained from the basis to
// vvv reflect parameter bounds
default: BaseS = GeomAbs_CN;
}
GeomAdaptor_Curve C
- ((*((Handle(Geom_OffsetCurve)*)&myCurve))->BasisCurve());
+ (Handle(Geom_OffsetCurve)::DownCast (myCurve)->BasisCurve());
// akm 05/04/02 (OCC278) If our curve is trimmed we must recalculate
// the array of intervals obtained from the basis to
// vvv reflect parameter bounds
case GeomAbs_Line :
return R3D;
case GeomAbs_Circle: {
- Standard_Real R = (*((Handle(Geom_Circle)*)&myCurve))->Circ().Radius();
+ Standard_Real R = Handle(Geom_Circle)::DownCast (myCurve)->Circ().Radius();
if ( R > R3D/2. )
return 2*ASin(R3D/(2*R));
else
return 2*M_PI;
}
case GeomAbs_Ellipse: {
- return R3D / (*((Handle(Geom_Ellipse)*)&myCurve))->MajorRadius();
+ return R3D / Handle(Geom_Ellipse)::DownCast (myCurve)->MajorRadius();
}
case GeomAbs_BezierCurve: {
Standard_Real res;
- (*((Handle(Geom_BezierCurve)*)&myCurve))->Resolution(R3D,res);
+ Handle(Geom_BezierCurve)::DownCast (myCurve)->Resolution(R3D,res);
return res;
}
case GeomAbs_BSplineCurve: {
Standard_Real res;
- (*((Handle(Geom_BSplineCurve)*)&myCurve))->Resolution(R3D,res);
+ Handle(Geom_BSplineCurve)::DownCast (myCurve)->Resolution(R3D,res);
return res;
}
default:
gp_Lin GeomAdaptor_Curve::Line() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, "");
- return (*((Handle(Geom_Line)*)&myCurve))->Lin();
+ return Handle(Geom_Line)::DownCast (myCurve)->Lin();
}
//=======================================================================
gp_Circ GeomAdaptor_Curve::Circle() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, "");
- return (*((Handle(Geom_Circle)*)&myCurve))->Circ();
+ return Handle(Geom_Circle)::DownCast (myCurve)->Circ();
}
//=======================================================================
gp_Elips GeomAdaptor_Curve::Ellipse() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, "");
- return (*((Handle(Geom_Ellipse)*)&myCurve))->Elips();
+ return Handle(Geom_Ellipse)::DownCast (myCurve)->Elips();
}
//=======================================================================
gp_Hypr GeomAdaptor_Curve::Hyperbola() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, "");
- return (*((Handle(Geom_Hyperbola)*)&myCurve))->Hypr();
+ return Handle(Geom_Hyperbola)::DownCast (myCurve)->Hypr();
}
//=======================================================================
gp_Parab GeomAdaptor_Curve::Parabola() const
{
Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, "");
- return (*((Handle(Geom_Parabola)*)&myCurve))->Parab();
+ return Handle(Geom_Parabola)::DownCast (myCurve)->Parab();
}
//=======================================================================
Standard_Integer GeomAdaptor_Curve::Degree() const
{
if (myTypeCurve == GeomAbs_BezierCurve)
- return (*((Handle(Geom_BezierCurve)*)&myCurve))->Degree();
+ return Handle(Geom_BezierCurve)::DownCast (myCurve)->Degree();
else if (myTypeCurve == GeomAbs_BSplineCurve)
- return (*((Handle(Geom_BSplineCurve)*)&myCurve))->Degree();
+ return Handle(Geom_BSplineCurve)::DownCast (myCurve)->Degree();
else
Standard_NoSuchObject::Raise();
// portage WNT
Standard_Boolean GeomAdaptor_Curve::IsRational() const {
switch( myTypeCurve) {
case GeomAbs_BSplineCurve:
- return (*((Handle(Geom_BSplineCurve)*)&myCurve))->IsRational();
+ return Handle(Geom_BSplineCurve)::DownCast (myCurve)->IsRational();
case GeomAbs_BezierCurve:
- return (*((Handle(Geom_BezierCurve)*)&myCurve))->IsRational();
+ return Handle(Geom_BezierCurve)::DownCast (myCurve)->IsRational();
default:
return Standard_False;
}
Standard_Integer GeomAdaptor_Curve::NbPoles() const
{
if (myTypeCurve == GeomAbs_BezierCurve)
- return (*((Handle(Geom_BezierCurve)*)&myCurve))->NbPoles();
+ return Handle(Geom_BezierCurve)::DownCast (myCurve)->NbPoles();
else if (myTypeCurve == GeomAbs_BSplineCurve)
- return (*((Handle(Geom_BSplineCurve)*)&myCurve))->NbPoles();
+ return Handle(Geom_BSplineCurve)::DownCast (myCurve)->NbPoles();
else
Standard_NoSuchObject::Raise();
// portage WNT
{
if ( myTypeCurve != GeomAbs_BSplineCurve)
Standard_NoSuchObject::Raise("GeomAdaptor_Curve::NbKnots");
- return (*((Handle(Geom_BSplineCurve)*)&myCurve))->NbKnots();
+ return Handle(Geom_BSplineCurve)::DownCast (myCurve)->NbKnots();
}
//=======================================================================
{
if ( myTypeCurve != GeomAbs_BezierCurve)
Standard_NoSuchObject::Raise("GeomAdaptor_Curve::Bezier");
- return *((Handle(Geom_BezierCurve)*)&myCurve);
+ return Handle(Geom_BezierCurve)::DownCast (myCurve);
}
//=======================================================================
if ( myTypeCurve != GeomAbs_BSplineCurve)
Standard_NoSuchObject::Raise("GeomAdaptor_Curve::BSpline");
- return *((Handle(Geom_BSplineCurve)*)&myCurve);
+ return Handle(Geom_BSplineCurve)::DownCast (myCurve);
}
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
-#define myBspl (*((Handle(Geom_BSplineSurface)*)&mySurface))
-#define myExtSurf (*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))
-#define myRevSurf (*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))
-#define myOffSurf (*((Handle(Geom_OffsetSurface)*)&mySurface))
+#define myBspl Handle(Geom_BSplineSurface)::DownCast (mySurface)
+#define myExtSurf Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)
+#define myRevSurf Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)
+#define myOffSurf Handle(Geom_OffsetSurface)::DownCast (mySurface)
//=======================================================================
//function : LocalContinuity
if ( TheType == STANDARD_TYPE(Geom_BezierSurface))
mySurfaceType = GeomAbs_BezierSurface;
else if (TheType == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- Load((*((Handle(Geom_RectangularTrimmedSurface)*)&S))->BasisSurface(),
+ Load(Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface(),
UFirst,ULast,VFirst,VLast);
}
else if ( TheType == STANDARD_TYPE(Geom_Plane))
mySurfaceType = GeomAbs_SurfaceOfExtrusion;
else if ( TheType == STANDARD_TYPE(Geom_BSplineSurface)) {
mySurfaceType = GeomAbs_BSplineSurface;
- myBspl = *((Handle(Geom_BSplineSurface)*)&mySurface);
+ myBspl = Handle(Geom_BSplineSurface)::DownCast (mySurface);
// Create cache for B-spline
mySurfaceCache = new BSplSLib_Cache(
myBspl->UDegree(), myBspl->IsUPeriodic(), myBspl->UKnotSequence(),
case GeomAbs_SurfaceOfExtrusion:
{
GeomAdaptor_Curve GC
- ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return GC.Continuity();
}
case GeomAbs_OtherSurface:
case GeomAbs_SurfaceOfRevolution:
{
GeomAdaptor_Curve GC
- ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myVFirst,myVLast);
+ (Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve(),myVFirst,myVLast);
return GC.Continuity();
}
case GeomAbs_OtherSurface:
case GeomAbs_SurfaceOfExtrusion:
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
if (myBasisCurve.GetType() == GeomAbs_BSplineCurve)
return myBasisCurve.NbIntervals(S);
break;
case GeomAbs_C3:
case GeomAbs_CN: break;
}
- GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface());
+ GeomAdaptor_Surface Sur(Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface());
return Sur.NbUIntervals(BaseS);
}
case GeomAbs_Plane:
case GeomAbs_SurfaceOfRevolution:
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myVFirst,myVLast);
+ (Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve(),myVFirst,myVLast);
if (myBasisCurve.GetType() == GeomAbs_BSplineCurve)
return myBasisCurve.NbIntervals(S);
break;
case GeomAbs_C3:
case GeomAbs_CN: break;
}
- GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface());
+ GeomAdaptor_Surface Sur(Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface());
return Sur.NbVIntervals(BaseS);
}
case GeomAbs_Plane:
case GeomAbs_SurfaceOfExtrusion:
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
if (myBasisCurve.GetType() == GeomAbs_BSplineCurve)
{
myNbUIntervals = myBasisCurve.NbIntervals(S);
case GeomAbs_C3:
case GeomAbs_CN: break;
}
- GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface());
+ GeomAdaptor_Surface Sur(Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface());
myNbUIntervals = Sur.NbUIntervals(BaseS);
Sur.UIntervals(T, BaseS);
}
case GeomAbs_SurfaceOfRevolution:
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myVFirst,myVLast);
+ (Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve(),myVFirst,myVLast);
if (myBasisCurve.GetType() == GeomAbs_BSplineCurve)
{
myNbVIntervals = myBasisCurve.NbIntervals(S);
case GeomAbs_C3:
case GeomAbs_CN: break;
}
- GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface());
+ GeomAdaptor_Surface Sur(Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface());
myNbVIntervals = Sur.NbVIntervals(BaseS);
Sur.VIntervals(T, BaseS);
}
case GeomAbs_SurfaceOfExtrusion:
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return myBasisCurve.Resolution(R3d);
}
case GeomAbs_Torus:
{
- Handle(Geom_ToroidalSurface)& S = *((Handle(Geom_ToroidalSurface)*)&mySurface);
+ Handle(Geom_ToroidalSurface)& S = Handle(Geom_ToroidalSurface)::DownCast (mySurface);
const Standard_Real R = S->MajorRadius() + S->MinorRadius();
if(R>Precision::Confusion())
Res = R3d/(2.*R);
}
case GeomAbs_Sphere:
{
- Handle(Geom_SphericalSurface)& S = *((Handle(Geom_SphericalSurface)*)&mySurface);
+ Handle(Geom_SphericalSurface)& S = Handle(Geom_SphericalSurface)::DownCast (mySurface);
const Standard_Real R = S->Radius();
if(R>Precision::Confusion())
Res = R3d/(2.*R);
}
case GeomAbs_Cylinder:
{
- Handle(Geom_CylindricalSurface)& S = *((Handle(Geom_CylindricalSurface)*)&mySurface);
+ Handle(Geom_CylindricalSurface)& S = Handle(Geom_CylindricalSurface)::DownCast (mySurface);
const Standard_Real R = S->Radius();
if(R>Precision::Confusion())
Res = R3d/(2.*R);
// Pas vraiment borne => resolution inconnue
return Precision::Parametric(R3d);
}
- Handle(Geom_ConicalSurface)& S = *((Handle(Geom_ConicalSurface)*)&mySurface);
+ Handle(Geom_ConicalSurface)& S = Handle(Geom_ConicalSurface)::DownCast (mySurface);
Handle(Geom_Curve) C = S->VIso(myVLast);
- const Standard_Real Rayon1 = (*((Handle(Geom_Circle)*)&C))->Radius();
+ const Standard_Real Rayon1 = Handle(Geom_Circle)::DownCast (C)->Radius();
C = S->VIso(myVFirst);
- const Standard_Real Rayon2 = (*((Handle(Geom_Circle)*)&C))->Radius();
+ const Standard_Real Rayon2 = Handle(Geom_Circle)::DownCast (C)->Radius();
const Standard_Real R = (Rayon1 > Rayon2)? Rayon1 : Rayon2;
return (R>Precision::Confusion()? (R3d / R) : 0.);
}
case GeomAbs_BezierSurface:
{
Standard_Real Ures,Vres;
- (*((Handle(Geom_BezierSurface)*)&mySurface))->Resolution(R3d,Ures,Vres);
+ Handle(Geom_BezierSurface)::DownCast (mySurface)->Resolution(R3d,Ures,Vres);
return Ures;
}
case GeomAbs_BSplineSurface:
{
Standard_Real Ures,Vres;
- (*((Handle(Geom_BSplineSurface)*)&mySurface))->Resolution(R3d,Ures,Vres);
+ Handle(Geom_BSplineSurface)::DownCast (mySurface)->Resolution(R3d,Ures,Vres);
return Ures;
}
case GeomAbs_OffsetSurface:
{
- Handle(Geom_Surface) base = (*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface();
+ Handle(Geom_Surface) base = Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface();
GeomAdaptor_Surface gabase(base,myUFirst,myULast,myVFirst,myVLast);
return gabase.UResolution(R3d);
}
case GeomAbs_SurfaceOfRevolution:
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return myBasisCurve.Resolution(R3d);
}
case GeomAbs_Torus:
{
- Handle(Geom_ToroidalSurface)& S = *((Handle(Geom_ToroidalSurface)*)&mySurface);
+ Handle(Geom_ToroidalSurface)& S = Handle(Geom_ToroidalSurface)::DownCast (mySurface);
const Standard_Real R = S->MinorRadius();
if(R>Precision::Confusion())
Res = R3d/(2.*R);
}
case GeomAbs_Sphere:
{
- Handle(Geom_SphericalSurface)& S = *((Handle(Geom_SphericalSurface)*)&mySurface);
+ Handle(Geom_SphericalSurface)& S = Handle(Geom_SphericalSurface)::DownCast (mySurface);
const Standard_Real R = S->Radius();
if(R>Precision::Confusion())
Res = R3d/(2.*R);
case GeomAbs_BezierSurface:
{
Standard_Real Ures,Vres;
- (*((Handle(Geom_BezierSurface)*)&mySurface))->Resolution(R3d,Ures,Vres);
+ Handle(Geom_BezierSurface)::DownCast (mySurface)->Resolution(R3d,Ures,Vres);
return Vres;
}
case GeomAbs_BSplineSurface:
{
Standard_Real Ures,Vres;
- (*((Handle(Geom_BSplineSurface)*)&mySurface))->Resolution(R3d,Ures,Vres);
+ Handle(Geom_BSplineSurface)::DownCast (mySurface)->Resolution(R3d,Ures,Vres);
return Vres;
}
case GeomAbs_OffsetSurface:
{
- Handle(Geom_Surface) base = (*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface();
+ Handle(Geom_Surface) base = Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface();
GeomAdaptor_Surface gabase(base,myUFirst,myULast,myVFirst,myVLast);
return gabase.VResolution(R3d);
}
{
if (mySurfaceType != GeomAbs_Plane)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::Plane");
- return (*((Handle(Geom_Plane)*)&mySurface))->Pln();
+ return Handle(Geom_Plane)::DownCast (mySurface)->Pln();
}
//=======================================================================
{
if (mySurfaceType != GeomAbs_Cylinder)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::Cylinder");
- return (*((Handle(Geom_CylindricalSurface)*)&mySurface))->Cylinder();
+ return Handle(Geom_CylindricalSurface)::DownCast (mySurface)->Cylinder();
}
//=======================================================================
{
if (mySurfaceType != GeomAbs_Cone)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::Cone");
- return (*((Handle(Geom_ConicalSurface)*)&mySurface))->Cone();
+ return Handle(Geom_ConicalSurface)::DownCast (mySurface)->Cone();
}
//=======================================================================
{
if (mySurfaceType != GeomAbs_Sphere)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::Sphere");
- return (*((Handle(Geom_SphericalSurface)*)&mySurface))->Sphere();
+ return Handle(Geom_SphericalSurface)::DownCast (mySurface)->Sphere();
}
//=======================================================================
{
if (mySurfaceType != GeomAbs_Torus)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::Torus");
- return (*((Handle(Geom_ToroidalSurface)*)&mySurface))->Torus();
+ return Handle(Geom_ToroidalSurface)::DownCast (mySurface)->Torus();
}
//=======================================================================
Standard_Integer GeomAdaptor_Surface::UDegree() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->UDegree();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->UDegree();
if ( mySurfaceType == GeomAbs_BezierSurface)
- return (*((Handle(Geom_BezierSurface)*)&mySurface))->UDegree();
+ return Handle(Geom_BezierSurface)::DownCast (mySurface)->UDegree();
if ( mySurfaceType == GeomAbs_SurfaceOfExtrusion)
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return myBasisCurve.Degree();
}
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::UDegree");
Standard_Integer GeomAdaptor_Surface::NbUPoles() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->NbUPoles();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->NbUPoles();
if ( mySurfaceType == GeomAbs_BezierSurface)
- return (*((Handle(Geom_BezierSurface)*)&mySurface))->NbUPoles();
+ return Handle(Geom_BezierSurface)::DownCast (mySurface)->NbUPoles();
if ( mySurfaceType == GeomAbs_SurfaceOfExtrusion)
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return myBasisCurve.NbPoles();
}
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::NbUPoles");
Standard_Integer GeomAdaptor_Surface::VDegree() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->VDegree();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->VDegree();
if ( mySurfaceType == GeomAbs_BezierSurface)
- return (*((Handle(Geom_BezierSurface)*)&mySurface))->VDegree();
+ return Handle(Geom_BezierSurface)::DownCast (mySurface)->VDegree();
if ( mySurfaceType == GeomAbs_SurfaceOfRevolution)
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return myBasisCurve.Degree();
}
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::VDegree");
Standard_Integer GeomAdaptor_Surface::NbVPoles() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->NbVPoles();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->NbVPoles();
if ( mySurfaceType == GeomAbs_BezierSurface)
- return (*((Handle(Geom_BezierSurface)*)&mySurface))->NbVPoles();
+ return Handle(Geom_BezierSurface)::DownCast (mySurface)->NbVPoles();
if ( mySurfaceType == GeomAbs_SurfaceOfRevolution)
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return myBasisCurve.NbPoles();
}
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::NbVPoles");
Standard_Integer GeomAdaptor_Surface::NbUKnots() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->NbUKnots();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->NbUKnots();
if ( mySurfaceType == GeomAbs_SurfaceOfExtrusion)
{
GeomAdaptor_Curve myBasisCurve
- ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast);
+ (Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve(),myUFirst,myULast);
return myBasisCurve.NbKnots();
}
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::NbUKnots");
Standard_Integer GeomAdaptor_Surface::NbVKnots() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->NbVKnots();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->NbVKnots();
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::NbVKnots");
return 0;
}
Standard_Boolean GeomAdaptor_Surface::IsURational() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->IsURational();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->IsURational();
if (mySurfaceType == GeomAbs_BezierSurface)
- return (*((Handle(Geom_BezierSurface)*)&mySurface))->IsURational();
+ return Handle(Geom_BezierSurface)::DownCast (mySurface)->IsURational();
return Standard_False;
}
Standard_Boolean GeomAdaptor_Surface::IsVRational() const
{
if (mySurfaceType == GeomAbs_BSplineSurface)
- return (*((Handle(Geom_BSplineSurface)*)&mySurface))->IsVRational();
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface)->IsVRational();
if (mySurfaceType == GeomAbs_BezierSurface)
- return (*((Handle(Geom_BezierSurface)*)&mySurface))->IsVRational();
+ return Handle(Geom_BezierSurface)::DownCast (mySurface)->IsVRational();
return Standard_False;
}
{
if (mySurfaceType != GeomAbs_BezierSurface)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::Bezier");
- return *((Handle(Geom_BezierSurface)*)&mySurface);
+ return Handle(Geom_BezierSurface)::DownCast (mySurface);
}
//=======================================================================
{
if (mySurfaceType != GeomAbs_BSplineSurface)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::BSpline");
- return *((Handle(Geom_BSplineSurface)*)&mySurface);
+ return Handle(Geom_BSplineSurface)::DownCast (mySurface);
}
//=======================================================================
{
if (mySurfaceType != GeomAbs_SurfaceOfRevolution)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::AxeOfRevolution");
- return (*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->Axis();
+ return Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->Axis();
}
//=======================================================================
{
if (mySurfaceType != GeomAbs_SurfaceOfExtrusion)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::Direction");
- return (*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->Direction();
+ return Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->Direction();
}
//=======================================================================
{
Handle(Geom_Curve) C;
if (mySurfaceType == GeomAbs_SurfaceOfExtrusion)
- C = (*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve();
+ C = Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (mySurface)->BasisCurve();
else if (mySurfaceType == GeomAbs_SurfaceOfRevolution)
- C = (*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve();
+ C = Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve();
else
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::BasisCurve");
return Handle(GeomAdaptor_HCurve)(new GeomAdaptor_HCurve(C));
if (mySurfaceType != GeomAbs_OffsetSurface)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::BasisSurface");
return new GeomAdaptor_HSurface
- ((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface(),
+ (Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface(),
myUFirst,myULast,myVFirst,myVLast);
}
{
if (mySurfaceType != GeomAbs_OffsetSurface)
Standard_NoSuchObject::Raise("GeomAdaptor_Surface::BasisSurface");
- return (*((Handle(Geom_OffsetSurface)*)&mySurface))->Offset();
+ return Handle(Geom_OffsetSurface)::DownCast (mySurface)->Offset();
}
//=======================================================================
Handle(Geom_Surface) S;
Handle(Geom_OffsetSurface) OffsetSur;
if (Sr->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) {
- OffsetSur = *((Handle(Geom_OffsetSurface)*)& Sr);
+ OffsetSur = Handle(Geom_OffsetSurface)::DownCast (Sr);
S = OffsetSur->Surface();
if (!S.IsNull()) { // Convert the equivalent surface.
return SurfaceToBSplineSurface(S);
HasDF,HasDL,DF,DL,
Rev,30);
myPar = new Law_BSpFunc();
- (*((Handle(Law_BSpFunc)*) &myPar))->SetCurve(curve);
+ Handle(Law_BSpFunc)::DownCast (myPar)->SetCurve(curve);
}
//=======================================================================
if(!CheckTgte(i)) {
Handle(Law_Function) fu1,fu2;
ptch->Func(fu1,fu2);
- fu1 = Law::MixBnd(*((Handle(Law_Linear)*) &fu1));
- fu2 = Law::MixBnd(*((Handle(Law_Linear)*) &fu2));
+ fu1 = Law::MixBnd(Handle(Law_Linear)::DownCast (fu1));
+ fu2 = Law::MixBnd(Handle(Law_Linear)::DownCast (fu2));
ptch->Func(fu1,fu2);
break;
}
if(!CheckTgte(i)) {
Handle(Law_Function) fu1,fu2;
ptch->Func(fu1,fu2);
- Handle(Law_Function) ffu1 = Law::MixBnd(*((Handle(Law_Linear)*) &fu1));
- Handle(Law_Function) ffu2 = Law::MixBnd(*((Handle(Law_Linear)*) &fu2));
+ Handle(Law_Function) ffu1 = Law::MixBnd(Handle(Law_Linear)::DownCast (fu1));
+ Handle(Law_Function) ffu2 = Law::MixBnd(Handle(Law_Linear)::DownCast (fu2));
ptch->SetFunc(ffu1,ffu2);
break;
}
//// modified by jgv, 19.01.05 for OCC7354 ////
Handle(Geom_Curve) theCurve = Curve;
if (theCurve->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
- theCurve = (*((Handle(Geom_TrimmedCurve)*)&theCurve))->BasisCurve();
+ theCurve = Handle(Geom_TrimmedCurve)::DownCast (theCurve)->BasisCurve();
if (theCurve->IsKind(STANDARD_TYPE(Geom_Conic)))
{
GeomConvert_ApproxCurve appr(Curve, Precision::Confusion(), GeomAbs_C1, 16, 14);
HasDF,HasDL,DF,DL,
Rev,30);
myPar = new Law_BSpFunc();
- (*((Handle(Law_BSpFunc)*) &myPar))->SetCurve(curve);
+ Handle(Law_BSpFunc)::DownCast (myPar)->SetCurve(curve);
}
//=======================================================================
myCurve2d = new (TColGeom2d_HArray1OfCurve) (1, 2);
CError = new (TColStd_HArray2OfReal) (1,2, 1,2);
- const Handle(Geom_BSplineSurface)& BSplSurf =
- Handle(Geom_BSplineSurface)::DownCast(mySurface);
+ Handle(Geom_BSplineSurface) BSplSurf (Handle(Geom_BSplineSurface)::DownCast(mySurface));
gp_Dir2d D(0., 1.);
gp_Pnt2d P(BSplSurf->UKnot(1), 0);
const IntPatch_IType typl = L->ArcType();
if(typl == IntPatch_Analytic) {
Standard_Real u1,v1,u2,v2;
- Handle(IntPatch_ALine)& ALine = *((Handle(IntPatch_ALine) *)&L);
+ Handle(IntPatch_ALine)& ALine = Handle(IntPatch_ALine)::DownCast (L);
seqp.Clear();
nbvtx = GeomInt_LineTool::NbVertex(L);
for(i=1;i<nbvtx;i++) {
} // if(typl == IntPatch_Analytic) {
else if(typl == IntPatch_Walking) {
Standard_Real u1,v1,u2,v2;
- Handle(IntPatch_WLine)& WLine = *((Handle(IntPatch_WLine) *)&L);
+ Handle(IntPatch_WLine)& WLine = Handle(IntPatch_WLine)::DownCast (L);
seqp.Clear();
nbvtx = GeomInt_LineTool::NbVertex(L);
for(i=1;i<nbvtx;i++) {
else if (typl != IntPatch_Restriction) {
seqp.Clear();
//
- Handle(IntPatch_GLine)& GLine = *((Handle(IntPatch_GLine) *)&L);
+ Handle(IntPatch_GLine)& GLine = Handle(IntPatch_GLine)::DownCast (L);
//
if(typl == IntPatch_Circle || typl == IntPatch_Ellipse) {
TreatCircle(L, Tol);
IntPatch_IType aType;
//
aType=aLine->ArcType();
- Handle(IntPatch_GLine)& aGLine=*((Handle(IntPatch_GLine) *)&aLine);
+ Handle(IntPatch_GLine)& aGLine=Handle(IntPatch_GLine)::DownCast (aLine);
//
bRejected=RejectMicroCircle(aGLine, aType, aTol);
if (bRejected) {
Standard_Integer curve_not_computed = 1 ;
MaxDeviation = 0.0e0 ;
AverageDeviation = 0.0e0 ;
- const Handle(GeomAdaptor_HSurface) & geom_adaptor_surface_ptr =
- Handle(GeomAdaptor_HSurface)::DownCast(Curve.GetSurface()) ;
- const Handle(Geom2dAdaptor_HCurve) & geom_adaptor_curve_ptr =
- Handle(Geom2dAdaptor_HCurve)::DownCast(Curve.GetCurve()) ;
+ Handle(GeomAdaptor_HSurface) geom_adaptor_surface_ptr (Handle(GeomAdaptor_HSurface)::DownCast(Curve.GetSurface()) );
+ Handle(Geom2dAdaptor_HCurve) geom_adaptor_curve_ptr (Handle(Geom2dAdaptor_HCurve)::DownCast(Curve.GetCurve()) );
if (! geom_adaptor_curve_ptr.IsNull() &&
! geom_adaptor_surface_ptr.IsNull()) {
Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]);
defl = Draw::Atof(a[3]);
- const Handle(Geom_BSplineCurve)& aBS = Handle(Geom_BSplineCurve)::DownCast(C);
+ Handle(Geom_BSplineCurve) aBS (Handle(Geom_BSplineCurve)::DownCast(C));
if(aBS.IsNull()) return 1;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
if (aCurve->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve))
aCurve = (Handle(Geom_TrimmedCurve)::DownCast(aCurve))->BasisCurve();
- const Handle(Geom_BSplineCurve)& BSplCurve = Handle(Geom_BSplineCurve)::DownCast(aCurve);
+ Handle(Geom_BSplineCurve) BSplCurve (Handle(Geom_BSplineCurve)::DownCast(aCurve));
Handle(Geom_BSplineCurve) theCurve = Handle(Geom_BSplineCurve)::DownCast(BSplCurve->Copy());
if (theCurve->IsPeriodic() && !GAcurve.IsClosed())
{
solpnt.SetArc(OnFirst,currentarc, currentparameter,
Transline,Transarc);
if (TheType == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&lin))->AddVertex(solpnt);
+ Handle(IntPatch_ALine)::DownCast (lin)->AddVertex(solpnt);
}
else {
- (*((Handle(IntPatch_GLine)*)&lin))->AddVertex(solpnt);
+ Handle(IntPatch_GLine)::DownCast (lin)->AddVertex(solpnt);
}
Done(i) = 1;
solpnt.SetArc(OnFirst,currentarc,currentparameter,
Transline,Transarc);
if (TheType == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&lin))->AddVertex(solpnt);
+ Handle(IntPatch_ALine)::DownCast (lin)->AddVertex(solpnt);
}
else {
- (*((Handle(IntPatch_GLine)*)&lin))->AddVertex(solpnt);
+ Handle(IntPatch_GLine)::DownCast (lin)->AddVertex(solpnt);
}
Done(k) = 1;
}
const Handle(IntPatch_Line)& slinValueii = slin.Value(ii);
TheType = slinValueii->ArcType();
if (TheType == IntPatch_Analytic) {
- nbvtx = (*((Handle(IntPatch_ALine)*)&slinValueii))->NbVertex();
+ nbvtx = Handle(IntPatch_ALine)::DownCast (slinValueii)->NbVertex();
}
else {
- nbvtx = (*((Handle(IntPatch_GLine)*)&slinValueii))->NbVertex();
+ nbvtx = Handle(IntPatch_GLine)::DownCast (slinValueii)->NbVertex();
}
jj = 1;
while (jj <= nbvtx) {
if (TheType == IntPatch_Analytic) {
- intpt = (*((Handle(IntPatch_ALine)*)&slinValueii))->Vertex(jj);
+ intpt = Handle(IntPatch_ALine)::DownCast (slinValueii)->Vertex(jj);
}
else {
- intpt = (*((Handle(IntPatch_GLine)*)&slinValueii))->Vertex(jj);
+ intpt = Handle(IntPatch_GLine)::DownCast (slinValueii)->Vertex(jj);
}
if (intpt.IsMultiple() &&
(( OnFirst && !intpt.IsOnDomS1()) ||
if (TheType == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&slinValueii))->Replace(jj,intpt);
+ Handle(IntPatch_ALine)::DownCast (slinValueii)->Replace(jj,intpt);
}
else {
- (*((Handle(IntPatch_GLine)*)&slinValueii))->Replace(jj,intpt);
+ Handle(IntPatch_GLine)::DownCast (slinValueii)->Replace(jj,intpt);
}
localdone(Index) = 1;
if (goon) {
intpt.SetArc(OnFirst,currentarc,currentparameter,
Transline,Transarc);
if (TheType == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&slinValueii))->AddVertex(intpt);
+ Handle(IntPatch_ALine)::DownCast (slinValueii)->AddVertex(intpt);
}
else {
- (*((Handle(IntPatch_GLine)*)&slinValueii))->AddVertex(intpt);
+ Handle(IntPatch_GLine)::DownCast (slinValueii)->AddVertex(intpt);
}
UsedLine(ii) = 1;
Retvalue = Standard_True;
TheType = lin->ArcType();
if (TheType == IntPatch_Analytic) {
- nbvtx = (*((Handle(IntPatch_ALine)*)&lin))->NbVertex();
+ nbvtx = Handle(IntPatch_ALine)::DownCast (lin)->NbVertex();
}
else {
- nbvtx = (*((Handle(IntPatch_GLine)*)&lin))->NbVertex();
+ nbvtx = Handle(IntPatch_GLine)::DownCast (lin)->NbVertex();
}
jj = 1;
while (jj <= nbvtx) {
if (TheType == IntPatch_Analytic) {
- intpt = (*((Handle(IntPatch_ALine)*)&lin))->Vertex(jj);
+ intpt = Handle(IntPatch_ALine)::DownCast (lin)->Vertex(jj);
}
else {
- intpt = (*((Handle(IntPatch_GLine)*)&lin))->Vertex(jj);
+ intpt = Handle(IntPatch_GLine)::DownCast (lin)->Vertex(jj);
}
if (!intpt.IsOnDomS2()) {
if (currentpointonrst.Value().Distance(intpt.Value()) <=
intpt.SetArc(Standard_False,currentarc,currentparameter,
Transline,Transarc);
if (TheType == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&lin))->Replace(jj,intpt);
+ Handle(IntPatch_ALine)::DownCast (lin)->Replace(jj,intpt);
}
else {
- (*((Handle(IntPatch_GLine)*)&lin))->Replace(jj,intpt);
+ Handle(IntPatch_GLine)::DownCast (lin)->Replace(jj,intpt);
}
Done(Index) = 1;
intpt.SetArc(Standard_False,currentarc,currentparameter,
Transline,Transarc);
if (TheType == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&lin))->AddVertex(intpt);
+ Handle(IntPatch_ALine)::DownCast (lin)->AddVertex(intpt);
}
else {
- (*((Handle(IntPatch_GLine)*)&lin))->AddVertex(intpt);
+ Handle(IntPatch_GLine)::DownCast (lin)->AddVertex(intpt);
}
Done(k) = 1;
}
jj = jj+1;
}
if (TheType == IntPatch_Analytic) {
- nbvtx = (*((Handle(IntPatch_ALine)*)&lin))->NbVertex();
+ nbvtx = Handle(IntPatch_ALine)::DownCast (lin)->NbVertex();
}
else {
- nbvtx = (*((Handle(IntPatch_GLine)*)&lin))->NbVertex();
+ nbvtx = Handle(IntPatch_GLine)::DownCast (lin)->NbVertex();
}
}
return Retvalue;
typarc = lin->ArcType();
if (typarc == IntPatch_Analytic) {
Standard_Boolean foo;
- lower = (*((Handle(IntPatch_ALine)*)&lin))->FirstParameter(foo);
- upper = (*((Handle(IntPatch_ALine)*)&lin))->LastParameter(foo);
+ lower = Handle(IntPatch_ALine)::DownCast (lin)->FirstParameter(foo);
+ upper = Handle(IntPatch_ALine)::DownCast (lin)->LastParameter(foo);
}
else {
- if ((*((Handle(IntPatch_GLine)*)&lin))->HasFirstPoint()) {
- lower = (*((Handle(IntPatch_GLine)*)&lin))->FirstPoint().ParameterOnLine();
+ if (Handle(IntPatch_GLine)::DownCast (lin)->HasFirstPoint()) {
+ lower = Handle(IntPatch_GLine)::DownCast (lin)->FirstPoint().ParameterOnLine();
}
else {
lower = RealFirst();
}
- if ((*((Handle(IntPatch_GLine)*)&lin))->HasLastPoint()) {
- upper = (*((Handle(IntPatch_GLine)*)&lin))->LastPoint().ParameterOnLine();
+ if (Handle(IntPatch_GLine)::DownCast (lin)->HasLastPoint()) {
+ upper = Handle(IntPatch_GLine)::DownCast (lin)->LastPoint().ParameterOnLine();
}
else {
upper = RealLast();
switch (typarc) {
case IntPatch_Lin :
{
- para = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Line(),Psurf);
+ para = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Line(),Psurf);
if (para <= upper && para >= lower) {
- pt = ElCLib::Value(para,(*((Handle(IntPatch_GLine)*)&lin))->Line());
+ pt = ElCLib::Value(para,Handle(IntPatch_GLine)::DownCast (lin)->Line());
dist = Psurf.Distance(pt);
if (dist< distmin) {
distmin = dist;
break;
case IntPatch_Circle :
{
- para = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Circle(),Psurf);
+ para = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Circle(),Psurf);
if ((para <= upper && para >= lower) ||
(para + 2.*M_PI <=upper && para + 2.*M_PI >= lower) ||
(para - 2.*M_PI <=upper && para - 2.*M_PI >= lower)) {
- pt = ElCLib::Value(para,(*((Handle(IntPatch_GLine)*)&lin))->Circle());
+ pt = ElCLib::Value(para,Handle(IntPatch_GLine)::DownCast (lin)->Circle());
dist = Psurf.Distance(pt);
if (dist< distmin) {
distmin = dist;
break;
case IntPatch_Ellipse :
{
- para = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Ellipse(),Psurf);
+ para = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Ellipse(),Psurf);
if ((para <= upper && para >= lower) ||
(para + 2.*M_PI <=upper && para + 2.*M_PI >= lower) ||
(para - 2.*M_PI <=upper && para - 2.*M_PI >= lower)) {
- pt = ElCLib::Value(para,(*((Handle(IntPatch_GLine)*)&lin))->Ellipse());
+ pt = ElCLib::Value(para,Handle(IntPatch_GLine)::DownCast (lin)->Ellipse());
dist = Psurf.Distance(pt);
if (dist< distmin) {
distmin = dist;
{
#if 0
- para = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Parabola(),Psurf);
+ para = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Parabola(),Psurf);
if (para <= upper && para >= lower) {
- pt = ElCLib::Value(para,(*((Handle(IntPatch_GLine)*)&lin))->Parabola());
+ pt = ElCLib::Value(para,Handle(IntPatch_GLine)::DownCast (lin)->Parabola());
dist = Psurf.Distance(pt);
if (dist< distmin) {
distmin = dist;
//-- de la meilleure facon de calculer (axe X ou axe Y). Bilan : Si la parabole est tres
//-- pointue (focal de l'ordre de 1e-2 et si le point est a un parametre grand, ca foire. )
//-- On ne peut pas modifier faciolement ds ElCLib car on ne passe pas la focale. ...
- const gp_Parab& Parab=(*((Handle(IntPatch_GLine)*)&lin))->Parabola();
+ const gp_Parab& Parab=Handle(IntPatch_GLine)::DownCast (lin)->Parabola();
para = ElCLib::Parameter(Parab,Psurf);
if (para <= upper && para >= lower) {
Standard_Integer amelioration=0;
break;
case IntPatch_Hyperbola :
{
- para = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Hyperbola(),Psurf);
+ para = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Hyperbola(),Psurf);
if (para <= upper && para >= lower) {
- pt = ElCLib::Value(para,(*((Handle(IntPatch_GLine)*)&lin))->Hyperbola());
+ pt = ElCLib::Value(para,Handle(IntPatch_GLine)::DownCast (lin)->Hyperbola());
dist = Psurf.Distance(pt);
if (dist< distmin) {
distmin = dist;
case IntPatch_Analytic :
{
- const Handle(IntPatch_ALine)& alin = (*((Handle(IntPatch_ALine)*)&lin));
+ Handle(IntPatch_ALine) alin (Handle(IntPatch_ALine)::DownCast (lin));
Standard_Boolean ok = alin->FindParameter(Psurf,para);
if (ok) {
pt = alin->Value(para);
switch (typarc) {
case IntPatch_Lin :
- parproj = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Line(),Psurf);
- ElCLib::D1(parproj,(*((Handle(IntPatch_GLine)*)&lin))->Line(),ptproj,tgint);
+ parproj = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Line(),Psurf);
+ ElCLib::D1(parproj,Handle(IntPatch_GLine)::DownCast (lin)->Line(),ptproj,tgint);
break;
case IntPatch_Circle :
- parproj = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Circle(),Psurf);
- ElCLib::D1(parproj,(*((Handle(IntPatch_GLine)*)&lin))->Circle(),ptproj,tgint);
+ parproj = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Circle(),Psurf);
+ ElCLib::D1(parproj,Handle(IntPatch_GLine)::DownCast (lin)->Circle(),ptproj,tgint);
break;
case IntPatch_Ellipse :
- parproj = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Ellipse(),Psurf);
- ElCLib::D1(parproj,(*((Handle(IntPatch_GLine)*)&lin))->Ellipse(),ptproj,tgint);
+ parproj = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Ellipse(),Psurf);
+ ElCLib::D1(parproj,Handle(IntPatch_GLine)::DownCast (lin)->Ellipse(),ptproj,tgint);
break;
case IntPatch_Parabola :
- parproj = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Parabola(),Psurf);
- ElCLib::D1(parproj,(*((Handle(IntPatch_GLine)*)&lin))->Parabola(),ptproj,tgint);
+ parproj = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Parabola(),Psurf);
+ ElCLib::D1(parproj,Handle(IntPatch_GLine)::DownCast (lin)->Parabola(),ptproj,tgint);
break;
case IntPatch_Hyperbola :
- parproj = ElCLib::Parameter((*((Handle(IntPatch_GLine)*)&lin))->Hyperbola(),Psurf);
- ElCLib::D1(parproj,(*((Handle(IntPatch_GLine)*)&lin))->Hyperbola(),ptproj,tgint);
+ parproj = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Hyperbola(),Psurf);
+ ElCLib::D1(parproj,Handle(IntPatch_GLine)::DownCast (lin)->Hyperbola(),ptproj,tgint);
break;
case IntPatch_Analytic :
{
- const Handle(IntPatch_ALine)& alin = (*((Handle(IntPatch_ALine)*)&lin));
+ Handle(IntPatch_ALine) alin (Handle(IntPatch_ALine)::DownCast (lin));
Standard_Boolean ok = alin->FindParameter(Psurf,parproj);
if (ok) {
gp_Pnt ptbid;
const Handle(IntPatch_Line)& slinj = slin(j);
typ = slinj->ArcType();
if (typ == IntPatch_Analytic) {
- Nbpts = (*((Handle(IntPatch_ALine)*)&slinj))->NbVertex();
+ Nbpts = Handle(IntPatch_ALine)::DownCast (slinj)->NbVertex();
}
else if (typ == IntPatch_Restriction) {
- Nbpts = (*((Handle(IntPatch_RLine)*)&slinj))->NbVertex();
+ Nbpts = Handle(IntPatch_RLine)::DownCast (slinj)->NbVertex();
}
else {
- Nbpts = (*((Handle(IntPatch_GLine)*)&slinj))->NbVertex();
+ Nbpts = Handle(IntPatch_GLine)::DownCast (slinj)->NbVertex();
}
for (k=1; k<=Nbpts;k++) {
if (typ == IntPatch_Analytic) {
- ptvtx = (*((Handle(IntPatch_ALine)*)&slinj))->Vertex(k);
+ ptvtx = Handle(IntPatch_ALine)::DownCast (slinj)->Vertex(k);
}
else if (typ == IntPatch_Restriction) {
- ptvtx = (*((Handle(IntPatch_RLine)*)&slinj))->Vertex(k);
+ ptvtx = Handle(IntPatch_RLine)::DownCast (slinj)->Vertex(k);
}
else {
- ptvtx = (*((Handle(IntPatch_GLine)*)&slinj))->Vertex(k);
+ ptvtx = Handle(IntPatch_GLine)::DownCast (slinj)->Vertex(k);
}
if (EdgeDegenere==Standard_False && dofirst) {
if (ptvtx.Value().Distance(PStartf.Value()) <=TolArc) {
ptvtx.SetMultiple(Standard_True);
if (typ == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&slinj))->Replace(k,ptvtx);
+ Handle(IntPatch_ALine)::DownCast (slinj)->Replace(k,ptvtx);
}
else if (typ == IntPatch_Restriction) {
- (*((Handle(IntPatch_RLine)*)&slinj))->Replace(k,ptvtx);
+ Handle(IntPatch_RLine)::DownCast (slinj)->Replace(k,ptvtx);
}
else {
- (*((Handle(IntPatch_GLine)*)&slinj))->Replace(k,ptvtx);
+ Handle(IntPatch_GLine)::DownCast (slinj)->Replace(k,ptvtx);
}
newptvtx = ptvtx;
newptvtx.SetParameter(paramf);
if (ptvtx.Value().Distance(PStartl.Value()) <=TolArc) {
ptvtx.SetMultiple(Standard_True);
if (typ == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&slinj))->Replace(k,ptvtx);
+ Handle(IntPatch_ALine)::DownCast (slinj)->Replace(k,ptvtx);
}
else if (typ == IntPatch_Restriction) {
- (*((Handle(IntPatch_RLine)*)&slinj))->Replace(k,ptvtx);
+ Handle(IntPatch_RLine)::DownCast (slinj)->Replace(k,ptvtx);
}
else {
- (*((Handle(IntPatch_GLine)*)&slinj))->Replace(k,ptvtx);
+ Handle(IntPatch_GLine)::DownCast (slinj)->Replace(k,ptvtx);
}
newptvtx = ptvtx;
Nbpt = seq_Pnt3d.Length(); // important que ce soit ici
typ2 = slinj->ArcType();
if (typ2 != IntPatch_Restriction) {
- //-- arcref = (*((Handle(IntPatch_RLine)*)&slini))->Arc();
- //-- OnFirst = (*((Handle(IntPatch_RLine)*)&slini))->IsOnFirstSurface();
+ //-- arcref = Handle(IntPatch_RLine)::DownCast (slini)->Arc();
+ //-- OnFirst = Handle(IntPatch_RLine)::DownCast (slini)->IsOnFirstSurface();
//-- DES CHOSES A FAIRE ICI
- if((*((Handle(IntPatch_RLine)*)&slini))->IsArcOnS1()) {
+ if(Handle(IntPatch_RLine)::DownCast (slini)->IsArcOnS1()) {
OnFirst=Standard_True;
- arcref= (*((Handle(IntPatch_RLine)*)&slini))->ArcOnS1();
+ arcref= Handle(IntPatch_RLine)::DownCast (slini)->ArcOnS1();
}
- else if((*((Handle(IntPatch_RLine)*)&slini))->IsArcOnS2()) {
- arcref= (*((Handle(IntPatch_RLine)*)&slini))->ArcOnS2();
+ else if(Handle(IntPatch_RLine)::DownCast (slini)->IsArcOnS2()) {
+ arcref= Handle(IntPatch_RLine)::DownCast (slini)->ArcOnS2();
OnFirst=Standard_False;
}
- if ((*((Handle(IntPatch_RLine)*)&slini))->HasFirstPoint()) {
- paramf = (*((Handle(IntPatch_RLine)*)&slini))->FirstPoint().ParameterOnLine();
+ if (Handle(IntPatch_RLine)::DownCast (slini)->HasFirstPoint()) {
+ paramf = Handle(IntPatch_RLine)::DownCast (slini)->FirstPoint().ParameterOnLine();
}
else {
// cout << "Pas de param debut sur rst solution" << endl;
paramf = RealFirst();
}
- if ((*((Handle(IntPatch_RLine)*)&slini))->HasLastPoint()) {
- paraml = (*((Handle(IntPatch_RLine)*)&slini))->LastPoint().ParameterOnLine();
+ if (Handle(IntPatch_RLine)::DownCast (slini)->HasLastPoint()) {
+ paraml = Handle(IntPatch_RLine)::DownCast (slini)->LastPoint().ParameterOnLine();
}
else {
// cout << "Pas de param debut sur rst solution" << endl;
}
if (typ2 == IntPatch_Analytic) {
- Nbvtx = (*((Handle(IntPatch_ALine)*)&slinj))->NbVertex();
+ Nbvtx = Handle(IntPatch_ALine)::DownCast (slinj)->NbVertex();
}
else {
- Nbvtx = (*((Handle(IntPatch_GLine)*)&slinj))->NbVertex();
+ Nbvtx = Handle(IntPatch_GLine)::DownCast (slinj)->NbVertex();
}
for (k=1; EdgeDegenere==Standard_False && k<=Nbvtx; k++) {
if (typ2 == IntPatch_Analytic) {
- Ptvtx = (*((Handle(IntPatch_ALine)*)&slinj))->Vertex(k);
+ Ptvtx = Handle(IntPatch_ALine)::DownCast (slinj)->Vertex(k);
}
else {
- Ptvtx = (*((Handle(IntPatch_GLine)*)&slinj))->Vertex(k);
+ Ptvtx = Handle(IntPatch_GLine)::DownCast (slinj)->Vertex(k);
}
if ((OnFirst && !Ptvtx.IsOnDomS1()) ||
(!OnFirst && !Ptvtx.IsOnDomS2())) {
for (int ri=1; ri<=Nblin; ri++) {
const Handle(IntPatch_Line)& slinri = slin(ri);
if (slinri->ArcType() == IntPatch_Restriction) {
- if(OnFirst && (*((Handle(IntPatch_RLine)*)&slinri))->IsArcOnS1()) {
- if(arcref == (*((Handle(IntPatch_RLine)*)&slinri))->ArcOnS1()) {
- (*((Handle(IntPatch_RLine)*)&slinri))->AddVertex(newptvtx);
+ if(OnFirst && Handle(IntPatch_RLine)::DownCast (slinri)->IsArcOnS1()) {
+ if(arcref == Handle(IntPatch_RLine)::DownCast (slinri)->ArcOnS1()) {
+ Handle(IntPatch_RLine)::DownCast (slinri)->AddVertex(newptvtx);
//printf("\n ImpImpIntersection_0.gxx CAS1 \n");
}
}
- else if(OnFirst==Standard_False && (*((Handle(IntPatch_RLine)*)&slinri))->IsArcOnS2()) {
- if(arcref == (*((Handle(IntPatch_RLine)*)&slinri))->ArcOnS2()) {
- (*((Handle(IntPatch_RLine)*)&slinri))->AddVertex(newptvtx);
+ else if(OnFirst==Standard_False && Handle(IntPatch_RLine)::DownCast (slinri)->IsArcOnS2()) {
+ if(arcref == Handle(IntPatch_RLine)::DownCast (slinri)->ArcOnS2()) {
+ Handle(IntPatch_RLine)::DownCast (slinri)->AddVertex(newptvtx);
//printf("\n ImpImpIntersection_0.gxx CAS2 \n");
}
}
newptvtx.SetMultiple(Standard_True);
if (typ2 == IntPatch_Analytic) {
- (*((Handle(IntPatch_ALine)*)&slinj))->Replace(k,Ptvtx);
+ Handle(IntPatch_ALine)::DownCast (slinj)->Replace(k,Ptvtx);
}
else {
- (*((Handle(IntPatch_GLine)*)&slinj))->Replace(k,Ptvtx);
+ Handle(IntPatch_GLine)::DownCast (slinj)->Replace(k,Ptvtx);
}
if (Ptvtx.IsOnDomS1() || Ptvtx.IsOnDomS2()) {
}
} //-- if (Ptvtx.IsOnDomS1() || Ptvtx.IsOnDomS2())
- (*((Handle(IntPatch_RLine)*)&slini))->AddVertex(newptvtx);
+ Handle(IntPatch_RLine)::DownCast (slini)->AddVertex(newptvtx);
} //-- if (keeppoint)
} //-- if ((OnFirst && !Ptvtx.IsOnDomS1())||(!OnFirst && !Ptvtx.IsOnDomS2()))
{
for(Standard_Integer aNbLin = 1; aNbLin <= theSlin.Length(); aNbLin++)
{
- const Handle(IntPatch_WLine)& aWLine1 =
- Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNbLin));
+ Handle(IntPatch_WLine) aWLine1 (Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNbLin)));
const IntSurf_PntOn2S& aPntFWL1 = aWLine1->Point(1);
const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aWLine1->NbPnts());
for (Standard_Integer j=1; j<=Nblines-1; j++) {
dofirst = dolast = Standard_False;
const Handle(IntPatch_Line)& slinj = slin(j);
- const Handle(IntPatch_WLine)& wlin1 = *((Handle(IntPatch_WLine)*)&slinj);
+ Handle(IntPatch_WLine) wlin1 (Handle(IntPatch_WLine)::DownCast (slinj));
if (wlin1->HasFirstPoint()) {
ptdeb = wlin1->FirstPoint(indfirst);
if (ptdeb.IsTangencyPoint()) {
if (dofirst || dolast) {
for (Standard_Integer k=j+1; k<=Nblines;k++) {
const Handle(IntPatch_Line)& slink = slin(k);
- const Handle(IntPatch_WLine)& wlin2 = *((Handle(IntPatch_WLine)*)&slink);
+ Handle(IntPatch_WLine) wlin2 (Handle(IntPatch_WLine)::DownCast (slink));
if (wlin2->HasFirstPoint()) {
ptbis = wlin2->FirstPoint(ind2);
if (ptbis.IsTangencyPoint()) {
const Handle(IntPatch_Line)& slinj = slin(j);
typ = slinj->ArcType();
if (typ == IntPatch_Walking) {
- Nbpts = (*((Handle(IntPatch_WLine)*)&slinj))->NbVertex();
+ Nbpts = Handle(IntPatch_WLine)::DownCast (slinj)->NbVertex();
}
else {
- Nbpts = (*((Handle(IntPatch_RLine)*)&slinj))->NbVertex();
+ Nbpts = Handle(IntPatch_RLine)::DownCast (slinj)->NbVertex();
}
for (Standard_Integer k=1; k<=Nbpts;k++) {
if (typ == IntPatch_Walking) {
- ptdeb = (*((Handle(IntPatch_WLine)*)&slinj))->Vertex(k);
+ ptdeb = Handle(IntPatch_WLine)::DownCast (slinj)->Vertex(k);
}
else {
- ptdeb = (*((Handle(IntPatch_RLine)*)&slinj))->Vertex(k);
+ ptdeb = Handle(IntPatch_RLine)::DownCast (slinj)->Vertex(k);
}
if (dofirst) {
if (ptdeb.Value().Distance(PStartf.Value()) <=TolArc) {
ptdeb.SetMultiple(Standard_True);
if (typ == IntPatch_Walking) {
- (*((Handle(IntPatch_WLine)*)&slinj))->Replace(k,ptdeb);
+ Handle(IntPatch_WLine)::DownCast (slinj)->Replace(k,ptdeb);
}
else {
- (*((Handle(IntPatch_RLine)*)&slinj))->Replace(k,ptdeb);
+ Handle(IntPatch_RLine)::DownCast (slinj)->Replace(k,ptdeb);
}
ptdeb.SetParameter(paramf);
rline->AddVertex(ptdeb);
if (dolast) {
if(dofirst) { //-- on recharge le ptdeb
if (typ == IntPatch_Walking) {
- ptdeb = (*((Handle(IntPatch_WLine)*)&slinj))->Vertex(k);
+ ptdeb = Handle(IntPatch_WLine)::DownCast (slinj)->Vertex(k);
}
else {
- ptdeb = (*((Handle(IntPatch_RLine)*)&slinj))->Vertex(k);
+ ptdeb = Handle(IntPatch_RLine)::DownCast (slinj)->Vertex(k);
}
}
if (ptdeb.Value().Distance(PStartl.Value()) <=TolArc) {
ptdeb.SetMultiple(Standard_True);
if (typ == IntPatch_Walking) {
- (*((Handle(IntPatch_WLine)*)&slinj))->Replace(k,ptdeb);
+ Handle(IntPatch_WLine)::DownCast (slinj)->Replace(k,ptdeb);
}
else {
- (*((Handle(IntPatch_RLine)*)&slinj))->Replace(k,ptdeb);
+ Handle(IntPatch_RLine)::DownCast (slinj)->Replace(k,ptdeb);
}
ptdeb.SetParameter(paraml);
rline->AddVertex(ptdeb);
if(nbp < 3)
return;
- Handle(IntPatch_WLine)& WLine = (*((Handle(IntPatch_WLine)*)&Line));
+ Handle(IntPatch_WLine)& WLine = Handle(IntPatch_WLine)::DownCast (Line);
Standard_Integer ip = 0, iv = 0;
gp_Pnt aPnt;
IntPatch_Point thePnt;
return Standard_False;
}
- const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&theLine));
+ Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (theLine));
const Handle(IntSurf_LineOn2S)& aSLine = aWLine->Curve();
if(aSLine->NbPoints() <= 2)
for(Standard_Integer aNumOfLine1 = 1; aNumOfLine1 <= theSlin.Length(); aNumOfLine1++)
{
- const Handle(IntPatch_WLine)& aWLine1 = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine1));
+ Handle(IntPatch_WLine) aWLine1 (Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine1)));
if(aWLine1.IsNull())
{//We must have failed to join not-point-lines
Standard_Boolean hasBeenRemoved = Standard_False;
for(Standard_Integer aNumOfLine2 = aNumOfLine1 + 1; aNumOfLine2 <= theSlin.Length(); aNumOfLine2++)
{
- const Handle(IntPatch_WLine)& aWLine2 = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine2));
+ Handle(IntPatch_WLine) aWLine2 (Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine2)));
const Standard_Integer aNbPntsWL1 = aWLine1->NbPnts();
const Standard_Integer aNbPntsWL2 = aWLine2->NbPnts();
}
else//OffsetSurface
{
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&GS;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (GS);
const Handle(Geom_Surface) bs = gos->BasisSurface();
Handle(Geom_Curve) gcbs = bs->UIso(U);
GeomAdaptor_Curve gac(gcbs);
}
else//OffsetSurface
{
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&GS;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (GS);
const Handle(Geom_Surface) bs = gos->BasisSurface();
Handle(Geom_Curve) gcbs = bs->VIso(V);
GeomAdaptor_Curve gac(gcbs);
else if(!S1->IsVPeriodic() && !S1->IsVClosed()) {
if(T1 != GeomAbs_OffsetSurface) C1 = gs1->UIso(MS1[0]);
else {
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&gs1;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (gs1);
const Handle(Geom_Surface) bs = gos->BasisSurface();
C1 = bs->UIso(MS1[0]);
}
if(!S1->IsUPeriodic() && !S1->IsUClosed()) {
if(T1 != GeomAbs_OffsetSurface) C1 = gs1->VIso(MS1[1]);
else {
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&gs1;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (gs1);
const Handle(Geom_Surface) bs = gos->BasisSurface();
C1 = bs->VIso(MS1[1]);
}
else if(!S2->IsVPeriodic() && !S2->IsVClosed()) {
if(T2 != GeomAbs_OffsetSurface) C2 = gs2->UIso(MS2[0]);
else {
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&gs2;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (gs2);
const Handle(Geom_Surface) bs = gos->BasisSurface();
C2 = bs->UIso(MS2[0]);
}
if(!S2->IsUPeriodic() && !S2->IsUClosed()) {
if(T2 != GeomAbs_OffsetSurface) C2 = gs2->VIso(MS2[1]);
else {
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&gs2;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (gs2);
const Handle(Geom_Surface) bs = gos->BasisSurface();
C2 = bs->VIso(MS2[1]);
}
GeomProjLib::ProjectOnPlane(C2,GPln,gp_Dir(DV),Standard_True);
if(C1Prj.IsNull() || C2Prj.IsNull()) return;
Handle(Geom2d_Curve) C1Prj2d =
- GeomProjLib::Curve2d(C1Prj,*(Handle(Geom_Surface) *)&GPln);
+ GeomProjLib::Curve2d(C1Prj,Handle(Geom_Surface)::DownCast (GPln));
Handle(Geom2d_Curve) C2Prj2d =
- GeomProjLib::Curve2d(C2Prj,*(Handle(Geom_Surface) *)&GPln);
+ GeomProjLib::Curve2d(C2Prj,Handle(Geom_Surface)::DownCast (GPln));
Geom2dAPI_InterCurveCurve ICC(C1Prj2d,C2Prj2d,1.0e-7);
if(ICC.NbPoints() > 0 )
{
if(T1 != GeomAbs_OffsetSurface){ visoS1 = gs1->VIso(VM1); uisoS1 = gs1->UIso(UM1); }
else
{
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&gs1;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (gs1);
const Handle(Geom_Surface) bs = gos->BasisSurface();
visoS1 = bs->VIso(VM1); uisoS1 = bs->UIso(UM1);
}
if(T2 != GeomAbs_OffsetSurface){ visoS2 = gs2->VIso(VM2); uisoS2 = gs2->UIso(UM2); }
else
{
- const Handle(Geom_OffsetSurface) gos = *(Handle(Geom_OffsetSurface)*)&gs2;
+ const Handle(Geom_OffsetSurface) gos = Handle(Geom_OffsetSurface)::DownCast (gs2);
const Handle(Geom_Surface) bs = gos->BasisSurface();
visoS2 = bs->VIso(VM2); uisoS2 = bs->UIso(UM2);
}
{
gp_Lin lin(sop.Value(ip),gp_Dir(v));
Handle(IntPatch_GLine) gl = new IntPatch_GLine(lin,Standard_False);
- slin.Append(*(Handle(IntPatch_Line) *)&gl);
+ slin.Append(Handle(IntPatch_Line)::DownCast (gl));
}
done = Standard_True;
{
gp_Lin lin(sop.Value(ip),gp_Dir(v));
Handle(IntPatch_GLine) gl = new IntPatch_GLine(lin,Standard_False);
- slin.Append(*(Handle(IntPatch_Line) *)&gl);
+ slin.Append(Handle(IntPatch_Line)::DownCast (gl));
}
done = Standard_True;
else if(IType == IntPatch_Restriction) {
nbr++;
Handle(IntPatch_RLine)& rlin =
- *((Handle(IntPatch_RLine) *)&line);
+ Handle(IntPatch_RLine)::DownCast (line);
if(rlin->IsArcOnS1()) nbr1++;
if(rlin->IsArcOnS2()) nbr2++;
}
const Handle(IntPatch_Line)& LineK = LineConstructor.Line(k);
if (LineK->ArcType() == IntPatch_Analytic) {
Handle(IntPatch_ALine)& alin =
- *((Handle(IntPatch_ALine) *)&LineK);
+ Handle(IntPatch_ALine)::DownCast (LineK);
nbvtx=alin->NbVertex();
nbva+=nbvtx; nba++;
for(v=1;v<=nbvtx;v++) {
}
else if (LineK->ArcType() == IntPatch_Restriction) {
Handle(IntPatch_RLine)& rlin =
- *((Handle(IntPatch_RLine) *)&LineK);
+ Handle(IntPatch_RLine)::DownCast (LineK);
nbvtx=rlin->NbVertex();
nbvr+=nbvtx; nbr++;
for(v=1;v<=nbvtx;v++) {
}
else if (LineK->ArcType() == IntPatch_Walking) {
Handle(IntPatch_WLine)& wlin =
- *((Handle(IntPatch_WLine) *)&LineK);
+ Handle(IntPatch_WLine)::DownCast (LineK);
nbvtx=wlin->NbVertex();
nbvw+=nbvtx; nbw++;
for(v=1;v<=nbvtx;v++) {
}
else {
Handle(IntPatch_GLine)& glin =
- *((Handle(IntPatch_GLine) *)&LineK);
+ Handle(IntPatch_GLine)::DownCast (LineK);
nbvtx=glin->NbVertex();
nbvg+=nbvtx; nbg++;
for(v=1;v<=nbvtx;v++) {
switch (typl) {
case IntPatch_Analytic:
{
- Handle(IntPatch_ALine)& alin = *((Handle(IntPatch_ALine) *)&L);
+ Handle(IntPatch_ALine)& alin = Handle(IntPatch_ALine)::DownCast (L);
if (alin->HasFirstPoint()) {
firstp = alin->FirstPoint().ParameterOnLine();
}
case IntPatch_Restriction:
{
- Handle(IntPatch_RLine)& rlin = *((Handle(IntPatch_RLine) *)&L);
+ Handle(IntPatch_RLine)& rlin = Handle(IntPatch_RLine)::DownCast (L);
if (rlin->HasFirstPoint()) {
firstp = rlin->FirstPoint().ParameterOnLine();
}
case IntPatch_Walking:
{
- Handle(IntPatch_WLine)& wlin = *((Handle(IntPatch_WLine) *) &L);
+ Handle(IntPatch_WLine)& wlin = Handle(IntPatch_WLine)::DownCast (L);
if (wlin->HasFirstPoint()) {
firstp = wlin->FirstPoint().ParameterOnLine();
}
default:
{
- Handle(IntPatch_GLine)& glin = *((Handle(IntPatch_GLine) *)&L);
+ Handle(IntPatch_GLine)& glin = Handle(IntPatch_GLine)::DownCast (L);
if (glin->HasFirstPoint()) {
firstp = glin->FirstPoint().ParameterOnLine();
}
switch (typl) {
case IntPatch_Analytic:
{
- Handle(IntPatch_ALine)& alin = *((Handle(IntPatch_ALine) *)&L);
+ Handle(IntPatch_ALine)& alin = Handle(IntPatch_ALine)::DownCast (L);
if (alin->HasLastPoint()) {
lastp = alin->LastPoint().ParameterOnLine();
case IntPatch_Restriction:
{
- Handle(IntPatch_RLine)& rlin = *((Handle(IntPatch_RLine) *)&L);
+ Handle(IntPatch_RLine)& rlin = Handle(IntPatch_RLine)::DownCast (L);
if (rlin->HasLastPoint()) {
lastp = rlin->LastPoint().ParameterOnLine();
}
case IntPatch_Walking:
{
- Handle(IntPatch_WLine)& wlin = *((Handle(IntPatch_WLine) *)&L);
+ Handle(IntPatch_WLine)& wlin = Handle(IntPatch_WLine)::DownCast (L);
if (wlin->HasLastPoint()) {
lastp = wlin->LastPoint().ParameterOnLine();
default:
{
- Handle(IntPatch_GLine)& glin = *((Handle(IntPatch_GLine) *)&L);
+ Handle(IntPatch_GLine)& glin = Handle(IntPatch_GLine)::DownCast (L);
if (glin->HasLastPoint()) {
lastp = glin->LastPoint().ParameterOnLine();
IntPatch_IType typl = L->ArcType();
switch (typl) {
case IntPatch_Analytic: {
- Handle(IntPatch_ALine)& ALine = *((Handle(IntPatch_ALine) *)&L);
+ Handle(IntPatch_ALine)& ALine = Handle(IntPatch_ALine)::DownCast (L);
Handle(IntPatch_ALine) alig;
if(L->TransitionOnS1() == IntSurf_Undecided)
alig = new IntPatch_ALine(ALine->Curve(),L->IsTangent());
break;
}
case IntPatch_Walking: { //-- ****************************************
- Handle(IntPatch_WLine)& WLine = *((Handle(IntPatch_WLine) *)&L);
+ Handle(IntPatch_WLine)& WLine = Handle(IntPatch_WLine)::DownCast (L);
const Handle(IntSurf_LineOn2S)& Lori = WLine->Curve();
Handle(IntSurf_LineOn2S) LineOn2S = new IntSurf_LineOn2S();
Standard_Integer ParamMinOnLine = (Standard_Integer) WLine->Vertex(i).ParameterOnLine();
break;
}
case IntPatch_Restriction: {
- Handle(IntPatch_RLine)& RLine = *((Handle(IntPatch_RLine) *)&L);
+ Handle(IntPatch_RLine)& RLine = Handle(IntPatch_RLine)::DownCast (L);
IndexLastVertex=2;
IndexFirstVertex=1;
Handle(IntPatch_RLine) rlig;
case IntPatch_Hyperbola:
case IntPatch_Circle:
case IntPatch_Ellipse: {
- Handle(IntPatch_GLine)& GLine = *((Handle(IntPatch_GLine) *)&L);
+ Handle(IntPatch_GLine)& GLine = Handle(IntPatch_GLine)::DownCast (L);
Handle(IntPatch_GLine) glig;
switch (typl) {
case IntPatch_Lin:
if(typl == IntPatch_Analytic) {
Standard_Real u1,v1,u2,v2;
Handle(IntPatch_ALine)& ALine
- = *((Handle(IntPatch_ALine) *)&L);
+ = Handle(IntPatch_ALine)::DownCast (L);
slin.Clear();
nbvtx = ALine->NbVertex();
//-- -------------------------------------------------------------------
else if(typl == IntPatch_Walking) {
Standard_Real u1,v1,u2,v2;
Handle(IntPatch_WLine)& WLine
- = *((Handle(IntPatch_WLine) *)&L);
+ = Handle(IntPatch_WLine)::DownCast (L);
slin.Clear();
nbvtx = WLine->NbVertex();
//-- -------------------------------------------------------------------
else if (typl != IntPatch_Restriction) { // JAG 01.07.96
Standard_Real u1,v1,u2,v2;
Handle(IntPatch_GLine)& GLine
- = *((Handle(IntPatch_GLine) *)&L);
+ = Handle(IntPatch_GLine)::DownCast (L);
slin.Clear();
nbvtx = GLine->NbVertex();
//-- -------------------------------------------------------------------
}
else { //-- Restriction
Handle(IntPatch_RLine)& RLine
- = *((Handle(IntPatch_RLine) *)&L);
+ = Handle(IntPatch_RLine)::DownCast (L);
slin.Clear();
Standard_Integer NbVtx = RLine->NbVertex();
Standard_Boolean RestOnS1 = RLine->IsArcOnS1();
IntPatch_IType aType = aSLine->ArcType();
if( aType != IntPatch_Walking)
continue;
- const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
+ Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tnbV = aWLine->NbVertex();
Standard_Integer tiV;
for( tiV = 1; tiV <= tnbV; tiV++ ) {
if( VDMin != 0 ) {
const Handle(IntPatch_Line)& aSLine = SLin.Value(WLDMin);
- const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
+ Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tiVpar = (Standard_Integer)aWLine->Vertex(VDMin).ParameterOnLine();
Standard_Integer ciVpar = (Standard_Integer)wline->Vertex(ciV).ParameterOnLine();
Standard_Real u11 = 0., u12 = 0., v11 = 0., v12 = 0.;
IntPatch_IType aType = aSLine->ArcType();
if( aType != IntPatch_Walking)
continue;
- const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
+ Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tnbV = aWLine->NbVertex();
Standard_Integer tiV;
for( tiV = 1; tiV <= tnbV; tiV++ )
if( VDMin != 0 )
{
const Handle(IntPatch_Line)& aSLine = SLin.Value(WLDMin);
- const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
+ Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tiVpar = (Standard_Integer)aWLine->Vertex(VDMin).ParameterOnLine();
Standard_Integer ciVpar = (Standard_Integer)wline->Vertex(ciV).ParameterOnLine();
Standard_Real u11 = 0., u12 = 0., v11 = 0., v12 = 0.;
// Dans le cas d une ligne de cheminement, il faudrait voir la projection
// et le calcul de la tangente.
- const Handle(IntPatch_RLine)& rlin = (*((Handle(IntPatch_RLine)*)&L)); //-- aucune verification n est
- const Handle(IntPatch_WLine)& wlin = (*((Handle(IntPatch_WLine)*)&L)); //-- faite au cast.
+ Handle(IntPatch_RLine) rlin (Handle(IntPatch_RLine)::DownCast (L)); //-- aucune verification n est
+ Handle(IntPatch_WLine) wlin (Handle(IntPatch_WLine)::DownCast (L)); //-- faite au cast.
gp_Pnt ptbid;
gp_Vec d1u,d1v;
gp_Pnt2d p2d;
Standard_Integer i,j,k;
TColgp_SequenceOfPnt locpt;
TColgp_SequenceOfPnt2d locpt2;
- const Handle(IntPatch_RLine)& rlin = (*((Handle(IntPatch_RLine)*)&L)); //-- aucune verification n est
- const Handle(IntPatch_WLine)& wlin = (*((Handle(IntPatch_WLine)*)&L)); //-- faite au cast.
+ Handle(IntPatch_RLine) rlin (Handle(IntPatch_RLine)::DownCast (L)); //-- aucune verification n est
+ Handle(IntPatch_WLine) wlin (Handle(IntPatch_WLine)::DownCast (L)); //-- faite au cast.
Standard_Integer Nbvtx =0;
Standard_Integer Nbptlin =0;
Standard_Real tolPLin = Surf->UResolution(Precision::Confusion());
//
switch (aCurveType) {
case GeomAbs_Circle :
- aResCoeff = 1. / (2 * (*((Handle(Geom_Circle)*)&aCurve))->Circ().Radius());
+ aResCoeff = 1. / (2 * Handle(Geom_Circle)::DownCast (aCurve)->Circ().Radius());
break;
case GeomAbs_Ellipse :
- aResCoeff = 1. / (*((Handle(Geom_Ellipse)*)&aCurve))->MajorRadius();
+ aResCoeff = 1. / Handle(Geom_Ellipse)::DownCast (aCurve)->MajorRadius();
break;
case GeomAbs_Hyperbola :
case GeomAbs_Parabola :
break;
}
case GeomAbs_BezierCurve:
- (*((Handle(Geom_BezierCurve)*)&theCurve))->Resolution(theR3D, aRes);
+ Handle(Geom_BezierCurve)::DownCast (theCurve)->Resolution(theR3D, aRes);
break;
case GeomAbs_BSplineCurve:
- (*((Handle(Geom_BSplineCurve)*)&theCurve))->Resolution(theR3D, aRes);
+ Handle(Geom_BSplineCurve)::DownCast (theCurve)->Resolution(theR3D, aRes);
break;
default:
aRes = theResCoeff * theR3D;
//
const IntTools_Curve& aIC=mySeqOfCurve(1);
const Handle(Geom_Curve)& aC3D=aIC.Curve();
- const Handle(Geom_BSplineCurve)& aBS=
- Handle(Geom_BSplineCurve)::DownCast(aC3D);
+ Handle(Geom_BSplineCurve) aBS (Handle(Geom_BSplineCurve)::DownCast(aC3D));
if (aBS.IsNull()) {
return;
}
if(typl==IntPatch_Walking) {
Handle(IntPatch_Line) anewL;
//
- const Handle(IntPatch_WLine)& aWLine=
- Handle(IntPatch_WLine)::DownCast(L);
+ Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast(L));
//DumpWLine(aWLine);
anewL = ComputePurgedWLine(aWLine);
}
L = anewL;
- //const Handle(IntPatch_WLine)& aWLineX = Handle(IntPatch_WLine)::DownCast(L);
+ //Handle(IntPatch_WLine) aWLineX (Handle(IntPatch_WLine)::DownCast(L));
//DumpWLine(aWLineX);
//
Cf = BRep_Tool::Curve(edgf,Loc,ff,lf);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GGf = Cf->Transformed(Loc.Transformation());
- Cf = *((Handle(Geom_Curve)*)&GGf);
+ Cf = Handle(Geom_Curve)::DownCast (GGf);
}
Tf = Cf->DynamicType();
if (Tf == STANDARD_TYPE(Geom_TrimmedCurve)) {
- Cf = (*((Handle(Geom_TrimmedCurve)*)&Cf))->BasisCurve();
+ Cf = Handle(Geom_TrimmedCurve)::DownCast (Cf)->BasisCurve();
Tf = Cf->DynamicType();
}
if (Tf != STANDARD_TYPE(Geom_Line) && Tf != STANDARD_TYPE(Geom_Circle) &&
Ct = BRep_Tool::Curve(edgt,Loc,ft,lt);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GGt = Ct->Transformed(Loc.Transformation());
- Ct = *((Handle(Geom_Curve)*)&GGt);
+ Ct = Handle(Geom_Curve)::DownCast (GGt);
}
Tt = Ct->DynamicType();
if (Tt == STANDARD_TYPE(Geom_TrimmedCurve)) {
- Ct = (*((Handle(Geom_TrimmedCurve)*)&Ct))->BasisCurve();
+ Ct = Handle(Geom_TrimmedCurve)::DownCast (Ct)->BasisCurve();
Tt = Ct->DynamicType();
}
if (Tt != Tf) {
// On a presomption de confusion
Standard_Real Tol = Precision::Confusion();
if (Tt == STANDARD_TYPE(Geom_Line)) {
- gp_Lin lif = (*((Handle(Geom_Line)*)&Cf))->Lin();
- gp_Lin lit = (*((Handle(Geom_Line)*)&Ct))->Lin();
+ gp_Lin lif = Handle(Geom_Line)::DownCast (Cf)->Lin();
+ gp_Lin lit = Handle(Geom_Line)::DownCast (Ct)->Lin();
gp_Pnt p1 = ElCLib::Value(ff,lif);
gp_Pnt p2 = ElCLib::Value(lf,lif);
Standard_Real prm1 = ElCLib::Parameter(lit,p1);
}
}
else if (Tt == STANDARD_TYPE(Geom_Circle)) {
- gp_Circ cif = (*((Handle(Geom_Circle)*)&Cf))->Circ();
- gp_Circ cit = (*((Handle(Geom_Circle)*)&Ct))->Circ();
+ gp_Circ cif = Handle(Geom_Circle)::DownCast (Cf)->Circ();
+ gp_Circ cit = Handle(Geom_Circle)::DownCast (Ct)->Circ();
if (Abs(cif.Radius()-cit.Radius()) <= Tol &&
cif.Location().SquareDistance(cit.Location()) <= Tol*Tol) {
// Point debut, calage dans periode, et detection meme sens
}
}
else if (Tt == STANDARD_TYPE(Geom_Ellipse)) {
- gp_Elips cif = (*((Handle(Geom_Ellipse)*)&Cf))->Elips();
- gp_Elips cit = (*((Handle(Geom_Ellipse)*)&Ct))->Elips();
+ gp_Elips cif = Handle(Geom_Ellipse)::DownCast (Cf)->Elips();
+ gp_Elips cit = Handle(Geom_Ellipse)::DownCast (Ct)->Elips();
if (Abs(cif.MajorRadius()-cit.MajorRadius()) <= Tol &&
}
}
else if (Tt == STANDARD_TYPE(Geom_BSplineCurve)) {
- Handle(Geom_BSplineCurve) Bf = *((Handle(Geom_BSplineCurve)*)&Cf);
- Handle(Geom_BSplineCurve) Bt = *((Handle(Geom_BSplineCurve)*)&Ct);
+ Handle(Geom_BSplineCurve) Bf = Handle(Geom_BSplineCurve)::DownCast (Cf);
+ Handle(Geom_BSplineCurve) Bt = Handle(Geom_BSplineCurve)::DownCast (Ct);
Standard_Boolean IsSame = Standard_True;
}
}
else if (Tt == STANDARD_TYPE(Geom_BezierCurve)) {
- Handle(Geom_BezierCurve) Bf = *((Handle(Geom_BezierCurve)*)&Cf);
- Handle(Geom_BezierCurve) Bt = *((Handle(Geom_BezierCurve)*)&Ct);
+ Handle(Geom_BezierCurve) Bf = Handle(Geom_BezierCurve)::DownCast (Cf);
+ Handle(Geom_BezierCurve) Bt = Handle(Geom_BezierCurve)::DownCast (Ct);
Standard_Boolean IsSame = Standard_True;
newface.Orientation(TopAbs_FORWARD);
S = BRep_Tool::Surface(fac);
if (S->DynamicType()== STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S = (*((Handle(Geom_RectangularTrimmedSurface)*)&S))->BasisSurface();
+ S = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
}
P = Handle(Geom_Plane)::DownCast(S);
TopoDS_Wire wir;
C = BRep_Tool::Curve(edg,loc,f,l);
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
if (C->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
}
Handle(Geom2d_Curve) C2d = GeomProjLib::Curve2d(C,f,l,S,tol);
C = BRep_Tool::Curve(newedg,loc,f,l);
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
if (C->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
}
if (P.IsNull()) { // on met les courbes 2d si on n`est pas
// sur un plan
C = BRep_Tool::Curve(edgbis,loc,f,l);
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
if (C->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
}
prmvt =
BRep_Tool::Parameter(TopoDS::Vertex(it1.Value()),edgbis);
C = BRep_Tool::Curve(edg,loc,f,l);
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
if (C->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
}
C2d = GeomProjLib::Curve2d(C,f,l,S,tol);
typS2 = S2->DynamicType();
if (typS1 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S1 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S1))->BasisSurface();
+ S1 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S1)->BasisSurface();
typS1 = S1->DynamicType();
}
if (typS2 == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- S2 = (*((Handle(Geom_RectangularTrimmedSurface)*)&S2))->BasisSurface();
+ S2 = Handle(Geom_RectangularTrimmedSurface)::DownCast (S2)->BasisSurface();
typS2 = S2->DynamicType();
}
Standard_Boolean ValRet = Standard_False;
if (typS1 == STANDARD_TYPE(Geom_Plane)) {
- gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln());
- gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln());
+ gp_Pln pl1( Handle(Geom_Plane)::DownCast (S1)->Pln());
+ gp_Pln pl2( Handle(Geom_Plane)::DownCast (S2)->Pln());
pl1.Transform(loc1.Transformation());
pl2.Transform(loc2.Transformation());
C1 = BRep_Tool::Curve(E1,loc1,f,l);
if (!loc1.IsIdentity()) {
Handle(Geom_Geometry) CC1 = C1->Transformed(loc1.Transformation());
- C1 = *((Handle(Geom_Curve)*)&CC1);
+ C1 = Handle(Geom_Curve)::DownCast (CC1);
}
C2 = BRep_Tool::Curve(E2,loc2,f,l);
if (!loc2.IsIdentity()) {
Handle(Geom_Geometry) CC2 = C2->Transformed(loc2.Transformation());
- C2 = *((Handle(Geom_Curve)*)&CC2);
+ C2 = Handle(Geom_Curve)::DownCast (CC2);
}
typC1 = C1->DynamicType();
typC2 = C2->DynamicType();
if (typC1 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C1 = (*((Handle(Geom_TrimmedCurve)*)&C1))->BasisCurve();
+ C1 = Handle(Geom_TrimmedCurve)::DownCast (C1)->BasisCurve();
typC1 = C1->DynamicType();
}
if (typC2 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C2 = (*((Handle(Geom_TrimmedCurve)*)&C2))->BasisCurve();
+ C2 = Handle(Geom_TrimmedCurve)::DownCast (C2)->BasisCurve();
typC2 = C2->DynamicType();
}
Standard_Boolean ValRet = Standard_False;
if (typC1 == STANDARD_TYPE(Geom_Line)) {
- gp_Lin li1( (*((Handle(Geom_Line)*)&C1))->Lin());
- gp_Lin li2( (*((Handle(Geom_Line)*)&C2))->Lin());
+ gp_Lin li1( Handle(Geom_Line)::DownCast (C1)->Lin());
+ gp_Lin li2( Handle(Geom_Line)::DownCast (C2)->Lin());
if (li1.Position().IsCoaxial(li2.Position(),tolang,tollin)) {
ValRet = Standard_True;
C = BRep_Tool::Curve(Edg,loc,f,l);
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
typC = C->DynamicType();
if (typC == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
typC = C->DynamicType();
}
if (typC == STANDARD_TYPE(Geom_Line)) {
- return ElCLib::Parameter( (*((Handle(Geom_Line)*)&C))->Lin(),P);
+ return ElCLib::Parameter( Handle(Geom_Line)::DownCast (C)->Lin(),P);
}
else if (typC == STANDARD_TYPE(Geom_Circle)) {
Standard_Real prm = ElCLib::Parameter
- ( (*((Handle(Geom_Circle)*)&C))->Circ(),P);
+ ( Handle(Geom_Circle)::DownCast (C)->Circ(),P);
// Vtx vient d`une exploration de Edg orientee FORWARD
TopAbs_Orientation orient = TopAbs::Reverse(Vtx.Orientation());
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
gp_Pnt Pt(C->Value((f+l)/2.));
C = BRep_Tool::Curve(edg,Loc,f,l);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
proj.Init(Pt,C,f,l);
if (proj.NbPoints() > 0) {
C = BRep_Tool::Curve(theEdge,Loc,f,l);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
proj.Init(toproj,C,f,l);
/*
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
*/
proj.Init(p2d, PC, f, l);
Handle(Geom_Curve) C = BRep_Tool::Curve(Edg,Loc,f,l);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
if (C->DynamicType() != STANDARD_TYPE(Geom_TrimmedCurve)) {
C = BRep_Tool::Curve(Efrom,Loc,f,l);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
if (C->DynamicType() != STANDARD_TYPE(Geom_TrimmedCurve)) {
C = BRep_Tool::Curve(Efrom,Loc,f,l);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
gp_Pnt pt;
C = BRep_Tool::Curve(Eto,Loc,f,l);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
C->D1(prmproj,pt,d1t);
C = BRep_Tool::Curve(Efrom,Loc,f,l);
if (!Loc.IsIdentity()) {
Handle(Geom_Geometry) GG = C->Transformed(Loc.Transformation());
- C = *((Handle(Geom_Curve)*)&GG);
+ C = Handle(Geom_Curve)::DownCast (GG);
}
if (C->DynamicType() != STANDARD_TYPE(Geom_TrimmedCurve)) {
Standard_NoSuchObject::Raise(aMsg);
}
Handle(Standard_Transient) t = Plugin::Load(UTL::GUID(UTL::Value(r,aSchemaName)));
- return *((Handle(Storage_Schema)*)&t);
+ return Handle(Storage_Schema)::DownCast (t);
}
Standard_Failure::Raise(aMsg);
}
Handle(Standard_Persistent) theObject=theDocument->Object();
- Handle(PCDM_Document) thePDocument = *((Handle(PCDM_Document)*)&theObject);
+ Handle(PCDM_Document) thePDocument = Handle(PCDM_Document)::DownCast (theObject);
{
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));
const Handle(Graphic3d_Structure)& theStructToFill)
{
theStructToFill->Clear();
- const Handle(Prs3d_Presentation)& aPrs = *((Handle(Prs3d_Presentation)* )&theStructToFill);
+ Handle(Prs3d_Presentation) aPrs (Handle(Prs3d_Presentation)::DownCast (theStructToFill));
myPresentableObject->Compute (Projector (theProjector), aPrs);
}
const Handle(Graphic3d_Structure)& theStructToFill)
{
// recompute HLR after transformation in all the case
- Handle(Prs3d_Presentation) aPrs = *((Handle(Prs3d_Presentation)*)&theStructToFill);
+ Handle(Prs3d_Presentation) aPrs = Handle(Prs3d_Presentation)::DownCast (theStructToFill);
theStructToFill->Clear();
myPresentableObject->Compute (Projector (theProjector), theTrsf, aPrs);
}
//=======================================================================
Handle(Prs3d_Projector) PrsMgr_Presentation::Projector (const Handle(Graphic3d_DataStructureManager)& theProjector)
{
- const Handle(Graphic3d_Camera)& aCamera = Handle(Visual3d_View)::DownCast (theProjector)->Camera();
+ Handle(Graphic3d_Camera) aCamera (Handle(Visual3d_View)::DownCast (theProjector)->Camera());
const gp_Dir aDir = aCamera->Direction().Reversed();
const gp_Pnt anAt = aCamera->Center();
const gp_Dir anUp = aCamera->Up();
// un AIS_PlaneTrihedron
if (aShape->Type()==AIS_KOI_Datum && aShape->Signature()==4) {
// On downcast aShape de AIS_InteractiveObject a AIS_PlaneTrihedron
- theAISPlaneTri = *(Handle(AIS_PlaneTrihedron)*) &aShape;
+ theAISPlaneTri = Handle(AIS_PlaneTrihedron)::DownCast (aShape);
theAISPlaneTri->SetLength(Length);
// un AIS_PlaneTrihedron
if (aShape->Type()==AIS_KOI_Datum && aShape->Signature()==4) {
// On downcast aShape de AIS_InteractiveObject a AIS_PlaneTrihedron
- theAISPlaneTri = *(Handle(AIS_PlaneTrihedron)*) &aShape;
+ theAISPlaneTri = Handle(AIS_PlaneTrihedron)::DownCast (aShape);
theAISPlaneTri->SetXLabel(Xlabel);
theAISPlaneTri->SetYLabel(Ylabel);
#include <Interface_Macros.hxx>
//#define DeclareAndCast(atype,result,start) \ NON car Name
-// Handle(atype) result = *((Handle(atype)*) &start)
+// Handle(atype) result = Handle(atype)::DownCast (start)
#include <Interface_GeneralLib.hxx>
#include <Interface_Category.hxx>
#define DeclareAndCast(atype,result,start) \
-Handle(atype) result = *((Handle(atype)*) &start)
+Handle(atype) result = Handle(atype)::DownCast (start)
#include <StepBasic_Address.hxx>
#include <StepShape_AdvancedBrepShapeRepresentation.hxx>
{
for (TColStd_MapIteratorOfMapOfTransient aSelectorIter (mySelectors); aSelectorIter.More(); aSelectorIter.Next())
{
- const Handle(SelectMgr_ViewerSelector)& aSelector = Handle(SelectMgr_ViewerSelector)::DownCast (aSelectorIter.Key());
+ Handle(SelectMgr_ViewerSelector) aSelector (Handle(SelectMgr_ViewerSelector)::DownCast (aSelectorIter.Key()));
if (aSelector->Status (aSelection) == SelectMgr_SOS_Activated)
return Standard_True;
}
for (TColStd_MapIteratorOfMapOfTransient aSelectorIter (mySelectors); aSelectorIter.More(); aSelectorIter.Next())
{
- const Handle(SelectMgr_ViewerSelector)& aCurSelector = Handle(SelectMgr_ViewerSelector)::DownCast (aSelectorIter.Key());
+ Handle(SelectMgr_ViewerSelector) aCurSelector (Handle(SelectMgr_ViewerSelector)::DownCast (aSelectorIter.Key()));
if (aCurSelector->Status (aSelection) == SelectMgr_SOS_Activated)
{
ClearSelectionStructures (theObject, aSelMode, aCurSelector);
for (TColStd_MapIteratorOfMapOfTransient aSelectorIter (mySelectors); aSelectorIter.More(); aSelectorIter.Next())
{
- const Handle(SelectMgr_ViewerSelector)& aSelector = Handle(SelectMgr_ViewerSelector)::DownCast (aSelectorIter.Key());
+ Handle(SelectMgr_ViewerSelector) aSelector (Handle(SelectMgr_ViewerSelector)::DownCast (aSelectorIter.Key()));
Update (theObject, aSelector, Standard_False);
}
}
{
const Handle(SelectBasics_SensitiveEntity)& aBasicEntity =
GetSensitiveById (theIndex)->BaseSensitive();
- const Handle(Select3D_SensitiveEntity)& aSensitive =
- Handle(Select3D_SensitiveEntity)::DownCast (aBasicEntity);
+ Handle(Select3D_SensitiveEntity) aSensitive (Handle(Select3D_SensitiveEntity)::DownCast (aBasicEntity));
const gp_Pnt aCenter = aSensitive->CenterOfGeometry();
Standard_Real aCenterCoord = 0.0;
aCenterCoord = theAxis == 0 ? aCenter.X() :
const Standard_Integer theEntityIdx,
SelectMgr_SelectingVolumeManager& theMgr)
{
- const Handle(SelectMgr_EntityOwner)& anOwner =
- Handle(SelectMgr_EntityOwner)::DownCast (theEntity->OwnerId());
+ Handle(SelectMgr_EntityOwner) anOwner (Handle(SelectMgr_EntityOwner)::DownCast (theEntity->OwnerId()));
SelectBasics_PickResult aPickResult;
if (theEntity->Matches (theMgr, aPickResult))
{
Standard_Integer RankInMap = myIndexes->Value (myCurRank);
const Handle(SelectBasics_EntityOwner)& toto = mystored.FindKey(RankInMap);
- Handle(SelectMgr_EntityOwner) Ownr = *((Handle(SelectMgr_EntityOwner)*) &toto);
+ Handle(SelectMgr_EntityOwner) Ownr = Handle(SelectMgr_EntityOwner)::DownCast (toto);
return Ownr;
}
if(More()){
Standard_Integer RankInMap = myIndexes->Value (myIndexes->Lower());
const Handle(SelectBasics_EntityOwner)& toto = mystored.FindKey(RankInMap);
- Handle(SelectMgr_EntityOwner) Ownr = *((Handle(SelectMgr_EntityOwner)*) &toto);
+ Handle(SelectMgr_EntityOwner) Ownr = Handle(SelectMgr_EntityOwner)::DownCast (toto);
return Ownr;
}
seq.Append(curve->Value(M_PI));
} else if ( curve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
//DeclareAndCast(Geom_TrimmedCurve, Trimmed, curve);
- Handle(Geom_TrimmedCurve) Trimmed = *((Handle(Geom_TrimmedCurve) *) &curve);
+ Handle(Geom_TrimmedCurve) Trimmed = Handle(Geom_TrimmedCurve)::DownCast (curve);
// AppendControlPoles(seq,Trimmed->BasisCurve());
Handle(Geom_Curve) aBaseCrv = Trimmed->BasisCurve();
Standard_Boolean done = Standard_False;
}
} else if ( curve->IsKind(STANDARD_TYPE(Geom_OffsetCurve))) {
//DeclareAndCast(Geom_OffsetCurve, OffsetC, curve);
- Handle(Geom_OffsetCurve) OffsetC = *((Handle(Geom_OffsetCurve) *) &curve);
+ Handle(Geom_OffsetCurve) OffsetC = Handle(Geom_OffsetCurve)::DownCast (curve);
// AppendControlPoles(seq,OffsetC->BasisCurve());
seq.Append(curve->Value(curve->FirstParameter()));
seq.Append(curve->Value((curve->FirstParameter() + curve->LastParameter())/2.));
seq.Append(curve->Value(curve->LastParameter()));
} else if ( curve->IsKind(STANDARD_TYPE(Geom_BSplineCurve))) {
//DeclareAndCast(Geom_BSplineCurve, BSpline, curve);
- Handle(Geom_BSplineCurve) BSpline = *((Handle(Geom_BSplineCurve) *) &curve);
+ Handle(Geom_BSplineCurve) BSpline = Handle(Geom_BSplineCurve)::DownCast (curve);
TColgp_Array1OfPnt Poles(1,BSpline->NbPoles());
BSpline->Poles(Poles);
for(Standard_Integer i = 1; i <= BSpline->NbPoles(); i++)
} else if ( curve->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
//DeclareAndCast(Geom_BezierCurve, Bezier, curve);
//Handle(Geom_BezierCurve) Bezier = Handle(Geom_BezierCurve)::DownCast(curve);
- Handle(Geom_BezierCurve) Bezier = *((Handle(Geom_BezierCurve) *) &curve);
+ Handle(Geom_BezierCurve) Bezier = Handle(Geom_BezierCurve)::DownCast (curve);
TColgp_Array1OfPnt Poles(1,Bezier->NbPoles());
Bezier->Poles(Poles);
for(Standard_Integer i = 1; i <= Bezier->NbPoles(); i++)
if (curve->IsKind(STANDARD_TYPE(Geom_Line))) {
//DeclareAndCast(Geom_Line, Line, curve);
- Handle(Geom_Line) Line = *((Handle(Geom_Line) *) &curve);
+ Handle(Geom_Line) Line = Handle(Geom_Line)::DownCast (curve);
gp_XYZ N1 = Line->Position().Direction().XYZ();
if (noNorm) {
Normal = GetAnyNormal(N1);
if (curve->IsKind(STANDARD_TYPE(Geom_Conic))) {
//DeclareAndCast(Geom_Conic, Conic, curve);
- Handle(Geom_Conic) Conic = *((Handle(Geom_Conic) *) &curve);
+ Handle(Geom_Conic) Conic = Handle(Geom_Conic)::DownCast (curve);
gp_XYZ N1 = Conic->Axis().Direction().XYZ();
if (noNorm) {
Normal = N1;
if (curve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
//DeclareAndCast(Geom_TrimmedCurve, Trimmed, curve);
- Handle(Geom_TrimmedCurve) Trimmed = *((Handle(Geom_TrimmedCurve) *) &curve);
+ Handle(Geom_TrimmedCurve) Trimmed = Handle(Geom_TrimmedCurve)::DownCast (curve);
return IsPlanar(Trimmed->BasisCurve(),Normal,precision);
}
if (curve->IsKind(STANDARD_TYPE(Geom_OffsetCurve))) {
//DeclareAndCast(Geom_OffsetCurve, OffsetC, curve);
- Handle(Geom_OffsetCurve) OffsetC = *((Handle(Geom_OffsetCurve) *) &curve);
+ Handle(Geom_OffsetCurve) OffsetC = Handle(Geom_OffsetCurve)::DownCast (curve);
return IsPlanar(OffsetC->BasisCurve(),Normal,precision);
}
if (curve->IsKind(STANDARD_TYPE(Geom_BSplineCurve))) {
//DeclareAndCast(Geom_BSplineCurve, BSpline, curve);
- Handle(Geom_BSplineCurve) BSpline = *((Handle(Geom_BSplineCurve) *) &curve);
+ Handle(Geom_BSplineCurve) BSpline = Handle(Geom_BSplineCurve)::DownCast (curve);
TColgp_Array1OfPnt Poles(1,BSpline->NbPoles());
BSpline->Poles(Poles);
return IsPlanar(Poles,Normal,precision);
if (curve->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
//DeclareAndCast(Geom_BezierCurve, Bezier, curve);
- Handle(Geom_BezierCurve) Bezier = *((Handle(Geom_BezierCurve) *) &curve);
+ Handle(Geom_BezierCurve) Bezier = Handle(Geom_BezierCurve)::DownCast (curve);
TColgp_Array1OfPnt Poles(1,Bezier->NbPoles());
Bezier->Poles(Poles);
return IsPlanar(Poles,Normal,precision);
if (curve->IsKind(STANDARD_TYPE(ShapeExtend_ComplexCurve))) {
//DeclareAndCast(ShapeExtend_ComplexCurve, Complex, curve);
- Handle(ShapeExtend_ComplexCurve) Complex = *((Handle(ShapeExtend_ComplexCurve) *) &curve);
+ Handle(ShapeExtend_ComplexCurve) Complex = Handle(ShapeExtend_ComplexCurve)::DownCast (curve);
TColgp_SequenceOfPnt sequence;
Standard_Integer i; // svv Jan11 2000 : porting on DEC
for (i = 1; i <= Complex->NbCurves(); i++)
if (aSensitive->IsInstance ("Select3D_SensitiveGroup"))
{
- const Handle(Select3D_SensitiveGroup)& aGroup = Handle(Select3D_SensitiveGroup)::DownCast (aSensitive);
+ Handle(Select3D_SensitiveGroup) aGroup (Handle(Select3D_SensitiveGroup)::DownCast (aSensitive));
const Select3D_EntitySequence& aSubEntities = aGroup->GetEntities();
for (Select3D_EntitySequenceIter aSubEntitiesIter (aSubEntities); aSubEntitiesIter.More(); aSubEntitiesIter.Next())
{
{
if (Handle(StdSelect_BRepOwner)::DownCast(EO).IsNull()) return Standard_False;
- const TopoDS_Shape& sh = ((Handle(StdSelect_BRepOwner)&)EO)->Shape();
+ const TopoDS_Shape& sh = Handle(StdSelect_BRepOwner)::DownCast (EO)->Shape();
if(sh.ShapeType()!= TopAbs_EDGE) return Standard_False;
switch(mytype){
IsOk(const Handle(SelectMgr_EntityOwner)& EO) const
{
if (Handle(StdSelect_BRepOwner)::DownCast(EO).IsNull()) return Standard_False;
- const TopoDS_Shape& anobj= ((Handle(StdSelect_BRepOwner)&)EO)->Shape();
+ const TopoDS_Shape& anobj= Handle(StdSelect_BRepOwner)::DownCast (EO)->Shape();
if(anobj.ShapeType()!= TopAbs_FACE)return Standard_False;
switch(mytype) {
case StdSelect_AnyFace:
//==========================================================
else if (Ent->DynamicType()==STANDARD_TYPE(Select3D_SensitiveTriangulation))
{
- const Handle(Poly_Triangulation)& PT =
- (*((Handle(Select3D_SensitiveTriangulation)*) &Ent))->Triangulation();
+ Handle(Poly_Triangulation) PT (Handle(Select3D_SensitiveTriangulation)::DownCast (Ent)->Triangulation());
const Poly_Array1OfTriangle& triangles = PT->Triangles();
const TColgp_Array1OfPnt& Nodes = PT->Nodes();
Standard_Integer n[3];
TopLoc_Location iloc, bidloc;
- if ((*((Handle(Select3D_SensitiveTriangulation)*) &Ent))->HasInitLocation())
- bidloc = (*((Handle(Select3D_SensitiveTriangulation)*) &Ent))->GetInitLocation();
+ if (Handle(Select3D_SensitiveTriangulation)::DownCast (Ent)->HasInitLocation())
+ bidloc = Handle(Select3D_SensitiveTriangulation)::DownCast (Ent)->GetInitLocation();
if (bidloc.IsIdentity())
iloc = theLoc;
if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve))) {
const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)
Bspli = Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)::DownCast(SC);
- return StepToGeom_MakeBSplineCurve::Convert(Bspli,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve::Convert(Bspli,Handle(Geom_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnots))) {
const Handle(StepGeom_BSplineCurveWithKnots)
Bspli = Handle(StepGeom_BSplineCurveWithKnots)::DownCast(SC);
- return StepToGeom_MakeBSplineCurve::Convert(Bspli,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve::Convert(Bspli,Handle(Geom_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_TrimmedCurve))) {
const Handle(StepGeom_TrimmedCurve) L = Handle(StepGeom_TrimmedCurve)::DownCast(SC);
- return StepToGeom_MakeTrimmedCurve::Convert(L,*((Handle(Geom_TrimmedCurve)*)&CC));
+ return StepToGeom_MakeTrimmedCurve::Convert(L,Handle(Geom_TrimmedCurve)::DownCast (CC));
}
// STEP BezierCurve, UniformCurve and QuasiUniformCurve are transformed into
// STEP BSplineCurve before being mapped onto CAS.CADE/SF
Knots->SetValue(2, 1.);
BSPL->SetKnotMultiplicities(Kmult);
BSPL->SetKnots(Knots);
- return StepToGeom_MakeBSplineCurve::Convert(BSPL,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve::Convert(BSPL,Handle(Geom_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_UniformCurve))) {
const Handle(StepGeom_UniformCurve) UC = Handle(StepGeom_UniformCurve)::DownCast(SC);
}
BSPL->SetKnotMultiplicities(Kmult);
BSPL->SetKnots(Knots);
- return StepToGeom_MakeBSplineCurve::Convert(BSPL,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve::Convert(BSPL,Handle(Geom_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformCurve))) {
const Handle(StepGeom_QuasiUniformCurve) QUC =
Kmult->SetValue(nbK, BSPL->Degree() + 1);
BSPL->SetKnotMultiplicities(Kmult);
BSPL->SetKnots(Knots);
- return StepToGeom_MakeBSplineCurve::Convert(BSPL,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve::Convert(BSPL,Handle(Geom_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_UniformCurveAndRationalBSplineCurve))) {
const Handle(StepGeom_UniformCurveAndRationalBSplineCurve) RUC =
RBSPL->Init(RUC->Name(), aDegree, RUC->ControlPointsList(), RUC->CurveForm(),
RUC->ClosedCurve(), RUC->SelfIntersect(), Kmult, Knots, StepGeom_ktUnspecified,
RUC->WeightsData());
- return StepToGeom_MakeBSplineCurve::Convert(RBSPL,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve::Convert(RBSPL,Handle(Geom_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformCurveAndRationalBSplineCurve))) {
const Handle(StepGeom_QuasiUniformCurveAndRationalBSplineCurve) RQUC =
RBSPL->Init(RQUC->Name(), aDegree, RQUC->ControlPointsList(), RQUC->CurveForm(),
RQUC->ClosedCurve(), RQUC->SelfIntersect(), Kmult, Knots, StepGeom_ktUnspecified,
RQUC->WeightsData());
- return StepToGeom_MakeBSplineCurve::Convert(RBSPL,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve::Convert(RBSPL,Handle(Geom_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Polyline))) { //:n6 abv 15 Feb 99
const Handle(StepGeom_Polyline) PL = Handle(StepGeom_Polyline)::DownCast (SC);
- return StepToGeom_MakePolyline::Convert(PL,*((Handle(Geom_BSplineCurve)*)&CC));
+ return StepToGeom_MakePolyline::Convert(PL,Handle(Geom_BSplineCurve)::DownCast (CC));
}
return Standard_False;
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve))) {
const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)
Bspli = Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)::DownCast(SC);
- return StepToGeom_MakeBSplineCurve2d::Convert(Bspli,*((Handle(Geom2d_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve2d::Convert(Bspli,Handle(Geom2d_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnots))) {
const Handle(StepGeom_BSplineCurveWithKnots)
Bspli = Handle(StepGeom_BSplineCurveWithKnots)::DownCast(SC);
- return StepToGeom_MakeBSplineCurve2d::Convert(Bspli,*((Handle(Geom2d_BSplineCurve)*)&CC));
+ return StepToGeom_MakeBSplineCurve2d::Convert(Bspli,Handle(Geom2d_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_TrimmedCurve))) {
const Handle(StepGeom_TrimmedCurve) TC = Handle(StepGeom_TrimmedCurve)::DownCast(SC);
- return StepToGeom_MakeTrimmedCurve2d::Convert(TC,*((Handle(Geom2d_BSplineCurve)*)&CC));
+ return StepToGeom_MakeTrimmedCurve2d::Convert(TC,Handle(Geom2d_BSplineCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Polyline))) { //:n6 abv 15 Feb 99
const Handle(StepGeom_Polyline) PL = Handle(StepGeom_Polyline)::DownCast(SC);
- return StepToGeom_MakePolyline2d::Convert(PL,*((Handle(Geom2d_BSplineCurve)*)&CC));
+ return StepToGeom_MakePolyline2d::Convert(PL,Handle(Geom2d_BSplineCurve)::DownCast (CC));
}
return Standard_False;
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface))) {
const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) BS =
Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)::DownCast(SS);
- return StepToGeom_MakeBSplineSurface::Convert(BS,*((Handle(Geom_BSplineSurface)*)&CS));
+ return StepToGeom_MakeBSplineSurface::Convert(BS,Handle(Geom_BSplineSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_BSplineSurfaceWithKnots))) {
const Handle(StepGeom_BSplineSurfaceWithKnots) BS
= Handle(StepGeom_BSplineSurfaceWithKnots)::DownCast(SS);
- return StepToGeom_MakeBSplineSurface::Convert(BS,*((Handle(Geom_BSplineSurface)*)&CS));
+ return StepToGeom_MakeBSplineSurface::Convert(BS,Handle(Geom_BSplineSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_RectangularTrimmedSurface))) {
const Handle(StepGeom_RectangularTrimmedSurface) Sur =
Handle(StepGeom_RectangularTrimmedSurface)::DownCast(SS);
- return StepToGeom_MakeRectangularTrimmedSurface::Convert(Sur,*((Handle(Geom_RectangularTrimmedSurface)*)&CS));
+ return StepToGeom_MakeRectangularTrimmedSurface::Convert(Sur,Handle(Geom_RectangularTrimmedSurface)::DownCast (CS));
}
// STEP BezierSurface, UniformSurface and QuasiUniformSurface are transformed
// into STEP BSplineSurface before being mapped onto CAS.CADE/SF
BSPL->SetVMultiplicities(VKmult);
BSPL->SetUKnots(UKnots);
BSPL->SetVKnots(VKnots);
- return StepToGeom_MakeBSplineSurface::Convert(BSPL,*((Handle(Geom_BSplineSurface)*)&CS));
+ return StepToGeom_MakeBSplineSurface::Convert(BSPL,Handle(Geom_BSplineSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_UniformSurface))) {
const Handle(StepGeom_UniformSurface) US = Handle(StepGeom_UniformSurface)::DownCast(SS);
}
BSPL->SetVMultiplicities(VKmult);
BSPL->SetVKnots(VKnots);
- return StepToGeom_MakeBSplineSurface::Convert(BSPL,*((Handle(Geom_BSplineSurface)*)&CS));
+ return StepToGeom_MakeBSplineSurface::Convert(BSPL,Handle(Geom_BSplineSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformSurface))) {
const Handle(StepGeom_QuasiUniformSurface) QUS =
VKmult->SetValue(nbKV, BSPL->VDegree() + 1);
BSPL->SetVMultiplicities(VKmult);
BSPL->SetVKnots(VKnots);
- return StepToGeom_MakeBSplineSurface::Convert(BSPL,*((Handle(Geom_BSplineSurface)*)&CS));
+ return StepToGeom_MakeBSplineSurface::Convert(BSPL,Handle(Geom_BSplineSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_UniformSurfaceAndRationalBSplineSurface))) {
const Handle(StepGeom_UniformSurfaceAndRationalBSplineSurface) RUS =
RUS->UClosed(), RUS->VClosed(), RUS->SelfIntersect(),
UKmult, VKmult, UKnots, VKnots, StepGeom_ktUnspecified,
RUS->WeightsData());
- return StepToGeom_MakeBSplineSurface::Convert(RBSPL,*((Handle(Geom_BSplineSurface)*)&CS));
+ return StepToGeom_MakeBSplineSurface::Convert(RBSPL,Handle(Geom_BSplineSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface))) {
const Handle(StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface) RQUS =
RQUS->SurfaceForm(), RQUS->UClosed(), RQUS->VClosed(),
RQUS->SelfIntersect(), UKmult, VKmult, UKnots, VKnots, StepGeom_ktUnspecified,
RQUS->WeightsData());
- return StepToGeom_MakeBSplineSurface::Convert(RBSPL,*((Handle(Geom_BSplineSurface)*)&CS));
+ return StepToGeom_MakeBSplineSurface::Convert(RBSPL,Handle(Geom_BSplineSurface)::DownCast (CS));
}
/* //:S4136: ass-tol2.stp #9861
// UPDATE FMA 15-03-96
{
if (SC->IsKind(STANDARD_TYPE(StepGeom_Circle))) {
const Handle(StepGeom_Circle) Cir = Handle(StepGeom_Circle)::DownCast(SC);
- return StepToGeom_MakeCircle::Convert(Cir,*((Handle(Geom_Circle)*)&CC));
+ return StepToGeom_MakeCircle::Convert(Cir,Handle(Geom_Circle)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) {
const Handle(StepGeom_Ellipse) Ell = Handle(StepGeom_Ellipse)::DownCast(SC);
- return StepToGeom_MakeEllipse::Convert(Ell,*((Handle(Geom_Ellipse)*)&CC));
+ return StepToGeom_MakeEllipse::Convert(Ell,Handle(Geom_Ellipse)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Hyperbola))) {
const Handle(StepGeom_Hyperbola) Hyp = Handle(StepGeom_Hyperbola)::DownCast(SC);
- return StepToGeom_MakeHyperbola::Convert(Hyp,*((Handle(Geom_Hyperbola)*)&CC));
+ return StepToGeom_MakeHyperbola::Convert(Hyp,Handle(Geom_Hyperbola)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Parabola))) {
const Handle(StepGeom_Parabola) Par = Handle(StepGeom_Parabola)::DownCast(SC);
- return StepToGeom_MakeParabola::Convert(Par,*((Handle(Geom_Parabola)*)&CC));
+ return StepToGeom_MakeParabola::Convert(Par,Handle(Geom_Parabola)::DownCast (CC));
}
// Attention : Other conic shall be implemented !
return Standard_False;
{
if (SC->IsKind(STANDARD_TYPE(StepGeom_Circle))) {
const Handle(StepGeom_Circle) Cir = Handle(StepGeom_Circle)::DownCast(SC);
- return StepToGeom_MakeCircle2d::Convert(Cir,*((Handle(Geom2d_Circle)*)&CC));
+ return StepToGeom_MakeCircle2d::Convert(Cir,Handle(Geom2d_Circle)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) {
const Handle(StepGeom_Ellipse) Ell = Handle(StepGeom_Ellipse)::DownCast(SC);
- return StepToGeom_MakeEllipse2d::Convert(Ell,*((Handle(Geom2d_Ellipse)*)&CC));
+ return StepToGeom_MakeEllipse2d::Convert(Ell,Handle(Geom2d_Ellipse)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Hyperbola))) {
const Handle(StepGeom_Hyperbola) Hyp = Handle(StepGeom_Hyperbola)::DownCast(SC);
- return StepToGeom_MakeHyperbola2d::Convert(Hyp,*((Handle(Geom2d_Hyperbola)*)&CC));
+ return StepToGeom_MakeHyperbola2d::Convert(Hyp,Handle(Geom2d_Hyperbola)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Parabola))) {
const Handle(StepGeom_Parabola) Par = Handle(StepGeom_Parabola)::DownCast(SC);
- return StepToGeom_MakeParabola2d::Convert(Par,*((Handle(Geom2d_Parabola)*)&CC));
+ return StepToGeom_MakeParabola2d::Convert(Par,Handle(Geom2d_Parabola)::DownCast (CC));
}
// Attention : Other conic shall be implemented !
return Standard_False;
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Line))) {
const Handle(StepGeom_Line) L = Handle(StepGeom_Line)::DownCast(SC);
- return StepToGeom_MakeLine::Convert(L,*((Handle(Geom_Line)*)&CC));
+ return StepToGeom_MakeLine::Convert(L,Handle(Geom_Line)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_TrimmedCurve))) {
const Handle(StepGeom_TrimmedCurve) TC = Handle(StepGeom_TrimmedCurve)::DownCast(SC);
- return StepToGeom_MakeTrimmedCurve::Convert(TC,*((Handle(Geom_TrimmedCurve)*)&CC));
+ return StepToGeom_MakeTrimmedCurve::Convert(TC,Handle(Geom_TrimmedCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Conic))) {
const Handle(StepGeom_Conic) CO = Handle(StepGeom_Conic)::DownCast(SC);
- return StepToGeom_MakeConic::Convert(CO,*((Handle(Geom_Conic)*)&CC));
+ return StepToGeom_MakeConic::Convert(CO,Handle(Geom_Conic)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_BoundedCurve))) {
const Handle(StepGeom_BoundedCurve) BC = Handle(StepGeom_BoundedCurve)::DownCast(SC);
- return StepToGeom_MakeBoundedCurve::Convert(BC,*((Handle(Geom_BoundedCurve)*)&CC));
+ return StepToGeom_MakeBoundedCurve::Convert(BC,Handle(Geom_BoundedCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_CurveReplica))) { //:n7 abv 16 Feb 99
const Handle(StepGeom_CurveReplica) CR = Handle(StepGeom_CurveReplica)::DownCast(SC);
{
if (SC->IsKind(STANDARD_TYPE(StepGeom_Line))) {
const Handle(StepGeom_Line) L = Handle(StepGeom_Line)::DownCast(SC);
- return StepToGeom_MakeLine2d::Convert(L,*((Handle(Geom2d_Line)*)&CC));
+ return StepToGeom_MakeLine2d::Convert(L,Handle(Geom2d_Line)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_Conic))) {
const Handle(StepGeom_Conic) L = Handle(StepGeom_Conic)::DownCast(SC);
- return StepToGeom_MakeConic2d::Convert(L,*((Handle(Geom2d_Conic)*)&CC));
+ return StepToGeom_MakeConic2d::Convert(L,Handle(Geom2d_Conic)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_BoundedCurve))) {
const Handle(StepGeom_BoundedCurve) L = Handle(StepGeom_BoundedCurve)::DownCast(SC);
- return StepToGeom_MakeBoundedCurve2d::Convert(L,*((Handle(Geom2d_BoundedCurve)*)&CC));
+ return StepToGeom_MakeBoundedCurve2d::Convert(L,Handle(Geom2d_BoundedCurve)::DownCast (CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_CurveReplica))) { //:n7 abv 16 Feb 99
const Handle(StepGeom_CurveReplica) CR = Handle(StepGeom_CurveReplica)::DownCast(SC);
{
if (SS->IsKind(STANDARD_TYPE(StepGeom_Plane))) {
const Handle(StepGeom_Plane) Sur = Handle(StepGeom_Plane)::DownCast(SS);
- return StepToGeom_MakePlane::Convert(Sur,*((Handle(Geom_Plane)*)&CS));
+ return StepToGeom_MakePlane::Convert(Sur,Handle(Geom_Plane)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_CylindricalSurface))) {
const Handle(StepGeom_CylindricalSurface) Sur = Handle(StepGeom_CylindricalSurface)::DownCast(SS);
- return StepToGeom_MakeCylindricalSurface::Convert(Sur,*((Handle(Geom_CylindricalSurface)*)&CS));
+ return StepToGeom_MakeCylindricalSurface::Convert(Sur,Handle(Geom_CylindricalSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_ConicalSurface))) {
const Handle(StepGeom_ConicalSurface) Sur = Handle(StepGeom_ConicalSurface)::DownCast(SS);
- return StepToGeom_MakeConicalSurface::Convert(Sur,*((Handle(Geom_ConicalSurface)*)&CS));
+ return StepToGeom_MakeConicalSurface::Convert(Sur,Handle(Geom_ConicalSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_SphericalSurface))) {
const Handle(StepGeom_SphericalSurface) Sur = Handle(StepGeom_SphericalSurface)::DownCast(SS);
- return StepToGeom_MakeSphericalSurface::Convert(Sur,*((Handle(Geom_SphericalSurface)*)&CS));
+ return StepToGeom_MakeSphericalSurface::Convert(Sur,Handle(Geom_SphericalSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_ToroidalSurface))) {
const Handle(StepGeom_ToroidalSurface) Sur = Handle(StepGeom_ToroidalSurface)::DownCast(SS);
- return StepToGeom_MakeToroidalSurface::Convert(Sur,*((Handle(Geom_ToroidalSurface)*)&CS));
+ return StepToGeom_MakeToroidalSurface::Convert(Sur,Handle(Geom_ToroidalSurface)::DownCast (CS));
}
return Standard_False;
}
OCC_CATCH_SIGNALS
if (SS->IsKind(STANDARD_TYPE(StepGeom_BoundedSurface))) {
const Handle(StepGeom_BoundedSurface) S1 = Handle(StepGeom_BoundedSurface)::DownCast(SS);
- return StepToGeom_MakeBoundedSurface::Convert(S1,*((Handle(Geom_BoundedSurface)*)&CS));
+ return StepToGeom_MakeBoundedSurface::Convert(S1,Handle(Geom_BoundedSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_ElementarySurface))) {
const Handle(StepGeom_ElementarySurface) S1 = Handle(StepGeom_ElementarySurface)::DownCast(SS);
if(S1->Position().IsNull())
return Standard_False;
- return StepToGeom_MakeElementarySurface::Convert(S1,*((Handle(Geom_ElementarySurface)*)&CS));
+ return StepToGeom_MakeElementarySurface::Convert(S1,Handle(Geom_ElementarySurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_SweptSurface))) {
const Handle(StepGeom_SweptSurface) S1 = Handle(StepGeom_SweptSurface)::DownCast(SS);
- return StepToGeom_MakeSweptSurface::Convert(S1,*((Handle(Geom_SweptSurface)*)&CS));
+ return StepToGeom_MakeSweptSurface::Convert(S1,Handle(Geom_SweptSurface)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_OffsetSurface))) { //:d4 abv 12 Mar 98
const Handle(StepGeom_OffsetSurface) OS = Handle(StepGeom_OffsetSurface)::DownCast(SS);
{
if (SS->IsKind(STANDARD_TYPE(StepGeom_SurfaceOfLinearExtrusion))) {
const Handle(StepGeom_SurfaceOfLinearExtrusion) Sur = Handle(StepGeom_SurfaceOfLinearExtrusion)::DownCast(SS);
- return StepToGeom_MakeSurfaceOfLinearExtrusion::Convert(Sur,*((Handle(Geom_SurfaceOfLinearExtrusion)*)&CS));
+ return StepToGeom_MakeSurfaceOfLinearExtrusion::Convert(Sur,Handle(Geom_SurfaceOfLinearExtrusion)::DownCast (CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_SurfaceOfRevolution))) {
const Handle(StepGeom_SurfaceOfRevolution) Sur = Handle(StepGeom_SurfaceOfRevolution)::DownCast(SS);
- return StepToGeom_MakeSurfaceOfRevolution::Convert(Sur,*((Handle(Geom_SurfaceOfRevolution)*)&CS));
+ return StepToGeom_MakeSurfaceOfRevolution::Convert(Sur,Handle(Geom_SurfaceOfRevolution)::DownCast (CS));
}
return Standard_False;
}
#include <Standard_TypeMismatch.hxx>
-#define DeclareAndSpeedCast(V,T,Vdown) Handle(T) Vdown = *((Handle(T)*)& V)
+#define DeclareAndSpeedCast(V,T,Vdown) Handle(T) Vdown = Handle(T)::DownCast (V)
#define DeclareConstAndSpeedCast(V,T,Vdown) const Handle(T)& Vdown = (Handle(T)&) V
-#define SpeedCast(V,T,Vdown) Vdown = *((Handle(T)*)& V)
+#define SpeedCast(V,T,Vdown) Vdown = Handle(T)::DownCast (V)
//=======================================================================
#include <Standard_TypeMismatch.hxx>
-#define DeclareAndSpeedCast(V,T,Vdown) Handle(T) Vdown = *((Handle(T)*)& V)
+#define DeclareAndSpeedCast(V,T,Vdown) Handle(T) Vdown = Handle(T)::DownCast (V)
#define DeclareConstAndSpeedCast(V,T,Vdown) const Handle(T)& Vdown = (Handle(T)&) V
-#define SpeedCast(V,T,Vdown) Vdown = *((Handle(T)*)& V)
+#define SpeedCast(V,T,Vdown) Vdown = Handle(T)::DownCast (V)
//=======================================================================
(const Handle(TDF_Attribute)& OldAttribute) const
{
if(myIsDelta)
- return new TDataStd_DeltaOnModificationOfByteArray(*((Handle(TDataStd_ByteArray)*)&OldAttribute));
+ return new TDataStd_DeltaOnModificationOfByteArray(Handle(TDataStd_ByteArray)::DownCast (OldAttribute));
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
{
Handle(TDF_Attribute) TDFAttribute = Attribute();
- Handle(TDataStd_ByteArray) BackAtt = (*((Handle(TDataStd_ByteArray)*)&TDFAttribute));
+ Handle(TDataStd_ByteArray) BackAtt = Handle(TDataStd_ByteArray)::DownCast (TDFAttribute);
if(BackAtt.IsNull()) {
#ifdef OCCT_DEBUG
cout << "DeltaOnModificationOfByteArray::Apply: OldAtt is Null" <<endl;
{
Handle(TDF_Attribute) TDFAttribute = Attribute();
- Handle(TDataStd_ExtStringArray) BackAtt = (*((Handle(TDataStd_ExtStringArray)*)&TDFAttribute));
+ Handle(TDataStd_ExtStringArray) BackAtt = Handle(TDataStd_ExtStringArray)::DownCast (TDFAttribute);
if(BackAtt.IsNull()) {
#ifdef OCCT_DEBUG
cout << "DeltaOnModificationOfExtStringArray::Apply: OldAtt is Null" <<endl;
{
Handle(TDF_Attribute) TDFAttribute = Attribute();
- Handle(TDataStd_IntegerArray) BackAtt = (*((Handle(TDataStd_IntegerArray)*)&TDFAttribute));
+ Handle(TDataStd_IntegerArray) BackAtt = Handle(TDataStd_IntegerArray)::DownCast (TDFAttribute);
if(BackAtt.IsNull()) {
#ifdef OCCT_DEBUG
cout << "DeltaOnModificationOfIntArray::Apply: OldAtt is Null" <<endl;
{
Handle(TDF_Attribute) aTDFAttribute = Attribute();
- Handle(TDataStd_IntPackedMap) aBackAtt = (*((Handle(TDataStd_IntPackedMap)*)&aTDFAttribute));
+ Handle(TDataStd_IntPackedMap) aBackAtt = Handle(TDataStd_IntPackedMap)::DownCast (aTDFAttribute);
if(aBackAtt.IsNull()) {
#ifdef OCCT_DEBUG
cout << "DeltaOnModificationOfIntPAckedMap::Apply: OldAtt is Null" <<endl;
{
Handle(TDF_Attribute) TDFAttribute = Attribute();
- Handle(TDataStd_RealArray) BackAtt = (*((Handle(TDataStd_RealArray)*)&TDFAttribute));
+ Handle(TDataStd_RealArray) BackAtt = Handle(TDataStd_RealArray)::DownCast (TDFAttribute);
if(BackAtt.IsNull()) {
#ifdef OCCT_DEBUG
cout << "DeltaOnModificationOfRealArray::Apply: OldAtt is Null" <<endl;
(const Handle(TDF_Attribute)& OldAttribute) const
{
if(myIsDelta)
- return new TDataStd_DeltaOnModificationOfExtStringArray(*((Handle(TDataStd_ExtStringArray)*)&OldAttribute));
+ return new TDataStd_DeltaOnModificationOfExtStringArray(Handle(TDataStd_ExtStringArray)::DownCast (OldAttribute));
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
(const Handle(TDF_Attribute)& OldAttribute) const
{
if(myIsDelta)
- return new TDataStd_DeltaOnModificationOfIntPackedMap(*((Handle(TDataStd_IntPackedMap)*)&OldAttribute));
+ return new TDataStd_DeltaOnModificationOfIntPackedMap(Handle(TDataStd_IntPackedMap)::DownCast (OldAttribute));
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
(const Handle(TDF_Attribute)& OldAttribute) const
{
if(myIsDelta)
- return new TDataStd_DeltaOnModificationOfIntArray(*((Handle(TDataStd_IntegerArray)*)&OldAttribute));
+ return new TDataStd_DeltaOnModificationOfIntArray(Handle(TDataStd_IntegerArray)::DownCast (OldAttribute));
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
(const Handle(TDF_Attribute)& OldAtt) const
{
if(myIsDelta)
- return new TDataStd_DeltaOnModificationOfRealArray(*((Handle(TDataStd_RealArray)*)&OldAtt));
+ return new TDataStd_DeltaOnModificationOfRealArray(Handle(TDataStd_RealArray)::DownCast (OldAtt));
else return new TDF_DefaultDeltaOnModification(OldAtt);
}
//=======================================================================
const Handle(TNaming_NamedShape)& TDataXtd_Constraint::GetPlane() const
{
- return (Handle(TNaming_NamedShape)&) myPlane;
+ return Handle(TNaming_NamedShape)::DownCast (myPlane);
}
//=======================================================================
Handle(Geom_Surface) surface = BRep_Tool::Surface (face);
if (!surface.IsNull()) {
if (surface->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
- surface = ((Handle(Geom_RectangularTrimmedSurface)&) surface)->BasisSurface();
+ surface = Handle(Geom_RectangularTrimmedSurface)::DownCast (surface)->BasisSurface();
Handle(Geom_Plane) S = Handle(Geom_Plane)::DownCast(surface);
if (!S.IsNull()) {
G = S->Pln();
Handle(Geom_Surface) surface = BRep_Tool::Surface (face);
if (!surface.IsNull()) {
if (surface->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
- surface = ((Handle(Geom_RectangularTrimmedSurface)&) surface)->BasisSurface();
+ surface = Handle(Geom_RectangularTrimmedSurface)::DownCast (surface)->BasisSurface();
Handle(Geom_CylindricalSurface) S = Handle(Geom_CylindricalSurface)::DownCast(surface);
if (!S.IsNull()) {
G = S->Cylinder();
Handle(Geom_Surface) surface = BRep_Tool::Surface (face);
if (!surface.IsNull()) {
if (surface->IsInstance(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
- surface = ((Handle(Geom_RectangularTrimmedSurface)&) surface)->BasisSurface();
+ surface = Handle(Geom_RectangularTrimmedSurface)::DownCast (surface)->BasisSurface();
}
if (surface->IsInstance(STANDARD_TYPE(Geom_CylindricalSurface))) {
type = TDataXtd_CYLINDER;
void TDocStd_XLink::Restore(const Handle(TDF_Attribute)& anAttribute)
{
- const Handle(TDocStd_XLink)& xRef =
- Handle(TDocStd_XLink)::DownCast(anAttribute);
+ Handle(TDocStd_XLink) xRef (Handle(TDocStd_XLink)::DownCast(anAttribute));
if (!xRef.IsNull()) {
myDocEntry = xRef->DocumentEntry();
myLabelEntry = xRef->LabelEntry();
(const Handle(TDF_Attribute)& intoAttribute,
const Handle(TDF_RelocationTable)& /*aRelocationTable*/) const
{
- const Handle(TDocStd_XLink)& xRef =
- Handle(TDocStd_XLink)::DownCast(intoAttribute);
+ Handle(TDocStd_XLink) xRef (Handle(TDocStd_XLink)::DownCast(intoAttribute));
if (!xRef.IsNull()) {
xRef->DocumentEntry(myDocEntry);
xRef->LabelEntry(myLabelEntry);
{
Handle(TDF_Attribute) TDFAttribute = Attribute();
- Handle(TNaming_NamedShape) NS = (*((Handle(TNaming_NamedShape)*)&TDFAttribute));
+ Handle(TNaming_NamedShape) NS = Handle(TNaming_NamedShape)::DownCast (TDFAttribute);
// If there is no attribute, reinsert the previous. Otherwise a new one
(const Handle(TDF_Attribute)& anOldAttribute) const
{
- return new TNaming_DeltaOnModification(*((Handle(TNaming_NamedShape)*)&anOldAttribute));
+ return new TNaming_DeltaOnModification(Handle(TNaming_NamedShape)::DownCast (anOldAttribute));
}
//=======================================================================
}
for(;cit.More();cit.Next()) {
- const Handle(TNaming_NamedShape)& NS = Handle(TNaming_NamedShape)::DownCast(cit.Value());
+ Handle(TNaming_NamedShape) NS (Handle(TNaming_NamedShape)::DownCast(cit.Value()));
if(!NS.IsNull()) {
TopoDS_Shape aS = TNaming_Tool::CurrentShape(NS);
if(aS.IsNull()) continue;
#ifdef OCCT_DEBUG
// Standard_Integer nbExtArgs = extArgs.Extent();
#endif
- const Handle(TNaming_NamedShape)& anExtArg = Handle(TNaming_NamedShape)::DownCast(itr.Key());
+ Handle(TNaming_NamedShape) anExtArg (Handle(TNaming_NamedShape)::DownCast(itr.Key()));
const Handle(TNaming_NamedShape)& aCurrentExtArg = TNaming_Tool::CurrentNamedShape(anExtArg);
if (!aCurrentExtArg.IsNull() && !aCurrentExtArg->IsEmpty())
extArgs.Append(aCurrentExtArg);
T == STANDARD_TYPE (TopoDS_TCompSolid)|| T == STANDARD_TYPE (TopoDS_TCompound))
{
if(isWrite) {
- const Handle(TopoDS_TShape)& key = Handle(TopoDS_TShape)::DownCast(myMap.FindKey(i));
- const Handle(TopoDS_TShape)& item = Handle(TopoDS_TShape)::DownCast(myMap.FindFromIndex(i));
+ Handle(TopoDS_TShape) key (Handle(TopoDS_TShape)::DownCast(myMap.FindKey(i)));
+ Handle(TopoDS_TShape) item (Handle(TopoDS_TShape)::DownCast(myMap.FindFromIndex(i)));
TopoDS_Shape S1; S1.TShape(key);
TopoDS_Shape S2; S2.TShape(item);
BRepTools::Write(S1, keyname.Cat(i).ToCString());
}
ais->SetMeasuredGeometry (TopoDS::Face (shape1), TopoDS::Face (shape2));
if (isplan)
- ais->SetCustomPlane (((Handle(Geom_Plane)&) ageom3)->Pln());
+ ais->SetCustomPlane (Handle(Geom_Plane)::DownCast (ageom3)->Pln());
else if (!isCurvilinear)
{
gp_Pln aPlane;
- aPlane.SetAxis (((Handle(Geom_Line)&) ageom3)->Position());
+ aPlane.SetAxis (Handle(Geom_Line)::DownCast (ageom3)->Position());
ais->SetCustomPlane (aPlane);
}
}
// Works only with line !!
//#ifndef OCCT_DEBUG
Handle(Geom_Geometry) aGeomGeometry = CURVE.Curve().Curve()->Transformed(CURVE.Trsf()) ;
- gp_Lin OLin = ((Handle(Geom_Line)&) aGeomGeometry)->Lin();
+ gp_Lin OLin = Handle(Geom_Line)::DownCast (aGeomGeometry)->Lin();
//#else
// gp_Lin OLin = ((Handle(Geom_Line)&) CURVE.Curve().Curve()->Transformed(CURVE.Trsf()))->Lin();
//#endif
CURVE.Initialize (NE);
//#ifndef OCCT_DEBUG
aGeomGeometry = CURVE.Curve().Curve()->Transformed(CURVE.Trsf()) ;
- gp_Lin NLin = ((Handle(Geom_Line)&)aGeomGeometry)->Lin();
+ gp_Lin NLin = Handle(Geom_Line)::DownCast (aGeomGeometry)->Lin();
//#else
// gp_Lin NLin = ((Handle(Geom_Line)&) CURVE.Curve().Curve()->Transformed(CURVE.Trsf()))->Lin();
//#endif
if (CURVE.GetType() == GeomAbs_Circle) {
//#ifndef OCCT_DEBUG
Handle(Geom_Geometry) aGeomGeometry = CURVE.Curve().Curve()->Transformed(CURVE.Trsf()) ;
- gp_Ax1 ax = ((Handle(Geom_Circle)&) aGeomGeometry)->Circ().Axis();
+ gp_Ax1 ax = Handle(Geom_Circle)::DownCast (aGeomGeometry)->Circ().Axis();
//#else
// gp_Ax1 ax = ((Handle(Geom_Circle)&) CURVE.Curve().Curve()->Transformed(CURVE.Trsf()))->Circ().Axis();
//#endif
if (MkF.IsDone()) {
//#ifndef OCCT_DEBUG
Handle(Geom_Surface) aGeomSurface = BRep_Tool::Surface(MkF.Face());
- aplane = (Handle(Geom_Plane)&) aGeomSurface ;
+ aplane = Handle(Geom_Plane)::DownCast (aGeomSurface) ;
//#else
// aplane = ((Handle(Geom_Plane)&) BRep_Tool::Surface(MkF.Face()));
//#endif
switch (type) {
case IntPatch_Analytic :
- myILA = *((Handle(IntPatch_ALine)*)&L); break;
+ myILA = Handle(IntPatch_ALine)::DownCast (L); break;
case IntPatch_Restriction :
- myILR = *((Handle(IntPatch_RLine)*)&L); break;
+ myILR = Handle(IntPatch_RLine)::DownCast (L); break;
case IntPatch_Walking :
- myILW = *((Handle(IntPatch_WLine)*)&L); break;
+ myILW = Handle(IntPatch_WLine)::DownCast (L); break;
default : //"geometric" line
- myILG = *((Handle(IntPatch_GLine)*)&L); break;
+ myILG = Handle(IntPatch_GLine)::DownCast (L); break;
}
// transform an analytic line to a walking line
{
const Handle(TopOpeBRepDS_HDataStructure)& HDS=myPB->DataStructure();
const TopOpeBRepDS_DataStructure& BDS= HDS->DS();
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI=Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I);
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I));
TopAbs_State TB1,TB2;myPG->StatesON(TB1,TB2); TopAbs_State TB=TB1;
TopOpeBRepDS_Kind GT,ST;Standard_Integer GI,SI;FDS_data(SSI,GT,GI,ST,SI);
const TopOpeBRepDS_Transition& TFE=SSI->Transition(); Standard_Boolean EGBoundFOR=SSI->GBound();
Standard_Boolean ssif = Standard_False; Handle(TopOpeBRepDS_ShapeShapeInterference) ssie3;
TopOpeBRepDS_ListIteratorOfListOfInterference itssi(BDS.ShapeInterferences(FCX));
for (;itssi.More();itssi.Next()) {
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& ssi = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(itssi.Value()); if (ssi.IsNull()) continue;
+ Handle(TopOpeBRepDS_ShapeShapeInterference) ssi (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(itssi.Value())); if (ssi.IsNull()) continue;
TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; FDS_data(ssi,GT1,G1,ST1,S1);
Standard_Boolean cond = (GT1 == TopOpeBRepDS_EDGE && ST1 == TopOpeBRepDS_FACE);
cond = cond && (G1 == ie3);
{
const Handle(TopOpeBRepDS_HDataStructure)& HDS=myPB->DataStructure();
const TopOpeBRepDS_DataStructure& BDS= HDS->DS();
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI=Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I);
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I));
TopAbs_State TB1,TB2;myPG->StatesON(TB1,TB2);
TopOpeBRepDS_Kind GT,ST;Standard_Integer GI,SI;FDS_data(SSI,GT,GI,ST,SI);
// const TopOpeBRepDS_Transition& TFE=SSI->Transition();
const TopoDS_Shape& TopOpeBRepBuild_EdgeBuilder::Vertex() const
{
const Handle(TopOpeBRepBuild_Loop)& L = Loop();
- const Handle(TopOpeBRepBuild_Pave)& PV = *((Handle(TopOpeBRepBuild_Pave)*)&L);
+ Handle(TopOpeBRepBuild_Pave) PV (Handle(TopOpeBRepBuild_Pave)::DownCast (L));
const TopoDS_Shape& V = PV->Vertex();
return V;
}
Standard_Real TopOpeBRepBuild_EdgeBuilder::Parameter() const
{
const Handle(TopOpeBRepBuild_Loop)& L = Loop();
- const Handle(TopOpeBRepBuild_Pave)& PV = *((Handle(TopOpeBRepBuild_Pave)*)&L);
+ Handle(TopOpeBRepBuild_Pave) PV (Handle(TopOpeBRepBuild_Pave)::DownCast (L));
Standard_Real parV = PV->Parameter();
return parV;
}
C1 = BRep_Tool::Curve(E1,loc,f1,l1);
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG1 = C1->Transformed(loc.Transformation());
- C1 = *((Handle(Geom_Curve)*)&GG1);
+ C1 = Handle(Geom_Curve)::DownCast (GG1);
}
C2 = BRep_Tool::Curve(E2,loc,f2,l2);
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG2 = C2->Transformed(loc.Transformation());
- C2 = *((Handle(Geom_Curve)*)&GG2);
+ C2 = Handle(Geom_Curve)::DownCast (GG2);
}
typC1 = C1->DynamicType();
typC2 = C2->DynamicType();
if (typC1 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C1 = (*((Handle(Geom_TrimmedCurve)*)&C1))->BasisCurve();
+ C1 = Handle(Geom_TrimmedCurve)::DownCast (C1)->BasisCurve();
typC1 = C1->DynamicType();
}
if (typC2 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C2 = (*((Handle(Geom_TrimmedCurve)*)&C2))->BasisCurve();
+ C2 = Handle(Geom_TrimmedCurve)::DownCast (C2)->BasisCurve();
typC2 = C2->DynamicType();
}
const Standard_Real tollin = Precision::Confusion();
const Standard_Real tolang = Precision::Angular();
if (typC1 == STANDARD_TYPE(Geom_Line)) {
- gp_Lin li1( (*((Handle(Geom_Line)*)&C1))->Lin());
- gp_Lin li2( (*((Handle(Geom_Line)*)&C2))->Lin());
+ gp_Lin li1( Handle(Geom_Line)::DownCast (C1)->Lin());
+ gp_Lin li2( Handle(Geom_Line)::DownCast (C2)->Lin());
if (Abs(li1.Angle(li2)) <= tolang &&
li1.Location().SquareDistance(li2.Location()) <= tollin*tollin) {
return Standard_False;
}
else if (typC1 == STANDARD_TYPE(Geom_Circle)) {
- gp_Circ ci1 = (*((Handle(Geom_Circle)*)&C1))->Circ();
- gp_Circ ci2 = (*((Handle(Geom_Circle)*)&C2))->Circ();
+ gp_Circ ci1 = Handle(Geom_Circle)::DownCast (C1)->Circ();
+ gp_Circ ci2 = Handle(Geom_Circle)::DownCast (C2)->Circ();
if (Abs(ci1.Radius()-ci2.Radius()) <= tollin &&
ci1.Location().SquareDistance(ci2.Location()) <= tollin*tollin) {
// Point debut, calage dans periode, et detection meme sens
return Standard_False;
}
else if (typC1 == STANDARD_TYPE(Geom_Ellipse)) {
- gp_Elips ci1 = (*((Handle(Geom_Ellipse)*)&C1))->Elips();
- gp_Elips ci2 = (*((Handle(Geom_Ellipse)*)&C2))->Elips();
+ gp_Elips ci1 = Handle(Geom_Ellipse)::DownCast (C1)->Elips();
+ gp_Elips ci2 = Handle(Geom_Ellipse)::DownCast (C2)->Elips();
if (Abs(ci1.MajorRadius()-ci2.MajorRadius()) <= tollin &&
Abs(ci1.MinorRadius()-ci2.MinorRadius()) <= tollin &&
return Standard_False;
}
else if (typC1 == STANDARD_TYPE(Geom_BSplineCurve)) {
- Handle(Geom_BSplineCurve) B1 = *((Handle(Geom_BSplineCurve)*)&C1);
- Handle(Geom_BSplineCurve) B2 = *((Handle(Geom_BSplineCurve)*)&C2);
+ Handle(Geom_BSplineCurve) B1 = Handle(Geom_BSplineCurve)::DownCast (C1);
+ Handle(Geom_BSplineCurve) B2 = Handle(Geom_BSplineCurve)::DownCast (C2);
Standard_Integer nbpoles = B1->NbPoles();
if (nbpoles != B2->NbPoles()) {
return Standard_True;
}
else if (typC1 == STANDARD_TYPE(Geom_BezierCurve)) {
- Handle(Geom_BezierCurve) B1 = *((Handle(Geom_BezierCurve)*)&C1);
- Handle(Geom_BezierCurve) B2 = *((Handle(Geom_BezierCurve)*)&C2);
+ Handle(Geom_BezierCurve) B1 = Handle(Geom_BezierCurve)::DownCast (C1);
+ Handle(Geom_BezierCurve) B2 = Handle(Geom_BezierCurve)::DownCast (C2);
Standard_Integer nbpoles = B1->NbPoles();
if (nbpoles != B2->NbPoles()) {
{
TopOpeBRepDS_ListIteratorOfListOfInterference it1(HDS->DS().ShapeInterferences(f1));
for (; it1.More(); it1.Next()){
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI1 = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(it1.Value());
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI1 (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(it1.Value()));
Standard_Integer G1 = SSI1->Geometry();
Standard_Boolean isgbound = SSI1->GBound();
const TopoDS_Shape& e1 = HDS->Shape(G1);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(FF); Standard_Integer nLI = LI.Extent();
if (nLI == 0) continue;
for (TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI); ILI.More(); ILI.Next() ) {
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value());
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value()));
if (SSI.IsNull()) continue;
TopOpeBRepDS_Kind GT,ST;Standard_Integer GI,SI;FDS_data(SSI,GT,GI,ST,SI);
if (ST != TopOpeBRepDS_FACE) continue;
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(FF); Standard_Integer nLI = LI.Extent();
if (nLI == 0) continue;
for (TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI); ILI.More(); ILI.Next() ) {
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value());
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value()));
if (SSI.IsNull()) continue;
TopOpeBRepDS_Kind GT,ST;Standard_Integer GI,SI;FDS_data(SSI,GT,GI,ST,SI);
if (ST != TopOpeBRepDS_FACE) continue;
}
if (!myCref.IsNull()) {
- const Handle(BRep_GCurve)& GCref = *((Handle(BRep_GCurve)*)&myCref);
+ Handle(BRep_GCurve) GCref (Handle(BRep_GCurve)::DownCast (myCref));
Standard_Real First,Last;
GCref->Range(First,Last);
if (Last<=First) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
pcurvefound = Standard_True;
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
Standard_Real f,l;
GC->Range(f,l);
if (SameRange && (f != First || l != Last)) {
TopAbs_Orientation orv = aVertex.Orientation();
if (orv == TopAbs_FORWARD || orv == TopAbs_REVERSED) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
if (orv==TopAbs_FORWARD)
Controlp = C->Value(GC->First());
Handle(Standard_Type) TheType = PC->DynamicType();
if (TheType == STANDARD_TYPE(Geom2d_Line)) {
- const Handle(Geom2d_Line)& HL = *((Handle(Geom2d_Line)*)&PC);
+ Handle(Geom2d_Line) HL (Handle(Geom2d_Line)::DownCast (PC));
const gp_Dir2d& D = HL->Direction();
Standard_Real tol = Precision::Angular();
Standard_Boolean istrim = ( T == STANDARD_TYPE(Geom_RectangularTrimmedSurface) );
if (istrim) {
Handle(Geom_RectangularTrimmedSurface)
- hrts=*((Handle(Geom_RectangularTrimmedSurface)*)&Surf);
+ hrts=Handle(Geom_RectangularTrimmedSurface)::DownCast (Surf);
Standard_Real oumin,oumax,ovmin,ovmax;
hrts->Bounds(oumin,oumax,ovmin,ovmax);
Standard_Real umin,umax,vmin,vmax;
it1.Initialize(LI);
while (it1.More() ) {
const Handle(TopOpeBRepDS_Interference)& I1 = it1.Value();
- const Handle(TopOpeBRepDS_CurvePointInterference)& CPI =
- Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I1);
+ Handle(TopOpeBRepDS_CurvePointInterference) CPI (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I1));
if(!CPI.IsNull()) {
Standard_Integer Param =
//#ifdef OCCT_DEBUG
{
if ( ! mySCI1.IsNull() ) {
return
- (*((Handle(TopOpeBRepDS_SurfaceCurveInterference)*)&mySCI1))->PCurve();
+ Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast (mySCI1)->PCurve();
}
else {
static Handle(Geom2d_Curve) STALOC_Geom2dCurveNull1;
void TopOpeBRepDS_Curve::Curve1(const Handle(Geom2d_Curve)& PC1)
{
if ( ! mySCI1.IsNull() ) {
- (*((Handle(TopOpeBRepDS_SurfaceCurveInterference)*)&mySCI1))->PCurve(PC1);
+ Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast (mySCI1)->PCurve(PC1);
}
}
{
if ( ! mySCI2.IsNull() ) {
return
- (*((Handle(TopOpeBRepDS_SurfaceCurveInterference)*)&mySCI2))->PCurve();
+ Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast (mySCI2)->PCurve();
}
else {
static Handle(Geom2d_Curve) STALOC_Geom2dCurveNull2;
void TopOpeBRepDS_Curve::Curve2(const Handle(Geom2d_Curve)& PC2)
{
if ( ! mySCI2.IsNull() ) {
- (*((Handle(TopOpeBRepDS_SurfaceCurveInterference)*)&mySCI2))->PCurve(PC2);
+ Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast (mySCI2)->PCurve(PC2);
}
}
else if (T==STANDARD_TYPE(Geom_Hyperbola)) OS<<"HYPERBOLA";
else if (T==STANDARD_TYPE(Geom_BezierCurve)) OS<<"BEZIER";
else if (T==STANDARD_TYPE(Geom_BSplineCurve))
- OS<<"BSPLINE("<<(*((Handle(Geom_BSplineCurve)*)&C))->Degree()<<")";
+ OS<<"BSPLINE("<<Handle(Geom_BSplineCurve)::DownCast (C)->Degree()<<")";
else if (T==STANDARD_TYPE(Geom_TrimmedCurve))
{OS<<"TRIMMED ";PrintType(Handle(Geom_TrimmedCurve)::DownCast(C)->BasisCurve(),OS);}
else if (T==STANDARD_TYPE(Geom_OffsetCurve)) OS<<"OFFSETCURVE";
else if (T==STANDARD_TYPE(Geom2d_Hyperbola)) OS<<"HYPERBOLA";
else if (T==STANDARD_TYPE(Geom2d_BezierCurve)) OS<<"BEZIER";
else if (T==STANDARD_TYPE(Geom2d_BSplineCurve))
- OS<<"BSPLINE("<<(*((Handle(Geom2d_BSplineCurve)*)&C))->Degree()<<")";
+ OS<<"BSPLINE("<<Handle(Geom2d_BSplineCurve)::DownCast (C)->Degree()<<")";
else if (T==STANDARD_TYPE(Geom2d_TrimmedCurve))
{OS<<"TRIMMED ";PrintType(Handle(Geom2d_TrimmedCurve)::DownCast(C)->BasisCurve(),OS);}
else if (T==STANDARD_TYPE(Geom2d_OffsetCurve)) OS<<"OFFSETCURVE";
Standard_Boolean isevi = I1->IsKind(STANDARD_TYPE(TopOpeBRepDS_EdgeVertexInterference));
Standard_Boolean iscpi = I1->IsKind(STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference));
if (isevi) {
- const Handle(TopOpeBRepDS_EdgeVertexInterference)& EVI = Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I1);
+ Handle(TopOpeBRepDS_EdgeVertexInterference) EVI (Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I1));
newI = new TopOpeBRepDS_EdgeVertexInterference(T,TopOpeBRepDS_FACE,IB1,G1,EVI->GBound(),
TopOpeBRepDS_UNSHGEOMETRY,EVI->Parameter());
}
if (iscpi) {
- const Handle(TopOpeBRepDS_CurvePointInterference)& CPI = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I1);
+ Handle(TopOpeBRepDS_CurvePointInterference) CPI (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I1));
newI = new TopOpeBRepDS_CurvePointInterference(T,TopOpeBRepDS_FACE,IB1,TopOpeBRepDS_POINT,G1,CPI->Parameter());
}
} // it2
if (complex1d) {
- const Handle(TopOpeBRepDS_EdgeVertexInterference)& EVI = Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I1);
+ Handle(TopOpeBRepDS_EdgeVertexInterference) EVI (Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I1));
TopOpeBRepDS_Config cEIX=BDS.SameDomainOri(SIX), c1=BDS.SameDomainOri(IB1);
TopOpeBRepDS_Config Conf = (cEIX == c1) ? TopOpeBRepDS_SAMEORIENTED : TopOpeBRepDS_DIFFORIENTED;
Handle(TopOpeBRepDS_Interference) newI = new TopOpeBRepDS_EdgeVertexInterference(T,TopOpeBRepDS_EDGE,IB1,G,EVI->GBound(),Conf,EVI->Parameter());
for (TopOpeBRepDS_ListIteratorOfListOfInterference itl(loi); itl.More(); itl.Next()){
const Handle(TopOpeBRepDS_Interference)& I = itl.Value();
- const Handle(TopOpeBRepDS_CurvePointInterference)& CPI = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I);
+ Handle(TopOpeBRepDS_CurvePointInterference) CPI (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I));
if (CPI.IsNull()) continue;
Standard_Real par = CPI->Parameter();
FDS_Idata(I,tsb1,isb1,tsa1,isa1,GT1,G1,ST1,S1);
if (tsb1 != TopAbs_FACE) continue;
if (tsa1 != TopAbs_FACE) continue;
- const Handle(TopOpeBRepDS_CurvePointInterference)& cpi = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I);
- const Handle(TopOpeBRepDS_EdgeVertexInterference)& evi = Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I);
+ Handle(TopOpeBRepDS_CurvePointInterference) cpi (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I));
+ Handle(TopOpeBRepDS_EdgeVertexInterference) evi (Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I));
if (cpi.IsNull() && evi.IsNull()) continue;
LOIsansGDS.Append(I);
break;
Standard_Boolean pardef = Standard_False;
Handle(TopOpeBRepDS_Interference)& I = itI.Value(); FDS_data(I,GT1,G1,ST1,S1);
- const Handle(TopOpeBRepDS_CurvePointInterference)& CPI = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I);
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I);
+ Handle(TopOpeBRepDS_CurvePointInterference) CPI (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I));
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I));
if (!CPI.IsNull()) {
par = CPI->Parameter(); pardef = Standard_True;
}
void TopOpeBRepDS_FaceInterferenceTool::Init
(const TopoDS_Shape& FFI,const TopoDS_Shape& EE,const Standard_Boolean EEisnew,const Handle(TopOpeBRepDS_Interference)& Iin)
{
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& I = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(Iin); if (I.IsNull()) return;
+ Handle(TopOpeBRepDS_ShapeShapeInterference) I (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(Iin)); if (I.IsNull()) return;
const TopoDS_Face& FI = TopoDS::Face(FFI);
const TopoDS_Edge& E = TopoDS::Edge(EE);
#ifdef OCCT_DEBUG
void TopOpeBRepDS_FaceInterferenceTool::Add
(const TopoDS_Shape& FFI,const TopoDS_Shape& FFT,const TopoDS_Shape& EE,const Standard_Boolean EEisnew,const Handle(TopOpeBRepDS_Interference)& Iin)
{
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& I = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(Iin); if (I.IsNull()) return;
+ Handle(TopOpeBRepDS_ShapeShapeInterference) I (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(Iin)); if (I.IsNull()) return;
const TopoDS_Face& FI = TopoDS::Face(FFI);
const TopoDS_Face& FT = TopoDS::Face(FFT);
const TopoDS_Edge& E = TopoDS::Edge(EE);
IC->GKGSKS(GK,IG,SK,IS);
if (SK == TopOpeBRepDS_CURVE) {
const TopOpeBRepDS_Curve& C = HDS->Curve(IS);
- Standard_Real P = (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&IC))->Parameter();
+ Standard_Real P = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (IC)->Parameter();
TopoDS_Shape S1,S2;
C.GetShapes(S1,S2);
if (myInterToShape.IsBound(I)) {
const TopoDS_Shape& S = myInterToShape(I);
if (S.IsSame(E)) {
- U = (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&I))->Parameter();
+ U = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (I)->Parameter();
return 1;
}
}
if (myInterToShape.IsBound(II)) {
const TopoDS_Shape& S = myInterToShape(II);
if (S.IsSame(E)) {
- U = (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&II))->Parameter();
+ U = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (II)->Parameter();
return 1;
}
}
if (myInterToShape.IsBound(I)) {
const TopoDS_Shape& S = myInterToShape(I);
if (S.IsSame(E)) {
- (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&I))->Parameter(U);
+ Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (I)->Parameter(U);
}
}
const TopOpeBRepDS_ListOfInterference& LI = myGToI(I->Geometry());
if (myInterToShape.IsBound(II)) {
const TopoDS_Shape& S = myInterToShape(II);
if (S.IsSame(E)) {
- (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&II))->Parameter(U);
+ Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (II)->Parameter(U);
}
}
}
//=======================================================================
Standard_Real TopOpeBRepDS_InterferenceTool::Parameter(const Handle(TopOpeBRepDS_Interference)& I)
{
- return (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&I))->Parameter();
+ return Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (I)->Parameter();
}
//=======================================================================
//=======================================================================
void TopOpeBRepDS_InterferenceTool::Parameter(const Handle(TopOpeBRepDS_Interference)& I,const Standard_Real Par)
{
- (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&I))->Parameter(Par);
+ Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (I)->Parameter(Par);
}
const Handle(TopOpeBRepDS_Interference)& I = Value();
Handle(Standard_Type) T = I->DynamicType();
if ( T == STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference) ) {
- return (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&I))->Parameter();
+ return Handle(TopOpeBRepDS_CurvePointInterference)::DownCast (I)->Parameter();
}
else if ( T == STANDARD_TYPE(TopOpeBRepDS_EdgeVertexInterference) ) {
- return (*((Handle(TopOpeBRepDS_EdgeVertexInterference)*)&I))->Parameter();
+ return Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast (I)->Parameter();
}
else {
Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::Parameter()");
{
const Handle(TopOpeBRepDS_Interference)& I = Value();
if ( I->DynamicType() == STANDARD_TYPE(TopOpeBRepDS_EdgeVertexInterference) ) {
- return (*((Handle(TopOpeBRepDS_EdgeVertexInterference)*)&I))
+ return Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast (I)
->Config() == TopOpeBRepDS_DIFFORIENTED;
}
else {
{
const Handle(TopOpeBRepDS_Interference)& I = Value();
if ( I->DynamicType() == STANDARD_TYPE(TopOpeBRepDS_EdgeVertexInterference) ) {
- return (*((Handle(TopOpeBRepDS_EdgeVertexInterference)*)&I))
+ return Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast (I)
->Config() == TopOpeBRepDS_SAMEORIENTED;
}
else {
Standard_Integer iparmin = (Standard_Integer)parmin;
Standard_Integer iparmax = (Standard_Integer)parmax;
- Handle(Geom_BSplineCurve)& HC3D = *((Handle(Geom_BSplineCurve)*)&C3D);
- Handle(Geom2d_BSplineCurve)& HPC1 = *((Handle(Geom2d_BSplineCurve)*)&PC1);
- Handle(Geom2d_BSplineCurve)& HPC2 = *((Handle(Geom2d_BSplineCurve)*)&PC2);
+ Handle(Geom_BSplineCurve)& HC3D = Handle(Geom_BSplineCurve)::DownCast (C3D);
+ Handle(Geom2d_BSplineCurve)& HPC1 = Handle(Geom2d_BSplineCurve)::DownCast (PC1);
+ Handle(Geom2d_BSplineCurve)& HPC2 = Handle(Geom2d_BSplineCurve)::DownCast (PC2);
//--------------------- IFV - "improving" initial curves
#ifdef CurveImprovement
Standard_Boolean bf, bl;
- const Handle(Geom_BSplineCurve)& Curve = Handle(Geom_BSplineCurve)::DownCast(C3Dnew);
+ Handle(Geom_BSplineCurve) Curve (Handle(Geom_BSplineCurve)::DownCast(C3Dnew));
if(!Curve.IsNull()) {
GeomLib_CheckBSplineCurve cbsc(Curve, 1.e-7, 0.1);
cbsc.NeedTangentFix(bf, bl);
cbsc.FixTangent(bf, bl);
}
- const Handle(Geom2d_BSplineCurve)& Curve2df = Handle(Geom2d_BSplineCurve)::DownCast(PC1new);
+ Handle(Geom2d_BSplineCurve) Curve2df (Handle(Geom2d_BSplineCurve)::DownCast(PC1new));
if(!Curve2df.IsNull()) {
GeomLib_Check2dBSplineCurve cbsc2df(Curve2df, 1.e-7, 0.1);
cbsc2df.NeedTangentFix(bf, bl);
cbsc2df.FixTangent(bf, bl);
}
- const Handle(Geom2d_BSplineCurve)& Curve2ds = Handle(Geom2d_BSplineCurve)::DownCast(PC2new);
+ Handle(Geom2d_BSplineCurve) Curve2ds (Handle(Geom2d_BSplineCurve)::DownCast(PC2new));
if(!Curve2ds.IsNull()) {
GeomLib_Check2dBSplineCurve cbsc2ds(Curve2ds, 1.e-7, 0.1);
cbsc2ds.NeedTangentFix(bf, bl);
// if the curve is trimmed we get the basis curve to fit the new vertices
// otherwise the makeedge will fail.
if (C->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C = (*((Handle(Geom_TrimmedCurve)*)&C))->BasisCurve();
+ C = Handle(Geom_TrimmedCurve)::DownCast (C)->BasisCurve();
}
#ifdef OCCT_DEBUG
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG1 = C1->Transformed(loc.Transformation());
- C1 = *((Handle(Geom_Curve)*)&GG1);
+ C1 = Handle(Geom_Curve)::DownCast (GG1);
}
C2 = BRep_Tool::Curve(E2,loc,f2,l2);
//modified by NIZNHY-PKV Mon Nov 15 16:24:38 1999
if (!loc.IsIdentity()) {
Handle(Geom_Geometry) GG2 = C2->Transformed(loc.Transformation());
- C2 = *((Handle(Geom_Curve)*)&GG2);
+ C2 = Handle(Geom_Curve)::DownCast (GG2);
}
typC1 = C1->DynamicType();
typC2 = C2->DynamicType();
if (typC1 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C1 = (*((Handle(Geom_TrimmedCurve)*)&C1))->BasisCurve();
+ C1 = Handle(Geom_TrimmedCurve)::DownCast (C1)->BasisCurve();
typC1 = C1->DynamicType();
}
if (typC2 == STANDARD_TYPE(Geom_TrimmedCurve)) {
- C2 = (*((Handle(Geom_TrimmedCurve)*)&C2))->BasisCurve();
+ C2 = Handle(Geom_TrimmedCurve)::DownCast (C2)->BasisCurve();
typC2 = C2->DynamicType();
}
const Standard_Real tollin = Precision::Confusion();
const Standard_Real tolang = Precision::Angular();
if (typC1 == STANDARD_TYPE(Geom_Line)) {
- gp_Lin li1( (*((Handle(Geom_Line)*)&C1))->Lin());
- gp_Lin li2( (*((Handle(Geom_Line)*)&C2))->Lin());
+ gp_Lin li1( Handle(Geom_Line)::DownCast (C1)->Lin());
+ gp_Lin li2( Handle(Geom_Line)::DownCast (C2)->Lin());
gp_Dir dir1(li1.Direction());
gp_Dir dir2(li2.Direction());
return Standard_False;
}
else if (typC1 == STANDARD_TYPE(Geom_Circle)) {
- gp_Circ ci1 = (*((Handle(Geom_Circle)*)&C1))->Circ();
- gp_Circ ci2 = (*((Handle(Geom_Circle)*)&C2))->Circ();
+ gp_Circ ci1 = Handle(Geom_Circle)::DownCast (C1)->Circ();
+ gp_Circ ci2 = Handle(Geom_Circle)::DownCast (C2)->Circ();
if (Abs(ci1.Radius()-ci2.Radius()) <= tollin &&
ci1.Location().SquareDistance(ci2.Location()) <= tollin*tollin &&
ci1.Axis().IsParallel(ci2.Axis(),tolang) ) {
return Standard_False;
}
else if (typC1 == STANDARD_TYPE(Geom_Ellipse)) {
- gp_Elips ci1 = (*((Handle(Geom_Ellipse)*)&C1))->Elips();
- gp_Elips ci2 = (*((Handle(Geom_Ellipse)*)&C2))->Elips();
+ gp_Elips ci1 = Handle(Geom_Ellipse)::DownCast (C1)->Elips();
+ gp_Elips ci2 = Handle(Geom_Ellipse)::DownCast (C2)->Elips();
if (Abs(ci1.MajorRadius()-ci2.MajorRadius()) <= tollin &&
Abs(ci1.MinorRadius()-ci2.MinorRadius()) <= tollin &&
return Standard_False;
}
- Handle(Geom_BSplineCurve) B1 = *((Handle(Geom_BSplineCurve)*)&C1);
- Handle(Geom_BSplineCurve) B2 = *((Handle(Geom_BSplineCurve)*)&C2);
+ Handle(Geom_BSplineCurve) B1 = Handle(Geom_BSplineCurve)::DownCast (C1);
+ Handle(Geom_BSplineCurve) B2 = Handle(Geom_BSplineCurve)::DownCast (C2);
Standard_Integer nbpoles = B1->NbPoles();
if (nbpoles != B2->NbPoles()) {
return Standard_False;
}
- Handle(Geom_BezierCurve) B1 = *((Handle(Geom_BezierCurve)*)&C1);
- Handle(Geom_BezierCurve) B2 = *((Handle(Geom_BezierCurve)*)&C2);
+ Handle(Geom_BezierCurve) B1 = Handle(Geom_BezierCurve)::DownCast (C1);
+ Handle(Geom_BezierCurve) B2 = Handle(Geom_BezierCurve)::DownCast (C2);
Standard_Integer nbpoles = B1->NbPoles();
if (nbpoles != B2->NbPoles()) {
Handle(Geom2d_Curve) Curv2dR = BRep_Tool::CurveOnSurface(aFEdge,
aFFace,cf,cl);
if (Curv2d->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
- Curv2d = (*((Handle(Geom2d_TrimmedCurve)*)&Curv2d))->BasisCurve();
+ Curv2d = Handle(Geom2d_TrimmedCurve)::DownCast (Curv2d)->BasisCurve();
if (Curv2dR->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
- Curv2dR = (*((Handle(Geom2d_TrimmedCurve)*)&Curv2dR))->BasisCurve();
+ Curv2dR = Handle(Geom2d_TrimmedCurve)::DownCast (Curv2dR)->BasisCurve();
B.UpdateEdge (theNewEdge,Curv2d,Curv2dR,Surf,loc,BRep_Tool::Tolerance(theNewEdge));
}
else {
// update the new edge
if (Curv2d->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve))
- Curv2d = (*((Handle(Geom2d_TrimmedCurve)*)&Curv2d))->BasisCurve();
+ Curv2d = Handle(Geom2d_TrimmedCurve)::DownCast (Curv2d)->BasisCurve();
Standard_Real f, l;
f = Curv2d->FirstParameter();
l = Curv2d->LastParameter();
Handle(Standard_Type) TheType = PC->DynamicType();
if (TheType == STANDARD_TYPE(Geom2d_Line)) {
- const Handle(Geom2d_Line)& HL = *((Handle(Geom2d_Line)*)&PC);
+ Handle(Geom2d_Line) HL (Handle(Geom2d_Line)::DownCast (PC));
const gp_Dir2d& D = HL->Direction();
Standard_Real tol = Precision::Angular();
if(move) {
Standard_Integer last = theunitssequence->Length();
unit = theunitssequence->Value(last);
- shiftedunit = *(Handle(Units_ShiftedUnit)*)&unit;
+ shiftedunit = Handle(Units_ShiftedUnit)::DownCast (unit);
shiftedunit->Move(move);
}
}
void Units_UnitsSystem::Dump() const
{
Handle(Standard_Transient) transient = This();
- Handle(Units_UnitsSystem) unitssystem = *(Handle(Units_UnitsSystem)*)&transient;
+ Handle(Units_UnitsSystem) unitssystem = Handle(Units_UnitsSystem)::DownCast (transient);
Units_Explorer explorer(unitssystem);
cout<<" UNITSSYSTEM : "<<endl;
for(; explorer.MoreQuantity(); explorer.NextQuantity()) {
if (IsRectangular) {
Standard_Real XS, YS;
Handle(Aspect_RectangularGrid) theGrid =
- *(Handle(Aspect_RectangularGrid) *) &MyGrid;
+ Handle(Aspect_RectangularGrid)::DownCast (MyGrid);
XS = theGrid->XStep (), YS = theGrid->YStep ();
// project point on plane to grid local space
Standard_Integer DN;
Standard_Real Alpha;
Handle(Aspect_CircularGrid) theGrid =
- *(Handle(Aspect_CircularGrid) *) &MyGrid;
+ Handle(Aspect_CircularGrid)::DownCast (MyGrid);
RS = theGrid->RadiusStep ();
DN = theGrid->DivisionNumber ();
Alpha = M_PI / Standard_Real (DN);
Handle(ViewerTest_EventManager) EM;
if(theEventMgrs.IsEmpty()) return EM;
Handle(Standard_Transient) Tr = theEventMgrs.First();
- EM = *((Handle(ViewerTest_EventManager)*)&Tr);
+ EM = Handle(ViewerTest_EventManager)::DownCast (Tr);
return EM;
}
if (!IO.IsNull()) {
if(IO->Type()==AIS_KOI_Shape) {
if(IO->Signature()==0){
- retsh = *((Handle(AIS_Shape)*)&IO);
+ retsh = Handle(AIS_Shape)::DownCast (IO);
}
else
cout << "an Object which is not an AIS_Shape "
result = TheAISContext()->SelectedShape();
else{
Handle(AIS_InteractiveObject) IO = TheAISContext()->SelectedInteractive();
- result = (*((Handle(AIS_Shape)*) &IO))->Shape();
+ result = Handle(AIS_Shape)::DownCast (IO)->Shape();
}
}
thearr->SetValue(i,TheAISContext()->SelectedShape());
else{
Handle(AIS_InteractiveObject) IO = TheAISContext()->SelectedInteractive();
- thearr->SetValue(i,(*((Handle(AIS_Shape)*) &IO))->Shape());
+ thearr->SetValue(i,Handle(AIS_Shape)::DownCast (IO)->Shape());
}
}
else
{
Handle(AIS_InteractiveObject) IO = TheAISContext()->SelectedInteractive();
- aShape = (*((Handle(AIS_Shape)*) &IO))->Shape();
+ aShape = Handle(AIS_Shape)::DownCast (IO)->Shape();
}
TCollection_AsciiString aCurrentName = aName;
if(dimension_status == -1)
TheAISContext()->Erase(curio,Standard_False);
else {
- AIS_KindOfDimension KOD = (*((Handle(AIS_Relation)*)&curio))->KindOfDimension();
+ AIS_KindOfDimension KOD = Handle(AIS_Relation)::DownCast (curio)->KindOfDimension();
if ((dimension_status==0 && KOD == AIS_KOD_NONE)||
(dimension_status==1 && KOD != AIS_KOD_NONE))
TheAISContext()->Erase(curio,Standard_False);
if(dimension_status == -1)
TheAISContext()->Display(curio,Standard_False);
else {
- AIS_KindOfDimension KOD = (*((Handle(AIS_Relation)*)&curio))->KindOfDimension();
+ AIS_KindOfDimension KOD = Handle(AIS_Relation)::DownCast (curio)->KindOfDimension();
if ((dimension_status==0 && KOD == AIS_KOD_NONE)||
(dimension_status==1 && KOD != AIS_KOD_NONE))
TheAISContext()->Display(curio,Standard_False);
// On downcast aShape de AIS_InteractiveObject a AIS_Trihedron
// pour lui appliquer la methode SetSize()
- Handle(AIS_Trihedron) aTrihedron = *(Handle(AIS_Trihedron)*) &aShape;
+ Handle(AIS_Trihedron) aTrihedron = Handle(AIS_Trihedron)::DownCast (aShape);
// C'est bien un triedre,on chage sa valeur!
aTrihedron->SetSize(value);
// On downcast aShape de AIS_InteractiveObject a AIS_Trihedron
// pour lui appliquer la methode SetSize()
- Handle(AIS_Trihedron) aTrihedron = *(Handle(AIS_Trihedron)*) &aShape;
+ Handle(AIS_Trihedron) aTrihedron = Handle(AIS_Trihedron)::DownCast (aShape);
// C'est bien un triedre,on chage sa valeur
aTrihedron->SetSize(value);
if (!ShapeA.IsNull() &&
ShapeA->Type()==AIS_KOI_Datum && ShapeA->Signature()==3 ) {
// on le downcast
- Handle(AIS_Trihedron) TrihedronA =((*(Handle(AIS_Trihedron)*)&ShapeA));
+ Handle(AIS_Trihedron) TrihedronA =(Handle(AIS_Trihedron)::DownCast (ShapeA));
// on le charge dans le contexte et on active le mode Plane.
TheAISContext()->Load(TrihedronA,0,Standard_False);
TheAISContext()->Activate(TrihedronA,3);
theIOB = TheAISContext()->Interactive();
}
// on le downcast
- Handle(AIS_Plane) PlaneB =((*(Handle(AIS_Plane)*)&theIOB));
+ Handle(AIS_Plane) PlaneB =(Handle(AIS_Plane)::DownCast (theIOB));
// Fermeture du contexte local.
TheAISContext()->CloseLocalContext(myCurrentIndex);
}
else {di <<"vline error: wrong type of 1st argument."<<"\n";return 1; }
// Les deux parametres sont du bon type. On verifie que les points ne sont pas confondus
- Handle(AIS_Point) theAISPointA= *(Handle(AIS_Point)*)& theShapeA;
- Handle(AIS_Point) theAISPointB= *(Handle(AIS_Point)*)& theShapeB;
+ Handle(AIS_Point) theAISPointA= Handle(AIS_Point)::DownCast (theShapeA);
+ Handle(AIS_Point) theAISPointB= Handle(AIS_Point)::DownCast (theShapeB);
Handle(Geom_Point ) myGeomPointBA= theAISPointA->Component();
- Handle(Geom_CartesianPoint ) myCartPointA= *((Handle(Geom_CartesianPoint)*)& myGeomPointBA);
+ Handle(Geom_CartesianPoint ) myCartPointA= Handle(Geom_CartesianPoint)::DownCast (myGeomPointBA);
// Handle(Geom_CartesianPoint ) myCartPointA= *(Handle(Geom_CartesianPoint)*)& (theAISPointA->Component() ) ;
Handle(Geom_Point ) myGeomPointB= theAISPointB->Component();
- Handle(Geom_CartesianPoint ) myCartPointB= *((Handle(Geom_CartesianPoint)*)& myGeomPointB);
+ Handle(Geom_CartesianPoint ) myCartPointB= Handle(Geom_CartesianPoint)::DownCast (myGeomPointB);
// Handle(Geom_CartesianPoint ) myCartPointB= *(Handle(Geom_CartesianPoint)*)& (theAISPointB->Component() ) ;
if (myCartPointB->X()==myCartPointA->X() && myCartPointB->Y()==myCartPointA->Y() && myCartPointB->Z()==myCartPointA->Z() ) {
#ifdef DOWNCAST
Handle(Visual3d_View) theView = Handle(Visual3d_View)::DownCast (AProjector);
#else
- Handle(Visual3d_View) theView = *(Handle(Visual3d_View) *) &AProjector;
+ Handle(Visual3d_View) theView = Handle(Visual3d_View)::DownCast (AProjector);
#endif
Standard_Integer ViewId = theView->Identification ();