File indexing completed on 2026-09-26 09:04:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _PrsDim_MidPointRelation_HeaderFile
0017 #define _PrsDim_MidPointRelation_HeaderFile
0018
0019 #include <PrsDim_Relation.hxx>
0020
0021 class Geom_Plane;
0022 class gp_Lin;
0023 class gp_Circ;
0024 class gp_Elips;
0025
0026
0027 class PrsDim_MidPointRelation : public PrsDim_Relation
0028 {
0029 DEFINE_STANDARD_RTTIEXT(PrsDim_MidPointRelation, PrsDim_Relation)
0030 public:
0031 Standard_EXPORT PrsDim_MidPointRelation(const TopoDS_Shape& aSymmTool,
0032 const TopoDS_Shape& FirstShape,
0033 const TopoDS_Shape& SecondShape,
0034 const occ::handle<Geom_Plane>& aPlane);
0035
0036 bool IsMovable() const override { return true; }
0037
0038 void SetTool(const TopoDS_Shape& aMidPointTool) { myTool = aMidPointTool; }
0039
0040 const TopoDS_Shape& GetTool() const { return myTool; }
0041
0042 private:
0043 Standard_EXPORT void Compute(const occ::handle<PrsMgr_PresentationManager>& thePrsMgr,
0044 const occ::handle<Prs3d_Presentation>& thePrs,
0045 const int theMode) override;
0046
0047 Standard_EXPORT void ComputeSelection(const occ::handle<SelectMgr_Selection>& theSel,
0048 const int theMode) override;
0049
0050 Standard_EXPORT void ComputeFaceFromPnt(const occ::handle<Prs3d_Presentation>& aprs,
0051 const bool first);
0052
0053 Standard_EXPORT void ComputeEdgeFromPnt(const occ::handle<Prs3d_Presentation>& aprs,
0054 const bool first);
0055
0056 Standard_EXPORT void ComputeVertexFromPnt(const occ::handle<Prs3d_Presentation>& aprs,
0057 const bool first);
0058
0059 Standard_EXPORT void ComputePointsOnLine(const gp_Lin& aLin, const bool first);
0060
0061 Standard_EXPORT void ComputePointsOnLine(const gp_Pnt& pnt1,
0062 const gp_Pnt& pnt2,
0063 const bool first);
0064
0065 Standard_EXPORT void ComputePointsOnCirc(const gp_Circ& aCirc,
0066 const gp_Pnt& pnt1,
0067 const gp_Pnt& pnt2,
0068 const bool first);
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082 Standard_EXPORT void ComputePointsOnElips(const gp_Elips& anEll,
0083 const gp_Pnt& pnt1,
0084 const gp_Pnt& pnt2,
0085 const bool first);
0086
0087 private:
0088 TopoDS_Shape myTool;
0089 gp_Pnt myMidPoint;
0090 gp_Pnt myFAttach;
0091 gp_Pnt myFirstPnt1;
0092 gp_Pnt myFirstPnt2;
0093 gp_Pnt mySAttach;
0094 gp_Pnt mySecondPnt1;
0095 gp_Pnt mySecondPnt2;
0096 };
0097
0098 #endif