Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:03

0001 // Created on: 2004-09-03
0002 // Created by: Oleg FEDYAEV
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 _BOPAlgo_CheckResult_HeaderFile
0017 #define _BOPAlgo_CheckResult_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <TopoDS_Shape.hxx>
0024 #include <BOPAlgo_CheckStatus.hxx>
0025 #include <TopTools_ListOfShape.hxx>
0026 
0027 
0028 //! contains information about faulty shapes and faulty types
0029 //! can't be processed by Boolean Operations
0030 class BOPAlgo_CheckResult 
0031 {
0032 public:
0033 
0034   DEFINE_STANDARD_ALLOC
0035 
0036   
0037   //! empty constructor
0038   Standard_EXPORT BOPAlgo_CheckResult();
0039   
0040   //! sets ancestor shape (object) for faulty sub-shapes
0041   Standard_EXPORT void SetShape1 (const TopoDS_Shape& TheShape);
0042   
0043   //! adds faulty sub-shapes from object to a list
0044   Standard_EXPORT void AddFaultyShape1 (const TopoDS_Shape& TheShape);
0045   
0046   //! sets ancestor shape (tool) for faulty sub-shapes
0047   Standard_EXPORT void SetShape2 (const TopoDS_Shape& TheShape);
0048   
0049   //! adds faulty sub-shapes from tool to a list
0050   Standard_EXPORT void AddFaultyShape2 (const TopoDS_Shape& TheShape);
0051   
0052   //! returns ancestor shape (object) for faulties
0053   Standard_EXPORT const TopoDS_Shape& GetShape1() const;
0054   
0055   //! returns ancestor shape (tool) for faulties
0056   Standard_EXPORT const TopoDS_Shape& GetShape2() const;
0057   
0058   //! returns list of faulty shapes for object
0059   Standard_EXPORT const TopTools_ListOfShape& GetFaultyShapes1() const;
0060   
0061   //! returns list of faulty shapes for tool
0062   Standard_EXPORT const TopTools_ListOfShape& GetFaultyShapes2() const;
0063   
0064   //! set status of faulty
0065   Standard_EXPORT void SetCheckStatus (const BOPAlgo_CheckStatus TheStatus);
0066   
0067   //! gets status of faulty
0068   Standard_EXPORT BOPAlgo_CheckStatus GetCheckStatus() const;
0069   
0070   //! Sets max distance for the first shape
0071   Standard_EXPORT void SetMaxDistance1 (const Standard_Real theDist);
0072   
0073   //! Sets max distance for the second shape
0074   Standard_EXPORT void SetMaxDistance2 (const Standard_Real theDist);
0075   
0076   //! Sets the parameter for the first shape
0077   Standard_EXPORT void SetMaxParameter1 (const Standard_Real thePar);
0078   
0079   //! Sets the parameter for the second shape
0080   Standard_EXPORT void SetMaxParameter2 (const Standard_Real thePar);
0081   
0082   //! Returns the distance for the first shape
0083   Standard_EXPORT Standard_Real GetMaxDistance1() const;
0084   
0085   //! Returns the distance for the second shape
0086   Standard_EXPORT Standard_Real GetMaxDistance2() const;
0087   
0088   //! Returns the parameter for the fircst shape
0089   Standard_EXPORT Standard_Real GetMaxParameter1() const;
0090   
0091   //! Returns the parameter for the second shape
0092   Standard_EXPORT Standard_Real GetMaxParameter2() const;
0093 
0094 
0095 
0096 
0097 protected:
0098 
0099 
0100 
0101 
0102 
0103 private:
0104 
0105 
0106 
0107   TopoDS_Shape myShape1;
0108   TopoDS_Shape myShape2;
0109   BOPAlgo_CheckStatus myStatus;
0110   TopTools_ListOfShape myFaulty1;
0111   TopTools_ListOfShape myFaulty2;
0112   Standard_Real myMaxDist1;
0113   Standard_Real myMaxDist2;
0114   Standard_Real myMaxPar1;
0115   Standard_Real myMaxPar2;
0116 
0117 
0118 };
0119 
0120 
0121 
0122 
0123 
0124 
0125 
0126 #endif // _BOPAlgo_CheckResult_HeaderFile