Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:41

0001 // Created on: 2000-10-20
0002 // Created by: Julia DOROVSKIKH
0003 // Copyright (c) 2000-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
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 DEFINE_STANDARD_HANDLE(PrsDim_MidPointRelation, PrsDim_Relation)
0027 
0028 //! presentation of equal distance to point myMidPoint
0029 class PrsDim_MidPointRelation : public PrsDim_Relation
0030 {
0031   DEFINE_STANDARD_RTTIEXT(PrsDim_MidPointRelation, PrsDim_Relation)
0032 public:
0033 
0034   Standard_EXPORT PrsDim_MidPointRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
0035 
0036   virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
0037 
0038   void SetTool (const TopoDS_Shape& aMidPointTool) { myTool = aMidPointTool; }
0039 
0040   const TopoDS_Shape& GetTool() const { return myTool; }
0041 
0042 private:
0043 
0044   Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0045                                         const Handle(Prs3d_Presentation)& thePrs,
0046                                         const Standard_Integer theMode) Standard_OVERRIDE;
0047 
0048   Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0049                                                  const Standard_Integer theMode) Standard_OVERRIDE;
0050 
0051   Standard_EXPORT void ComputeFaceFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
0052 
0053   Standard_EXPORT void ComputeEdgeFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
0054 
0055   Standard_EXPORT void ComputeVertexFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
0056 
0057   Standard_EXPORT void ComputePointsOnLine (const gp_Lin& aLin, const Standard_Boolean first);
0058 
0059   Standard_EXPORT void ComputePointsOnLine (const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
0060 
0061   Standard_EXPORT void ComputePointsOnCirc (const gp_Circ& aCirc, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
0062 
0063   //! ComputePointsOn... methods set myFAttach, myFirstPnt and myLastPnt
0064   //! from the following initial data: curve, end points, myMidPoint.
0065   //! End points (pnt1 & pnt2) and curve define the trimmed curve.
0066   //! If end points are equal, curve is not trimmed (line - special case).
0067   //!
0068   //! .------. pnt2
0069   //! /        
0070   //! .  circle  . myLastPnt
0071   //! |          |
0072   //! . pnt1     . myFAttach
0073   //! \   arc  /          . myMidPoint
0074   //! .______. myFirstPnt
0075   Standard_EXPORT void ComputePointsOnElips (const gp_Elips& anEll, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
0076 
0077 private:
0078 
0079   TopoDS_Shape myTool;
0080   gp_Pnt myMidPoint;
0081   gp_Pnt myFAttach;
0082   gp_Pnt myFirstPnt1;
0083   gp_Pnt myFirstPnt2;
0084   gp_Pnt mySAttach;
0085   gp_Pnt mySecondPnt1;
0086   gp_Pnt mySecondPnt2;
0087 
0088 };
0089 
0090 #endif // _AIS_MidPointRelation_HeaderFile