Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _GEOMImpl_Fillet1d_HeaderFile
00024 #define _GEOMImpl_Fillet1d_HeaderFile
00025
00026 #include <gp_Pnt.hxx>
00027 #include <Geom_Plane.hxx>
00028 #include <Geom2d_Curve.hxx>
00029
00030 #include <TopoDS_Edge.hxx>
00031 #include <TColStd_ListOfReal.hxx>
00032 #include <TColStd_SequenceOfReal.hxx>
00033 #include <TColStd_SequenceOfInteger.hxx>
00034
00035 class GEOMImpl_Fillet1dPoint;
00036
00041 class GEOMImpl_Fillet1d
00042 {
00043 public:
00046 Standard_EXPORT GEOMImpl_Fillet1d(const TopoDS_Edge& theEdge1,
00047 const TopoDS_Edge& theEdge2,
00048 const gp_Pln& thePlane);
00051 Standard_EXPORT Standard_Boolean Perform(const Standard_Real theRadius);
00053 Standard_EXPORT TopoDS_Edge Result(const gp_Pnt& thePoint, TopoDS_Edge& theEdge1, TopoDS_Edge& theEdge2);
00054
00055 private:
00057 void fillPoint(GEOMImpl_Fillet1dPoint*);
00058 void fillDiff(GEOMImpl_Fillet1dPoint*, Standard_Real, Standard_Boolean);
00059 void performNewton(GEOMImpl_Fillet1dPoint*, GEOMImpl_Fillet1dPoint*);
00060 Standard_Boolean processPoint(GEOMImpl_Fillet1dPoint*, GEOMImpl_Fillet1dPoint*, Standard_Real);
00061
00062
00063 private:
00065 TopoDS_Edge myEdge1, myEdge2;
00066 Handle(Geom_Plane) myPlane;
00067 Handle(Geom2d_Curve) myCurve1, myCurve2;
00068 Standard_Real myStart1, myEnd1, myStart2, myEnd2, myRadius;
00069 TColStd_ListOfReal myResultParams;
00070 TColStd_SequenceOfInteger myResultOrientation;
00071 Standard_Boolean myStartSide, myEdgesExchnged;
00072 Standard_Integer myDegreeOfRecursion;
00073 };
00074
00075
00081 class GEOMImpl_Fillet1dPoint
00082 {
00083 public:
00085
00087 Standard_EXPORT GEOMImpl_Fillet1dPoint(Standard_Real theParam)
00088 {myParam = theParam;}
00089
00092 Standard_EXPORT GEOMImpl_Fillet1dPoint* Copy();
00093
00095 Standard_EXPORT inline void SetParam(Standard_Real theParam)
00096 {myParam = theParam;}
00097 Standard_EXPORT inline Standard_Real GetParam() const
00098 {return myParam;}
00099 Standard_EXPORT inline void SetParam2(const Standard_Real theParam2)
00100 {myParam2 = theParam2;}
00101 Standard_EXPORT inline Standard_Real GetParam2()
00102 { return myParam2 ; }
00103
00105 Standard_EXPORT inline Standard_Boolean IsValid(int theIndex)
00106 {return (Standard_Boolean)myValid.Value(theIndex);}
00107
00109 Standard_EXPORT inline Standard_Integer GetNBValues() {return myV.Length();}
00110 Standard_EXPORT inline Standard_Real GetValue(Standard_Integer theIndex)
00111 {return myV.Value(theIndex);}
00112 Standard_EXPORT inline Standard_Real GetDiff(Standard_Integer theIndex)
00113 {return myD.Value(theIndex);}
00114 Standard_EXPORT inline Standard_Integer GetNear(Standard_Integer theIndex)
00115 {return myNear.Value(theIndex);}
00116
00118 Standard_EXPORT inline void SetCenter(const gp_Pnt2d thePoint)
00119 {myCenter = thePoint;}
00120 Standard_EXPORT inline const gp_Pnt2d GetCenter()
00121 {return myCenter;}
00122
00123 Standard_EXPORT void AddValue(Standard_Real theValue, Standard_Boolean theIsValid);
00124
00126 Standard_EXPORT Standard_Boolean ComputeDifference(GEOMImpl_Fillet1dPoint*);
00127 Standard_EXPORT void FilterPoints(GEOMImpl_Fillet1dPoint*);
00128
00130 Standard_EXPORT Standard_Integer HasSolution(Standard_Real theRadius);
00132 void RemoveSolution(Standard_Integer theIndex);
00133
00134 private:
00136 gp_Pnt2d myCenter;
00137 Standard_Real myParam, myParam2;
00138 TColStd_SequenceOfReal myV, myD;
00139 TColStd_SequenceOfInteger myValid, myNear;
00140 };
00141
00142 #endif