|
|
|||
File indexing completed on 2026-07-15 08:26:10
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 //! Empty constructor 0045 Standard_EXPORT ShapeFix_Shell(); 0046 0047 //! Initializes by shell. 0048 Standard_EXPORT ShapeFix_Shell(const TopoDS_Shell& shape); 0049 0050 //! Initializes by shell. 0051 Standard_EXPORT void Init(const TopoDS_Shell& shell); 0052 0053 //! Iterates on subshapes and performs fixes 0054 //! (for each face calls ShapeFix_Face::Perform and 0055 //! then calls FixFaceOrientation). The passed progress 0056 //! indicator allows user to consult the current progress 0057 //! stage and abort algorithm if needed. 0058 Standard_EXPORT Standard_Boolean 0059 Perform(const Message_ProgressRange& theProgress = Message_ProgressRange()); 0060 0061 //! Fixes orientation of faces in shell. 0062 //! Changes orientation of face in the shell, if it is oriented opposite 0063 //! to neighbouring faces. If it is not possible to orient all faces in the 0064 //! shell (like in case of mebious band), this method orients only subset 0065 //! of faces. Other faces are stored in Error compound. 0066 //! Modes : 0067 //! isAccountMultiConex - mode for account cases of multiconnexity. 0068 //! If this mode is equal to Standard_True, separate shells will be created 0069 //! in the cases of multiconnexity. If this mode is equal to Standard_False, 0070 //! one shell will be created without account of multiconnexity.By default - Standard_True; 0071 //! NonManifold - mode for creation of non-manifold shells. 0072 //! If this mode is equal to Standard_True one non-manifold will be created from shell 0073 //! contains multishared edges. Else if this mode is equal to Standard_False only 0074 //! manifold shells will be created. By default - Standard_False. 0075 Standard_EXPORT Standard_Boolean 0076 FixFaceOrientation(const TopoDS_Shell& shell, 0077 const Standard_Boolean isAccountMultiConex = Standard_True, 0078 const Standard_Boolean NonManifold = Standard_False); 0079 0080 //! Returns fixed shell (or subset of oriented faces). 0081 Standard_EXPORT TopoDS_Shell Shell(); 0082 0083 //! In case of multiconnexity returns compound of fixed shells 0084 //! else returns one shell.. 0085 Standard_EXPORT TopoDS_Shape Shape(); 0086 0087 //! Returns Number of obtainrd shells; 0088 Standard_EXPORT Standard_Integer NbShells() const; 0089 0090 //! Returns not oriented subset of faces. 0091 Standard_EXPORT TopoDS_Compound ErrorFaces() const; 0092 0093 //! Returns the status of the last Fix. 0094 Standard_EXPORT Standard_Boolean Status(const ShapeExtend_Status status) const; 0095 0096 //! Returns tool for fixing faces. 0097 Handle(ShapeFix_Face) FixFaceTool(); 0098 0099 //! Sets message registrator 0100 Standard_EXPORT virtual void SetMsgRegistrator( 0101 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 DEFINE_STANDARD_RTTIEXT(ShapeFix_Shell, ShapeFix_Root) 0124 0125 protected: 0126 TopoDS_Shell myShell; 0127 TopoDS_Compound myErrFaces; 0128 Standard_Integer myStatus; 0129 Handle(ShapeFix_Face) myFixFace; 0130 Standard_Integer myFixFaceMode; 0131 Standard_Integer myFixOrientationMode; 0132 Standard_Integer myNbShells; 0133 Standard_Boolean myNonManifold; 0134 0135 private: 0136 }; 0137 0138 #include <ShapeFix_Shell.lxx> 0139 0140 #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 |
|