FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
io.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** FougTools
3 ** Copyright Fougue (30 Mar. 2015)
4 ** contact@fougue.pro
5 **
6 ** This software is a computer program whose purpose is to provide utility
7 ** tools for the C++ language and the Qt toolkit.
8 **
9 ** This software is governed by the CeCILL-C license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-C
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info".
14 ****************************************************************************/
15 
16 #pragma once
17 
18 #include "occtools.h"
19 #include <Handle_Message_ProgressIndicator.hxx>
20 #include <Handle_StlMesh_Mesh.hxx>
21 #include <TopoDS_Shape.hxx>
22 
23 namespace occ {
24 
26 {
27 public:
28  typedef const char* FileNameLocal8Bit;
29 
30  enum Format
31  {
37  UnknownFormat
38  };
39 
40  static Format partFormat(FileNameLocal8Bit fileName);
41  static Format partFormatFromContents(
42  const char* contentsBegin,
43  std::size_t contentsBeginSize,
44  std::size_t fullContentsSizeHint = 0);
45 
46  static TopoDS_Shape loadPartFile(
47  FileNameLocal8Bit fileName,
48  Handle_Message_ProgressIndicator indicator = NULL);
49 
50  static Handle_StlMesh_Mesh loadStlFile(
51  FileNameLocal8Bit fileName,
52  Handle_Message_ProgressIndicator indicator = NULL);
53 
54  static TopoDS_Shape loadBrepFile(
55  FileNameLocal8Bit fileName,
56  Handle_Message_ProgressIndicator indicator = NULL);
57  static TopoDS_Shape loadIgesFile(
58  FileNameLocal8Bit fileName,
59  Handle_Message_ProgressIndicator indicator = NULL);
60  static TopoDS_Shape loadStepFile(
61  FileNameLocal8Bit fileName,
62  Handle_Message_ProgressIndicator indicator = NULL);
63 
64  static void writeBrepFile(
65  const TopoDS_Shape& shape,
66  FileNameLocal8Bit fileName,
67  Handle_Message_ProgressIndicator indicator = NULL);
68  static void writeIgesFile(
69  const TopoDS_Shape& shape,
70  FileNameLocal8Bit fileName,
71  Handle_Message_ProgressIndicator indicator = NULL);
72  static void writeStepFile(
73  const TopoDS_Shape& shape,
74  FileNameLocal8Bit fileName,
75  Handle_Message_ProgressIndicator indicator = NULL);
76 
77  static void writeAsciiStlFile(
78  const TopoDS_Shape& shape, FileNameLocal8Bit fileName);
79  static void writeBinaryStlFile(
80  const TopoDS_Shape& shape, FileNameLocal8Bit fileName);
81 };
82 
83 } // namespace occ
Definition: io.h:35
Format
Definition: io.h:30
const char * FileNameLocal8Bit
Definition: io.h:28
Definition: io.h:25
Definition: io.h:33
#define OCCTOOLS_EXPORT
Definition: occtools.h:27
Definition: io.h:34
Definition: ais_text.cpp:31
Definition: io.h:32
Definition: io.h:36