OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
SimplifyRemoveFaces.h
Go to the documentation of this file.
1#pragma once
2
3#include "OldTreeIcon.h"
4#include "ShapesBase.h"
5
6#include "BRepAlgoAPI_Defeaturing.hxx"
7
8class Model;
9class EntityGeometry;
10class EntityBrep;
11class TopoDS_Shape;
12class UpdateManager;
13
15{
16public:
17 SimplifyRemoveFaceData() : entityID(0) {}
19
20 void setEntityID(ot::UID id) { entityID = id; }
21 void setFaceName(const std::string & _faceName) { faceName = _faceName; }
22
23 ot::UID getEntityID(void) { return entityID; }
24 std::string getFaceName(void) { return faceName; }
25
26private:
27 ot::UID entityID;
28 std::string faceName;
29};
30
32{
33public:
34 SimplifyRemoveFaces(ot::components::UiComponent *_uiComponent, ot::components::ModelComponent *_modelComponent, ot::serviceID_t _serviceID, const std::string &_serviceName, EntityCache *_entityCache, ClassFactory *_classFactory)
35 : ShapesBase(_uiComponent, _modelComponent, _serviceID, _serviceName, _entityCache, _classFactory) {};
37
38 void setUpdateManager(UpdateManager *_updateManager) { updateManager = _updateManager; };
39
40 void enterRemoveFacesMode(void);
41 void performOperation(const std::string &selectionInfo);
42
43private:
44 bool removeFacesFromEntity(EntityGeometry *geometryEntity, ot::UID brepID, ot::UID brepVersion, std::list<SimplifyRemoveFaceData> &faces, std::list<ot::UID> &modifiedEntities);
45 bool findFaceFromName(EntityBrep* brepEntity, TopoDS_Shape& shape, const std::string& faceName, TopoDS_Shape& face);
46 UpdateManager *getUpdateManager(void) { assert(updateManager != nullptr); return updateManager; }
47 void handleFaceNaming(EntityBrep* inputEntity, EntityBrep* resultEntity, BRepAlgoAPI_Defeaturing& theAlgo);
48
49 UpdateManager *updateManager;
50};
Definition EntityCache.h:26
The Model class is the main interface to the model. There may be multiple instances of this class....
Definition Model.h:94
Definition ShapesBase.h:19
Definition SimplifyRemoveFaces.h:15
std::string getFaceName(void)
Definition SimplifyRemoveFaces.h:24
ot::UID getEntityID(void)
Definition SimplifyRemoveFaces.h:23
SimplifyRemoveFaceData()
Definition SimplifyRemoveFaces.h:17
void setEntityID(ot::UID id)
Definition SimplifyRemoveFaces.h:20
virtual ~SimplifyRemoveFaceData()
Definition SimplifyRemoveFaces.h:18
void setFaceName(const std::string &_faceName)
Definition SimplifyRemoveFaces.h:21
Definition SimplifyRemoveFaces.h:32
SimplifyRemoveFaces(ot::components::UiComponent *_uiComponent, ot::components::ModelComponent *_modelComponent, ot::serviceID_t _serviceID, const std::string &_serviceName, EntityCache *_entityCache, ClassFactory *_classFactory)
Definition SimplifyRemoveFaces.h:34
void setUpdateManager(UpdateManager *_updateManager)
Definition SimplifyRemoveFaces.h:38
virtual ~SimplifyRemoveFaces()
Definition SimplifyRemoveFaces.h:36
void enterRemoveFacesMode(void)
Definition SimplifyRemoveFaces.cpp:27
void performOperation(const std::string &selectionInfo)
Definition SimplifyRemoveFaces.cpp:34
Definition UpdateManager.h:30
Definition ModelComponent.h:42
Definition UiComponent.h:31
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27
unsigned short serviceID_t
ID type used to identify a service (16 bit unsigned integer).
Definition CoreTypes.h:14