Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1996-12-05
0002 // Created by: Flore Lantheaume/Odile Olivier
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _PrsDim_ConcentricRelation_HeaderFile
0018 #define _PrsDim_ConcentricRelation_HeaderFile
0019 
0020 #include <PrsDim_Relation.hxx>
0021 #include <gp_Dir.hxx>
0022 
0023 class Geom_Plane;
0024 
0025 DEFINE_STANDARD_HANDLE(PrsDim_ConcentricRelation, PrsDim_Relation)
0026 
0027 //! A framework to define a constraint by a relation of
0028 //! concentricity between two or more interactive datums.
0029 //! The display of this constraint is also defined.
0030 //! A plane is used to create an axis along which the
0031 //! relation of concentricity can be extended.
0032 class PrsDim_ConcentricRelation : public PrsDim_Relation
0033 {
0034   DEFINE_STANDARD_RTTIEXT(PrsDim_ConcentricRelation, PrsDim_Relation)
0035 public:
0036 
0037   //! Constructs the display object for concentric relations
0038   //! between shapes.
0039   //! This object is defined by the two shapes, aFShape
0040   //! and aSShape and the plane aPlane.
0041   //! aPlane is provided to create an axis along which the
0042   //! relation of concentricity can be extended.
0043   Standard_EXPORT PrsDim_ConcentricRelation(const TopoDS_Shape& aFShape, const TopoDS_Shape& aSShape, const Handle(Geom_Plane)& aPlane);
0044 
0045 private:
0046 
0047   Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0048                                         const Handle(Prs3d_Presentation)& thePrs,
0049                                         const Standard_Integer theMode) Standard_OVERRIDE;
0050 
0051   Standard_EXPORT void ComputeTwoEdgesConcentric (const Handle(Prs3d_Presentation)& thePrsMgr);
0052 
0053   Standard_EXPORT void ComputeEdgeVertexConcentric (const Handle(Prs3d_Presentation)& thePrsMgr);
0054 
0055   Standard_EXPORT void ComputeTwoVerticesConcentric (const Handle(Prs3d_Presentation)& thePrsMgr);
0056 
0057   Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0058                                                  const Standard_Integer theMode) Standard_OVERRIDE;
0059 
0060 private:
0061 
0062   gp_Pnt myCenter;
0063   Standard_Real myRad;
0064   gp_Dir myDir;
0065   gp_Pnt myPnt;
0066 
0067 };
0068 
0069 #endif // _PrsDim_ConcentricRelation_HeaderFile