OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityBrep.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include "EntityBase.h"
5#include "TopoDS_Shape.hxx"
6#include "TopoDS_TShape.hxx"
7#include "TopoDS_Face.hxx"
8#include "TopoDS_TFace.hxx"
9#include "OldTreeIcon.h"
10
11#include <list>
12#include <map>
13
14class __declspec(dllexport) EntityBrep : public EntityBase
15{
16public:
17 EntityBrep(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
18 virtual ~EntityBrep();
19
20 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
21
22 void setBrep(TopoDS_Shape &shape) { brep = shape; setModified(); }
23 TopoDS_Shape &getBrep(void) { return brep; };
24
25 virtual std::string getClassName(void) { return "EntityBrep"; };
26
27 virtual entityType getEntityType(void) override { return DATA; };
28
29 gp_Trsf getTransform(void);
30 void setTransform(gp_Trsf transform);
31
32 void setFaceName(const TopoDS_Face& face, const std::string &name);
33 std::string getFaceName(const TopoDS_Face& face);
34
35 void copyFaceNames(EntityBrep *other);
36 void setFaceNameMap(std::map< const opencascade::handle<TopoDS_TShape>, std::string> &faceNames);
37 std::map< const opencascade::handle<TopoDS_TShape>, std::string> getFaceNameMap();
38
39private:
40 virtual int getSchemaVersion(void) { return 1; };
41 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
42 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
43
44 TopoDS_Shape brep;
45
46 gp_Trsf transformMatrix;
47
48 std::map< const opencascade::handle<TopoDS_TShape>, std::string> m_faceNames;
49};
50
51
52
EntityBrep * brep
Definition GeometryOperations.h:21
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27