//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <Standard_NotImplemented.hxx>
-
-#include <AIS_PerpendicularRelation.ixx>
#include <AIS.hxx>
-
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <BRepAdaptor_Surface.hxx>
+#include <AIS_PerpendicularRelation.hxx>
#include <BRep_Tool.hxx>
-
+#include <BRepAdaptor_Surface.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
#include <DsgPrs_PerpenPresentation.hxx>
-
#include <ElCLib.hxx>
-
+#include <gce_MakeDir.hxx>
#include <Geom2d_Line.hxx>
-#include <GeomAPI.hxx>
-#include <Geom_Line.hxx>
+#include <Geom_Ellipse.hxx>
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
-
+#include <Geom_Transformation.hxx>
+#include <GeomAPI.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Pnt2d.hxx>
+#include <gp_Trsf.hxx>
+#include <gp_Vec.hxx>
#include <IntAna2d_AnaIntersection.hxx>
#include <IntAna2d_IntPoint.hxx>
-
#include <Precision.hxx>
-
+#include <Prs3d_Presentation.hxx>
+#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx>
-
+#include <SelectMgr_Selection.hxx>
+#include <Standard_NotImplemented.hxx>
+#include <Standard_Type.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
+#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
-#include <gce_MakeDir.hxx>
-
-#include <gp_Pln.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Pnt2d.hxx>
-#include <gp_Trsf.hxx>
-#include <gp_Vec.hxx>
-#include <Geom_Ellipse.hxx>
-
//=======================================================================
//function : Constructor
//purpose : TwoEdgesPerpendicular
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
-void AIS_PerpendicularRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
+void AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
-// Standard_NotImplemented::Raise("AIS_PerpendicularRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
+// Standard_NotImplemented::Raise("AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
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;