Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1996-12-05
0002 // Created by: Jean-Pierre COMBE/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_ParallelRelation_HeaderFile
0018 #define _PrsDim_ParallelRelation_HeaderFile
0019 
0020 #include <PrsDim_Relation.hxx>
0021 #include <DsgPrs_ArrowSide.hxx>
0022 
0023 DEFINE_STANDARD_HANDLE(PrsDim_ParallelRelation, PrsDim_Relation)
0024 
0025 //! A framework to display constraints of parallelism
0026 //! between two or more Interactive Objects. These
0027 //! entities can be faces or edges.
0028 class PrsDim_ParallelRelation : public PrsDim_Relation
0029 {
0030   DEFINE_STANDARD_RTTIEXT(PrsDim_ParallelRelation, PrsDim_Relation)
0031 public:
0032 
0033   
0034   //! Constructs an object to display parallel constraints.
0035   //! This object is defined by the first shape aFShape and
0036   //! the second shape aSShape and the plane aPlane.
0037   Standard_EXPORT PrsDim_ParallelRelation(const TopoDS_Shape& aFShape, const TopoDS_Shape& aSShape, const Handle(Geom_Plane)& aPlane);
0038   
0039   //! Constructs an object to display parallel constraints.
0040   //! This object is defined by the first shape aFShape and
0041   //! the second shape aSShape the plane aPlane, the
0042   //! position aPosition, the type of arrow, aSymbolPrs and
0043   //! its size anArrowSize.
0044   Standard_EXPORT PrsDim_ParallelRelation(const TopoDS_Shape& aFShape, const TopoDS_Shape& aSShape, const Handle(Geom_Plane)& aPlane, const gp_Pnt& aPosition, const DsgPrs_ArrowSide aSymbolPrs, const Standard_Real anArrowSize = 0.01);
0045   
0046   //! Returns true if the parallelism is movable.
0047   virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
0048 
0049 private:
0050 
0051   Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0052                                         const Handle(Prs3d_Presentation)& thePrs,
0053                                         const Standard_Integer theMode) Standard_OVERRIDE;
0054 
0055   Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0056                                                  const Standard_Integer theMode) Standard_OVERRIDE;
0057 
0058   Standard_EXPORT void ComputeTwoFacesParallel (const Handle(Prs3d_Presentation)& aPresentation);
0059 
0060   Standard_EXPORT void ComputeTwoEdgesParallel (const Handle(Prs3d_Presentation)& aPresentation);
0061 
0062 private:
0063 
0064   gp_Pnt myFAttach;
0065   gp_Pnt mySAttach;
0066   gp_Dir myDirAttach;
0067 
0068 };
0069 
0070 #endif // _PrsDim_ParallelRelation_HeaderFile