Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-27 10:39:18

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 //! Computes geometry (basis curve and plane of dimension)
0030 //! for input shape aShape from TopoDS
0031 //! Root class for MinRadiusDimension and MaxRadiusDimension
0032 class PrsDim_EllipseRadiusDimension : public PrsDim_Relation
0033 {
0034   DEFINE_STANDARD_RTTIEXT(PrsDim_EllipseRadiusDimension, PrsDim_Relation)
0035 public:
0036   PrsDim_KindOfDimension KindOfDimension() const override { return PrsDim_KOD_ELLIPSERADIUS; }
0037 
0038   bool IsMovable() const override { return true; }
0039 
0040   Standard_EXPORT void ComputeGeometry();
0041 
0042 protected:
0043   Standard_EXPORT PrsDim_EllipseRadiusDimension(const TopoDS_Shape&               aShape,
0044                                                 const TCollection_ExtendedString& aText);
0045 
0046 protected:
0047   gp_Elips                      myEllipse;
0048   double                        myFirstPar;
0049   double                        myLastPar;
0050   bool                          myIsAnArc;
0051   occ::handle<Geom_OffsetCurve> myOffsetCurve;
0052   double                        myOffset;
0053   bool                          myIsOffset;
0054 
0055 private:
0056   Standard_EXPORT void ComputeFaceGeometry();
0057 
0058   Standard_EXPORT void ComputeCylFaceGeometry(const PrsDim_KindOfSurface       aSurfType,
0059                                               const occ::handle<Geom_Surface>& aSurf,
0060                                               const double                     Offset);
0061 
0062   Standard_EXPORT void ComputePlanarFaceGeometry();
0063 
0064   Standard_EXPORT void ComputeEdgeGeometry();
0065 };
0066 
0067 #endif // _PrsDim_EllipseRadiusDimension_HeaderFile