OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ModelBuilder.h
Go to the documentation of this file.
1#pragma once
2
3class Properties;
6class Application;
7
8class EntityGeometry;
9class EntityBase;
10
11class BRepAlgoAPI_BuilderAlgo;
12class TopoDS_Shape;
13
14#include <list>
15#include <string>
16#include <vector>
17#include <map>
18
20
22{
23public:
24 ModelBuilder(Application *app) : application(app) {};
26
27 void buildModel(const std::string &meshName, std::list<EntityGeometry *> &geometryEntities, Properties &properties, StepWidthManager &stepWidthManager, MaterialManager &materialManager);
28
29 std::list<EntityGeometry *> &getModelEntities(void) { return modelEntities; }
30 std::list<std::vector<std::string>> &getAllShapeOverlaps(void) { return allShapeOverlaps; }
31
32private:
33 std::string checkMaterialAssignmentForShapes(std::list<EntityGeometry *> &geometryEntities);
34 std::string checkMaterialAssignmentForBoundingSphere(Properties &properties);
35 std::string addBoundingSphere(std::list<EntityGeometry *> &geometryEntities, Properties &properties, StepWidthManager &stepWidthManager);
36 void buildNonManifoldModel(const std::string &meshName, std::list<EntityGeometry *> &geometryEntities, Properties &properties, MaterialManager &materialManager);
37 double getMeshPriority(EntityBase *entity, MaterialManager &materialManager);
38 void createAllShapes(BRepAlgoAPI_BuilderAlgo &booleanOperation, const std::string &meshName, EntityGeometry *entity, double meshPriority);
39 void analyzeOverlaps(void);
40 void resolveOverlaps(void);
41 void removeUnnecessaryHierarchies(void);
42 void mergeShapesOfSameParent(void);
43 bool mergeChildren(std::vector<std::string> &childList, std::map<std::string, EntityGeometry *> &shapesInEntityList);
44 EntityGeometry *createGeometryEntity(const std::string &name, TopoDS_Shape &shape, const ot::PropertyGridCfg& shapeProperties);
45 void storeEntities(void);
46
47 Application *application;
48 std::list<EntityGeometry *> modelEntities;
49 std::map<std::string, double> meshPriorities;
50 std::map<std::string, std::string> parentShapeName;
51 std::list<std::vector<std::string>> allShapeOverlaps;
52};
Definition Application.h:25
Definition MaterialManager.h:15
Definition ModelBuilder.h:22
~ModelBuilder()
Definition ModelBuilder.cpp:22
void buildModel(const std::string &meshName, std::list< EntityGeometry * > &geometryEntities, Properties &properties, StepWidthManager &stepWidthManager, MaterialManager &materialManager)
Definition ModelBuilder.cpp:36
ModelBuilder(Application *app)
Definition ModelBuilder.h:24
std::list< EntityGeometry * > & getModelEntities(void)
Definition ModelBuilder.h:29
std::list< std::vector< std::string > > & getAllShapeOverlaps(void)
Definition ModelBuilder.h:30
Definition Properties.h:11
Definition StepWidthManager.h:26
Definition PropertyGridCfg.h:21
The app namespace contains several functions that may be used to start processes.