|
|
|||
File indexing completed on 2026-09-29 09:18:24
0001 // Copyright (c) 2013 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _BRepMesh_DiscretFactory_HeaderFile 0015 #define _BRepMesh_DiscretFactory_HeaderFile 0016 0017 #include <Standard.hxx> 0018 #include <Standard_DefineAlloc.hxx> 0019 #include <BRepMesh_DiscretRoot.hxx> 0020 #include <TCollection_AsciiString.hxx> 0021 0022 class TopoDS_Shape; 0023 0024 //! Factory for retrieving triangulation algorithms. 0025 //! Use BRepMesh_DiscretFactory::Get() static method to retrieve global Factory instance. 0026 //! Use BRepMesh_DiscretFactory::Discret() method to retrieve meshing tool. 0027 //! 0028 //! This class delegates to BRepMesh_DiscretAlgoFactory registry for algorithm creation. 0029 //! @sa BRepMesh_DiscretAlgoFactory 0030 class BRepMesh_DiscretFactory 0031 { 0032 public: 0033 DEFINE_STANDARD_ALLOC 0034 0035 //! Returns the global factory instance. 0036 Standard_EXPORT static BRepMesh_DiscretFactory& Get(); 0037 0038 //! Setup meshing algorithm by name. 0039 //! Returns TRUE if requested algorithm is available. 0040 //! On fail Factory will continue to use previous algorithm. 0041 //! @param[in] theName name of the algorithm to use 0042 Standard_EXPORT bool SetDefaultName(const TCollection_AsciiString& theName); 0043 0044 //! Returns name of current meshing algorithm. 0045 const TCollection_AsciiString& DefaultName() const { return myDefaultName; } 0046 0047 //! Returns triangulation algorithm instance. 0048 //! @param[in] theShape shape to be meshed 0049 //! @param[in] theLinDeflection linear deflection to be used for meshing 0050 //! @param[in] theAngDeflection angular deflection to be used for meshing 0051 //! @return new meshing algorithm instance, or NULL if no algorithm available 0052 Standard_EXPORT occ::handle<BRepMesh_DiscretRoot> Discret(const TopoDS_Shape& theShape, 0053 double theLinDeflection, 0054 double theAngDeflection); 0055 0056 protected: 0057 //! Constructor 0058 BRepMesh_DiscretFactory(); 0059 0060 TCollection_AsciiString myDefaultName; 0061 }; 0062 0063 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|