Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:18:40

0001 // Created on: 2015-08-06
0002 // Created by: Ilya Novikov
0003 // Copyright (c) 2004-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _XCAFDimTolObjects_Tool_HeaderFile
0017 #define _XCAFDimTolObjects_Tool_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <XCAFDoc_DimTolTool.hxx>
0023 #include <TDocStd_Document.hxx>
0024 #include <Standard_Boolean.hxx>
0025 #include <XCAFDimTolObjects_DimensionObjectSequence.hxx>
0026 #include <XCAFDimTolObjects_GeomToleranceObjectSequence.hxx>
0027 #include <XCAFDimTolObjects_DatumObjectSequence.hxx>
0028 #include <XCAFDimTolObjects_DataMapOfToleranceDatum.hxx>
0029 #include <XCAFDimTolObjects_DatumObject.hxx>
0030 class TDocStd_Document;
0031 class TopoDS_Shape;
0032 
0033 class XCAFDimTolObjects_Tool
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   Standard_EXPORT XCAFDimTolObjects_Tool(const Handle(TDocStd_Document)& theDoc);
0039 
0040   //! Returns a sequence of Dimensions currently stored
0041   //! in the GD&T table
0042   Standard_EXPORT void GetDimensions(
0043     XCAFDimTolObjects_DimensionObjectSequence& theDimensionObjectSequence) const;
0044 
0045   //! Returns all Dimensions defined for Shape
0046   Standard_EXPORT Standard_Boolean
0047     GetRefDimensions(const TopoDS_Shape&                        theShape,
0048                      XCAFDimTolObjects_DimensionObjectSequence& theDimensions) const;
0049 
0050   //! Returns a sequence of Tolerances currently stored
0051   //! in the GD&T table
0052   Standard_EXPORT void GetGeomTolerances(
0053     XCAFDimTolObjects_GeomToleranceObjectSequence& theGeomToleranceObjectSequence,
0054     XCAFDimTolObjects_DatumObjectSequence&         theDatumObjectSequence,
0055     XCAFDimTolObjects_DataMapOfToleranceDatum&     theMap) const;
0056 
0057   //! Returns all GeomTolerances defined for Shape
0058   Standard_EXPORT Standard_Boolean GetRefGeomTolerances(
0059     const TopoDS_Shape&                            theShape,
0060     XCAFDimTolObjects_GeomToleranceObjectSequence& theGeomToleranceObjectSequence,
0061     XCAFDimTolObjects_DatumObjectSequence&         theDatumObjectSequence,
0062     XCAFDimTolObjects_DataMapOfToleranceDatum&     theMap) const;
0063 
0064   //! Returns DatumObject defined for Shape
0065   Standard_EXPORT Standard_Boolean
0066     GetRefDatum(const TopoDS_Shape&                    theShape,
0067                 Handle(XCAFDimTolObjects_DatumObject)& theDatum) const;
0068 
0069 private:
0070   Handle(XCAFDoc_DimTolTool) myDimTolTool;
0071 };
0072 
0073 #endif // _XCAFDimTolObjects_Tool_HeaderFile