OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
STEPWriter.h
Go to the documentation of this file.
1#ifndef STEPWRITER_H
2#define STEPWRITER_H
3
4#include <TDocStd_Document.hxx>
5#include <XCAFDoc_ShapeTool.hxx>
6#include <XCAFDoc_ColorTool.hxx>
7#include <Quantity_Color.hxx>
8#include <TopoDS_Shape.hxx>
9
11public:
12 STEPWriter();
13 void addShape(TopoDS_Shape& shape, int colorIndex, int id, bool type);
14 bool writeSTEP(std::string filename);
15private:
16 const std::vector<Quantity_Color> COLORS = {
17 Quantity_Color(Quantity_NOC_RED),
18 Quantity_Color(Quantity_NOC_GREEN),
19 Quantity_Color(Quantity_NOC_BLUE),
20 Quantity_Color(Quantity_NOC_YELLOW),
21 Quantity_Color(Quantity_NOC_CYAN),
22 Quantity_Color(Quantity_NOC_MAGENTA)
23 };
24
25 Handle(TDocStd_Document) doc;
26 Handle(XCAFDoc_ShapeTool) shapeTool;
27 Handle(XCAFDoc_ColorTool) colorTool;
28};
29
30#endif // STEPWRITER_H
Definition STEPWriter.h:10
void addShape(TopoDS_Shape &shape, int colorIndex, int id, bool type)
Definition STEPWriter.cpp:17
bool writeSTEP(std::string filename)
Definition STEPWriter.cpp:30
STEPWriter()
Definition STEPWriter.cpp:9