0031456: Visualization - move out Dimensions and Relations from package AIS to PrsDims
[occt.git] / src / PrsDim / PrsDim_SymmetricRelation.cxx
similarity index 94%
rename from src/AIS/AIS_SymmetricRelation.cxx
rename to src/PrsDim/PrsDim_SymmetricRelation.cxx
index 336480c..e0e882c 100644 (file)
@@ -14,9 +14,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <PrsDim_SymmetricRelation.hxx>
 
-#include <AIS.hxx>
-#include <AIS_SymmetricRelation.hxx>
+#include <PrsDim.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepAdaptor_Surface.hxx>
@@ -26,7 +26,6 @@
 #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 <gp_Circ.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Selection.hxx>
 #include <Standard_NotImplemented.hxx>
-#include <Standard_Type.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Shape.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(AIS_SymmetricRelation,AIS_Relation)
+IMPLEMENT_STANDARD_RTTIEXT(PrsDim_SymmetricRelation, PrsDim_Relation)
 
 //=======================================================================
-//function : AIS_SymmetricRelation
+//function : PrsDim_SymmetricRelation
 //purpose  : 
 //=======================================================================
-AIS_SymmetricRelation::AIS_SymmetricRelation(const TopoDS_Shape& aSymmTool, 
+PrsDim_SymmetricRelation::PrsDim_SymmetricRelation(const TopoDS_Shape& aSymmTool, 
                                             const TopoDS_Shape& FirstShape, 
                                             const TopoDS_Shape& SecondShape, 
                                             const Handle(Geom_Plane)& aPlane)
-:AIS_Relation(),
+:PrsDim_Relation(),
  myTool(aSymmTool)
 {
  SetFirstShape(FirstShape);
@@ -71,7 +69,7 @@ AIS_SymmetricRelation::AIS_SymmetricRelation(const TopoDS_Shape& aSymmTool,
 //function : Compute
 //purpose  : 
 //=======================================================================
-void AIS_SymmetricRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&, 
+void PrsDim_SymmetricRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&, 
                                    const Handle(Prs3d_Presentation)& aprs, 
                                    const Standard_Integer)
 {
@@ -101,7 +99,7 @@ void AIS_SymmetricRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
     Handle(Geom_Curve) aCurve,extcurve;
     gp_Pnt p1,p2;
     Standard_Boolean isinfinite,isonplane;
-    if (AIS::ComputeGeometry(TopoDS::Edge(myTool),
+    if (PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                             aCurve,p1,p2,
                             extcurve,
                             isinfinite,
@@ -124,7 +122,7 @@ void AIS_SymmetricRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
 //function : ComputeSelection
 //purpose  : 
 //=======================================================================
-void AIS_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aSel, 
+void PrsDim_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aSel, 
                                             const Standard_Integer)
 {
   Handle(Select3D_SensitiveSegment) seg;
@@ -134,7 +132,7 @@ void AIS_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
   Handle(Geom_Curve) geom_axis, extcurve;
   gp_Pnt p1,p2;
   Standard_Boolean isinfinite,isonplane;
-  if (!AIS::ComputeGeometry(TopoDS::Edge(myTool),
+  if (!PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                            geom_axis,p1,p2,
                            extcurve,
                            isinfinite,
@@ -346,7 +344,7 @@ void AIS_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
 //function : ComputeTwoFacesSymmetric
 //purpose  : 
 //=======================================================================
-void AIS_SymmetricRelation::ComputeTwoFacesSymmetric(const Handle(Prs3d_Presentation)&)
+void PrsDim_SymmetricRelation::ComputeTwoFacesSymmetric(const Handle(Prs3d_Presentation)&)
 {
 }
 
@@ -354,7 +352,7 @@ void AIS_SymmetricRelation::ComputeTwoFacesSymmetric(const Handle(Prs3d_Presenta
 //function : ComputeTwoEdgesSymmetric
 //purpose  : 
 //=======================================================================
-void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presentation)& aprs)
+void PrsDim_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presentation)& aprs)
 {
   BRepAdaptor_Curve cu1(TopoDS::Edge(myFShape));
   if (cu1.GetType() != GeomAbs_Line && cu1.GetType() != GeomAbs_Circle) return;
@@ -365,7 +363,7 @@ void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presenta
   Handle(Geom_Curve) geom1,geom2;
   Standard_Boolean isInfinite1,isInfinite2;
   Handle(Geom_Curve) extCurv;
-  if (!AIS::ComputeGeometry(TopoDS::Edge(myFShape),
+  if (!PrsDim::ComputeGeometry(TopoDS::Edge(myFShape),
                            TopoDS::Edge(mySShape),
                            myExtShape,
                            geom1,
@@ -383,7 +381,7 @@ void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presenta
   Handle(Geom_Curve) geom_axis,extcurve;
   gp_Pnt p1,p2;
   Standard_Boolean isinfinite,isonplane;
-  if (!AIS::ComputeGeometry(TopoDS::Edge(myTool),
+  if (!PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                            geom_axis,p1,p2,
                            extcurve,
                            isinfinite,
@@ -554,13 +552,13 @@ void AIS_SymmetricRelation::ComputeTwoEdgesSymmetric(const Handle(Prs3d_Presenta
 //function : ComputeTwoVertexsSymmetric
 //purpose  : 
 //=======================================================================
-void AIS_SymmetricRelation::ComputeTwoVerticesSymmetric(const Handle(Prs3d_Presentation)& aprs)
+void PrsDim_SymmetricRelation::ComputeTwoVerticesSymmetric(const Handle(Prs3d_Presentation)& aprs)
 {
   if(myFShape.ShapeType() != TopAbs_VERTEX || mySShape.ShapeType() != TopAbs_VERTEX) return;
   Handle(Geom_Curve) geom_axis,extcurve;
   gp_Pnt p1,p2;
   Standard_Boolean isinfinite,isonplane;
-  if (!AIS::ComputeGeometry(TopoDS::Edge(myTool),
+  if (!PrsDim::ComputeGeometry(TopoDS::Edge(myTool),
                            geom_axis,p1,p2,
                            extcurve,
                            isinfinite,
@@ -569,8 +567,8 @@ void AIS_SymmetricRelation::ComputeTwoVerticesSymmetric(const Handle(Prs3d_Prese
 
   Standard_Boolean isOnPlane1, isOnPlane2;
 
-  AIS::ComputeGeometry(TopoDS::Vertex(myFShape), myFAttach, myPlane, isOnPlane1);
-  AIS::ComputeGeometry(TopoDS::Vertex(mySShape), mySAttach, myPlane, isOnPlane2);
+  PrsDim::ComputeGeometry(TopoDS::Vertex(myFShape), myFAttach, myPlane, isOnPlane1);
+  PrsDim::ComputeGeometry(TopoDS::Vertex(mySShape), mySAttach, myPlane, isOnPlane2);
 
   if( !myArrowSizeIsDefined )
     myArrowSize = myFAttach.Distance(mySAttach)/50.;