Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-31 08:31:03

0001 // Created on: 1998-01-22
0002 // Created by: Sergey ZARITCHNY
0003 // Copyright (c) 1998-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_EllipseRadiusDimension_HeaderFile
0018 #define _PrsDim_EllipseRadiusDimension_HeaderFile
0019 
0020 #include <gp_Elips.hxx>
0021 #include <PrsDim_Relation.hxx>
0022 #include <PrsDim_KindOfSurface.hxx>
0023 
0024 class Geom_OffsetCurve;
0025 class TopoDS_Shape;
0026 class TCollection_ExtendedString;
0027 class Geom_Surface;
0028 
0029 DEFINE_STANDARD_HANDLE(PrsDim_EllipseRadiusDimension, PrsDim_Relation)
0030 
0031 //! Computes  geometry  (  basis  curve  and  plane  of  dimension)
0032 //! for  input  shape  aShape  from  TopoDS
0033 //! Root  class  for MinRadiusDimension  and  MaxRadiusDimension
0034 class PrsDim_EllipseRadiusDimension : public PrsDim_Relation
0035 {
0036   DEFINE_STANDARD_RTTIEXT(PrsDim_EllipseRadiusDimension, PrsDim_Relation)
0037 public:
0038   virtual PrsDim_KindOfDimension KindOfDimension() const Standard_OVERRIDE
0039   {
0040     return PrsDim_KOD_ELLIPSERADIUS;
0041   }
0042 
0043   virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
0044 
0045   Standard_EXPORT void ComputeGeometry();
0046 
0047 protected:
0048   Standard_EXPORT PrsDim_EllipseRadiusDimension(const TopoDS_Shape&               aShape,
0049                                                 const TCollection_ExtendedString& aText);
0050 
0051 protected:
0052   gp_Elips                 myEllipse;
0053   Standard_Real            myFirstPar;
0054   Standard_Real            myLastPar;
0055   Standard_Boolean         myIsAnArc;
0056   Handle(Geom_OffsetCurve) myOffsetCurve;
0057   Standard_Real            myOffset;
0058   Standard_Boolean         myIsOffset;
0059 
0060 private:
0061   Standard_EXPORT void ComputeFaceGeometry();
0062 
0063   Standard_EXPORT void ComputeCylFaceGeometry(const PrsDim_KindOfSurface  aSurfType,
0064                                               const Handle(Geom_Surface)& aSurf,
0065                                               const Standard_Real         Offset);
0066 
0067   Standard_EXPORT void ComputePlanarFaceGeometry();
0068 
0069   Standard_EXPORT void ComputeEdgeGeometry();
0070 };
0071 
0072 #endif // _PrsDim_EllipseRadiusDimension_HeaderFile