Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-15 10:23:28

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 //! A framework to define a constraint by a relation of
0026 //! concentricity between two or more interactive datums.
0027 //! The display of this constraint is also defined.
0028 //! A plane is used to create an axis along which the
0029 //! relation of concentricity can be extended.
0030 class PrsDim_ConcentricRelation : public PrsDim_Relation
0031 {
0032   DEFINE_STANDARD_RTTIEXT(PrsDim_ConcentricRelation, PrsDim_Relation)
0033 public:
0034   //! Constructs the display object for concentric relations
0035   //! between shapes.
0036   //! This object is defined by the two shapes, aFShape
0037   //! and aSShape and the plane aPlane.
0038   //! aPlane is provided to create an axis along which the
0039   //! relation of concentricity can be extended.
0040   Standard_EXPORT PrsDim_ConcentricRelation(const TopoDS_Shape&            aFShape,
0041                                             const TopoDS_Shape&            aSShape,
0042                                             const occ::handle<Geom_Plane>& aPlane);
0043 
0044 private:
0045   Standard_EXPORT void Compute(const occ::handle<PrsMgr_PresentationManager>& thePrsMgr,
0046                                const occ::handle<Prs3d_Presentation>&         thePrs,
0047                                const int                                      theMode) override;
0048 
0049   Standard_EXPORT void ComputeTwoEdgesConcentric(const occ::handle<Prs3d_Presentation>& thePrsMgr);
0050 
0051   Standard_EXPORT void ComputeEdgeVertexConcentric(
0052     const occ::handle<Prs3d_Presentation>& thePrsMgr);
0053 
0054   Standard_EXPORT void ComputeTwoVerticesConcentric(
0055     const occ::handle<Prs3d_Presentation>& thePrsMgr);
0056 
0057   Standard_EXPORT void ComputeSelection(const occ::handle<SelectMgr_Selection>& theSel,
0058                                         const int                               theMode) override;
0059 
0060 private:
0061   gp_Pnt myCenter;
0062   double myRad;
0063   gp_Dir myDir;
0064   gp_Pnt myPnt;
0065 };
0066 
0067 #endif // _PrsDim_ConcentricRelation_HeaderFile