// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <Standard_NotImplemented.hxx>
-#include <AIS_SymmetricRelation.ixx>
#include <AIS.hxx>
-
-#include <gce_MakeLin.hxx>
-#include <SelectMgr_EntityOwner.hxx>
-#include <Select3D_SensitiveSegment.hxx>
-#include <Select3D_SensitiveBox.hxx>
-#include <Precision.hxx>
-#include <TopoDS.hxx>
+#include <AIS_SymmetricRelation.hxx>
#include <BRep_Tool.hxx>
-#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_Curve.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Circ.hxx>
-#include <gp_Pnt.hxx>
+#include <BRepAdaptor_Surface.hxx>
+#include <DsgPrs_SymmetricPresentation.hxx>
#include <ElCLib.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Dir.hxx>
+#include <gce_MakeLin.hxx>
+#include <Geom_Circle.hxx>
+#include <Geom_Line.hxx>
+#include <Geom_Plane.hxx>
+#include <Geom_Transformation.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
-
-#include <Geom_Plane.hxx>
-#include <Geom_Line.hxx>
-#include <Geom_Circle.hxx>
-#include <TopExp_Explorer.hxx>
-
+#include <gp_Circ.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
#include <Precision.hxx>
-#include <Prs3d_Drawer.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
-
-#include <DsgPrs_SymmetricPresentation.hxx>
+#include <Prs3d_Drawer.hxx>
+#include <Prs3d_Presentation.hxx>
+#include <Prs3d_Projector.hxx>
+#include <Select3D_SensitiveBox.hxx>
+#include <Select3D_SensitiveSegment.hxx>
+#include <SelectMgr_EntityOwner.hxx>
+#include <SelectMgr_Selection.hxx>
+#include <Standard_NotImplemented.hxx>
+#include <Standard_Type.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
//=======================================================================
//function : AIS_SymmetricRelation
//=======================Pour les arcs======================
if(cu1.GetType() == GeomAbs_Circle) {
- BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);
-// 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;