|
||||
File indexing completed on 2025-01-18 10:05:17
0001 // Created on: 2000-06-23 0002 // Created by: Sergey MOZOKHIN 0003 // Copyright (c) 2000-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 _StlAPI_Writer_HeaderFile 0017 #define _StlAPI_Writer_HeaderFile 0018 0019 #include <Message_ProgressScope.hxx> 0020 #include <Message_ProgressIndicator.hxx> 0021 0022 class TopoDS_Shape; 0023 0024 //! This class creates and writes 0025 //! STL files from Open CASCADE shapes. An STL file can be written to an existing STL file or to a new one. 0026 class StlAPI_Writer 0027 { 0028 public: 0029 0030 DEFINE_STANDARD_ALLOC 0031 0032 //! Creates a writer object with default parameters: ASCIIMode. 0033 Standard_EXPORT StlAPI_Writer(); 0034 0035 //! Returns the address to the flag defining the mode for writing the file. 0036 //! This address may be used to either read or change the flag. 0037 //! If the mode returns True (default value) the generated file is an ASCII file. 0038 //! If the mode returns False, the generated file is a binary file. 0039 Standard_Boolean& ASCIIMode() { return myASCIIMode; } 0040 0041 //! Converts a given shape to STL format and writes it to file with a given filename. 0042 //! \return the error state. 0043 Standard_EXPORT Standard_Boolean Write (const TopoDS_Shape& theShape, 0044 const Standard_CString theFileName, 0045 const Message_ProgressRange& theProgress = Message_ProgressRange()); 0046 0047 private: 0048 Standard_Boolean myASCIIMode; 0049 }; 0050 0051 #endif // _StlAPI_Writer_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |