2#pragma warning(disable : 4251)
11#include "TopoDS_Shape.hxx"
14class __declspec(dllexport) EntityGeometry :
public EntityContainer
17 EntityGeometry(
ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory,
const std::string &owner);
18 virtual ~EntityGeometry();
20 void setBrep(TopoDS_Shape shape);
21 TopoDS_Shape &getBrep(
void);
23 EntityFacetData* getFacets(
void);
24 EntityBrep* getBrepEntity(
void);
26 long long getBrepStorageObjectID(
void) { assert(brepStorageID != -1);
return brepStorageID; }
27 long long getFacetsStorageObjectID(
void) { assert(facetsStorageID != -1);
return facetsStorageID; }
29 virtual bool getEntityBox(
double &xmin,
double &xmax,
double &ymin,
double &ymax,
double &zmin,
double &zmax)
override;
31 virtual bool updateFromProperties(
void)
override;
33 virtual void StoreToDataBase(
void)
override;
35 virtual void addVisualizationNodes(
void)
override;
37 void releaseBrep(
void);
38 void releaseFacets(
void);
41 void resetFacets(
void);
43 virtual std::string getClassName(
void)
override {
return "EntityGeometry"; };
45 void addPrefetchingRequirementsForBrep(std::list<ot::UID> &prefetchIds);
46 void addPrefetchingRequirementsForFacets(std::list<ot::UID> &prefetchIds);
48 virtual entityType getEntityType(
void)
override {
return TOPOLOGY; };
49 virtual void removeChild(EntityBase *child)
override;
51 long long getBrepPrefetchID(
void);
52 long long getFacetsPrefetchID(
void);
54 void createProperties(
int colorR,
int colorG,
int colorB,
const std::string materialsFolder,
ot::UID materialsFolderID);
55 void createMaterialPropertiesOnly(
int colorR,
int colorG,
int colorB,
const std::string materialsFolder,
ot::UID materialsFolderID);
56 void createNonMaterialProperties(
void);
60 void setData(
void *data) { tmpData = data; }
61 void *getData(
void) {
return tmpData; }
63 void replaceBrepStorageID(
ot::UID id) { assert(brep ==
nullptr); brepStorageID = id; setModified(); }
64 void replaceFacetsStorageID(
ot::UID id) { assert(facets ==
nullptr); facetsStorageID = id; setModified(); }
66 double evaluateExpressionDouble(
const std::string &expr);
68 virtual bool considerForPropertyFilter(
void)
override {
return true; };
69 virtual bool considerChildrenForPropertyFilter(
void)
override {
return false; };
71 void setOldTreeIcons(
const std::string &visible,
const std::string &hidden) { treeIcons.visibleIcon = visible; treeIcons.hiddenIcon = hidden; }
72 void getOldTreeIcons(std::string &visible, std::string &hidden) { visible = treeIcons.visibleIcon; hidden = treeIcons.hiddenIcon; }
74 bool isTextureReflective(
const std::string textureType);
77 void detachBrep(
void);
79 void storeFacets(
void);
81 void setShowWhenSelected(
bool flag) { showWhenSelected =
flag; }
82 bool getShowWhenSelected(
void) {
return showWhenSelected; }
84 void resetTransformation(
void);
85 void getTransformation(std::vector<double> &transformation);
86 void setTransformation(
const std::vector<double> &transformation);
88 void setFacetEntity(EntityFacetData *entity) { assert(facets ==
nullptr); facets = entity; }
89 void setBrepEntity(EntityBrep *entity) { assert(brep ==
nullptr);
brep = entity; }
92 virtual int getSchemaVersion(
void)
override {
return 1; };
93 virtual void AddStorageData(bsoncxx::builder::basic::document &storage)
override;
94 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap)
override;
95 void EnsureBrepIsLoaded(
void);
96 void EnsureFacetsAreLoaded(
void);
97 bool updatePropertyVisibilities(
void);
98 void updateDimensionProperties(
void);
99 bool isTransformProperty(
const std::string &propName);
100 void createTransformProperty(
const std::string &propName,
double value);
104 EntityFacetData *facets;
106 long long brepStorageID;
107 long long facetsStorageID;
109 OldTreeIcon treeIcons;
111 bool showWhenSelected;
bsoncxx::types::value value
Definition DocumentManager.h:16
bool facetEntity(TopoDS_Shape &shape, double deflection, std::vector< Geometry::Node > &nodes, std::list< Geometry::Triangle > &triangles, std::list< Geometry::Edge > &edges, std::string &errors)
EntityBrep * brep
Definition GeometryOperations.h:21
__declspec(dllexport) void setHoverTreeItem(ot __declspec(dllexport) void addNodeFromFacetData(ot __declspec(dllexport) void addNodeFromFacetDataBase(ot __declspec(dllexport) void addVisualizationContainerNode(ot __declspec(dllexport) void addVisualizationNode(ot __declspec(dllexport) void addVTKNode(ot __declspec(dllexport) void updateVTKNode(ot __declspec(dllexport) void addVisualizationAnnotationNode(ot __declspec(dllexport) void addVisualizationAnnotationNodeDataBase(ot __declspec(dllexport) void addVisualizationMeshNodeFromFacetDataBase(ot __declspec(dllexport) void addVisualizationMeshItemNodeFromFacetDataBase(ot __declspec(dllexport) void addVisualizationCartesianMeshNode(ot __declspec(dllexport) void visualizationCartesianMeshNodeShowLines(ot __declspec(dllexport) void addVisualizationCartesianMeshItemNode(ot __declspec(dllexport) void visualizationTetMeshNodeTetEdges(ot __declspec(dllexport) void notifySceneNodeAboutViewChange(ot __declspec(dllexport) std __declspec(dllexport) void removeSelectedCurveNodes(ot __declspec(dllexport) void addVisualizationPlot1DNode(ot __declspec(dllexport) void visualizationResult1DPropertiesChanged(ot __declspec(dllexport) void visualizationPlot1DPropertiesChanged(ot __declspec(dllexport) void setEntityName(ot __declspec(dllexport) void renameEntityPath(const std __declspec(dllexport) void updateObjectColor(ot __declspec(dllexport) void updateMeshColor(ot __declspec(dllexport) void updateObjectFacetsFromDataBase(ot __declspec(dllexport) void setClearColor(ot __declspec(dllexport) void setDataModel(ot __declspec(dllexport) void getSelectedModelEntityIDs(std __declspec(dllexport) void getSelectedVisibleModelEntityIDs(std __declspec(dllexport) ot __declspec(dllexport) ot __declspec(dllexport) void removeShapes(ot __declspec(dllexport) void setShapeVisibility(ot __declspec(dllexport) void hideEntities(ot __declspec(dllexport) void showBranch(ot __declspec(dllexport) void hideBranch(ot __declspec(dllexport) void enterEntitySelectionMode(ot __declspec(dllexport) void setFontPath(const std __declspec(dllexport) void setDataBaseConnection(const std __declspec(dllexport) void prefetchDocumentsFromStorage(const std __declspec(dllexport) void setTabNames(ot __declspec(dllexport) ot __declspec(dllexport) void viewerTabChanged(const std __declspec(dllexport) void viewDataModifiedChanged(const std __declspec(dllexport) void shortcutActivated(const std __declspec(dllexport) void createRubberband(ot __declspec(dllexport) void settingsItemChanged(ot __declspec(dllexport) bool propertyGridValueChanged(ot bool flag
Definition ViewerAPI.h:147
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27