1 // Created on: 2000-10-20
2 // Created by: Julia DOROVSKIKH
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _PrsDim_MidPointRelation_HeaderFile
17 #define _PrsDim_MidPointRelation_HeaderFile
19 #include <PrsDim_Relation.hxx>
27 DEFINE_STANDARD_HANDLE(PrsDim_MidPointRelation, PrsDim_Relation)
29 //! presentation of equal distance to point myMidPoint
30 class PrsDim_MidPointRelation : public PrsDim_Relation
32 DEFINE_STANDARD_RTTIEXT(PrsDim_MidPointRelation, PrsDim_Relation)
35 Standard_EXPORT PrsDim_MidPointRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
37 virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
39 void SetTool (const TopoDS_Shape& aMidPointTool) { myTool = aMidPointTool; }
41 const TopoDS_Shape& GetTool() const { return myTool; }
45 Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
47 Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
49 Standard_EXPORT void ComputeFaceFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
51 Standard_EXPORT void ComputeEdgeFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
53 Standard_EXPORT void ComputeVertexFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
55 Standard_EXPORT void ComputePointsOnLine (const gp_Lin& aLin, const Standard_Boolean first);
57 Standard_EXPORT void ComputePointsOnLine (const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
59 Standard_EXPORT void ComputePointsOnCirc (const gp_Circ& aCirc, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
61 //! ComputePointsOn... methods set myFAttach, myFirstPnt and myLastPnt
62 //! from the following initial data: curve, end points, myMidPoint.
63 //! End points (pnt1 & pnt2) and curve define the trimmed curve.
64 //! If end points are equal, curve is not trimmed (line - special case).
68 //! . circle . myLastPnt
70 //! . pnt1 . myFAttach
71 //! \ arc / . myMidPoint
72 //! .______. myFirstPnt
73 Standard_EXPORT void ComputePointsOnElips (const gp_Elips& anEll, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
88 #endif // _AIS_MidPointRelation_HeaderFile