|
||||
File indexing completed on 2025-01-18 10:04:56
0001 // Created on: 1998-08-12 0002 // Created by: Galina KULIKOVA 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 _ShapeFix_Shell_HeaderFile 0018 #define _ShapeFix_Shell_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <TopoDS_Shell.hxx> 0023 #include <TopoDS_Compound.hxx> 0024 #include <ShapeFix_Root.hxx> 0025 #include <ShapeExtend_Status.hxx> 0026 #include <Message_ProgressRange.hxx> 0027 0028 class ShapeFix_Face; 0029 class ShapeExtend_BasicMsgRegistrator; 0030 0031 // resolve name collisions with X11 headers 0032 #ifdef Status 0033 #undef Status 0034 #endif 0035 0036 class ShapeFix_Shell; 0037 DEFINE_STANDARD_HANDLE(ShapeFix_Shell, ShapeFix_Root) 0038 0039 //! Fixing orientation of faces in shell 0040 class ShapeFix_Shell : public ShapeFix_Root 0041 { 0042 0043 public: 0044 0045 0046 //! Empty constructor 0047 Standard_EXPORT ShapeFix_Shell(); 0048 0049 //! Initializes by shell. 0050 Standard_EXPORT ShapeFix_Shell(const TopoDS_Shell& shape); 0051 0052 //! Initializes by shell. 0053 Standard_EXPORT void Init (const TopoDS_Shell& shell); 0054 0055 //! Iterates on subshapes and performs fixes 0056 //! (for each face calls ShapeFix_Face::Perform and 0057 //! then calls FixFaceOrientation). The passed progress 0058 //! indicator allows user to consult the current progress 0059 //! stage and abort algorithm if needed. 0060 Standard_EXPORT Standard_Boolean Perform (const Message_ProgressRange& theProgress = Message_ProgressRange()); 0061 0062 //! Fixes orientation of faces in shell. 0063 //! Changes orientation of face in the shell, if it is oriented opposite 0064 //! to neighbouring faces. If it is not possible to orient all faces in the 0065 //! shell (like in case of mebious band), this method orients only subset 0066 //! of faces. Other faces are stored in Error compound. 0067 //! Modes : 0068 //! isAccountMultiConex - mode for account cases of multiconnexity. 0069 //! If this mode is equal to Standard_True, separate shells will be created 0070 //! in the cases of multiconnexity. If this mode is equal to Standard_False, 0071 //! one shell will be created without account of multiconnexity.By defautt - Standard_True; 0072 //! NonManifold - mode for creation of non-manifold shells. 0073 //! If this mode is equal to Standard_True one non-manifold will be created from shell 0074 //! contains multishared edges. Else if this mode is equal to Standard_False only 0075 //! manifold shells will be created. By default - Standard_False. 0076 Standard_EXPORT Standard_Boolean FixFaceOrientation ( 0077 const TopoDS_Shell& shell, 0078 const Standard_Boolean isAccountMultiConex = Standard_True, 0079 const Standard_Boolean NonManifold = Standard_False); 0080 0081 //! Returns fixed shell (or subset of oriented faces). 0082 Standard_EXPORT TopoDS_Shell Shell(); 0083 0084 //! In case of multiconnexity returns compound of fixed shells 0085 //! else returns one shell.. 0086 Standard_EXPORT TopoDS_Shape Shape(); 0087 0088 //! Returns Number of obtainrd shells; 0089 Standard_EXPORT Standard_Integer NbShells() const; 0090 0091 //! Returns not oriented subset of faces. 0092 Standard_EXPORT TopoDS_Compound ErrorFaces() const; 0093 0094 //! Returns the status of the last Fix. 0095 Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const; 0096 0097 //! Returns tool for fixing faces. 0098 Handle(ShapeFix_Face) FixFaceTool(); 0099 0100 //! Sets message registrator 0101 Standard_EXPORT virtual void SetMsgRegistrator (const Handle(ShapeExtend_BasicMsgRegistrator)& msgreg) Standard_OVERRIDE; 0102 0103 //! Sets basic precision value (also to FixWireTool) 0104 Standard_EXPORT virtual void SetPrecision (const Standard_Real preci) Standard_OVERRIDE; 0105 0106 //! Sets minimal allowed tolerance (also to FixWireTool) 0107 Standard_EXPORT virtual void SetMinTolerance (const Standard_Real mintol) Standard_OVERRIDE; 0108 0109 //! Sets maximal allowed tolerance (also to FixWireTool) 0110 Standard_EXPORT virtual void SetMaxTolerance (const Standard_Real maxtol) Standard_OVERRIDE; 0111 0112 //! Returns (modifiable) the mode for applying fixes of 0113 //! ShapeFix_Face, by default True. 0114 Standard_Integer& FixFaceMode(); 0115 0116 //! Returns (modifiable) the mode for applying 0117 //! FixFaceOrientation, by default True. 0118 Standard_Integer& FixOrientationMode(); 0119 0120 //! Sets NonManifold flag 0121 Standard_EXPORT virtual void SetNonManifoldFlag(const Standard_Boolean isNonManifold); 0122 0123 0124 DEFINE_STANDARD_RTTIEXT(ShapeFix_Shell,ShapeFix_Root) 0125 0126 protected: 0127 0128 0129 TopoDS_Shell myShell; 0130 TopoDS_Compound myErrFaces; 0131 Standard_Integer myStatus; 0132 Handle(ShapeFix_Face) myFixFace; 0133 Standard_Integer myFixFaceMode; 0134 Standard_Integer myFixOrientationMode; 0135 Standard_Integer myNbShells; 0136 Standard_Boolean myNonManifold; 0137 0138 private: 0139 0140 0141 0142 0143 }; 0144 0145 0146 #include <ShapeFix_Shell.lxx> 0147 0148 0149 0150 0151 0152 #endif // _ShapeFix_Shell_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |