Skip to content

Commit

Permalink
ISSUE #391 keeping track of parent bim id for easier debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
haroon-haider committed Nov 27, 2020
1 parent 4a3a63a commit 95d25b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ void RepoModelImport::parseTexture(


RepoModelImport::mesh_data_t RepoModelImport::createMeshRecord(
int parentBimId,
const ptree &mesh,
const std::string &parentName,
const repo::lib::RepoUUID &parentID,
Expand Down Expand Up @@ -325,7 +326,7 @@ RepoModelImport::mesh_data_t RepoModelImport::createMeshRecord(
matParents[materialID].push_back(sharedID);
}

mesh_data_t result = { vertices, normals, faces, boundingBox, parentID, sharedID };
mesh_data_t result = { parentBimId, vertices, normals, uvChannels, faces, boundingBox, parentID, sharedID };
return result;
}

Expand Down Expand Up @@ -378,7 +379,7 @@ void RepoModelImport::createObject(const ptree& tree)

if (props->first == REPO_IMPORT_GEOMETRY)
{
auto mesh = createMeshRecord(props->second, transName, transID, trans_matrix_map.back());
auto mesh = createMeshRecord(myID, props->second, transName, transID, trans_matrix_map.back());
metaParentIDs.push_back(mesh.sharedID);
meshEntries.push_back(mesh);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ namespace repo {

struct mesh_data_t
{
int parentBimId;
std::vector<repo::lib::RepoVector3D64> rawVertices;
std::vector<repo::lib::RepoVector3D> normals;
std::vector<std::vector<repo::lib::RepoVector2D>> uvChannels;
Expand All @@ -100,7 +101,7 @@ namespace repo {
void parseMaterial(const boost::property_tree::ptree& pt);
void parseTexture(const boost::property_tree::ptree& textureTree, char * dataBuffer);
repo::core::model::MetadataNode* createMetadataNode(const boost::property_tree::ptree &metadata, const std::string &parentName, const repo::lib::RepoUUID &parentID);
mesh_data_t createMeshRecord(const boost::property_tree::ptree &geometry, const std::string &parentName, const repo::lib::RepoUUID &parentID, const repo::lib::RepoMatrix &trans);
mesh_data_t createMeshRecord(int parentBimId, const boost::property_tree::ptree &geometry, const std::string &parentName, const repo::lib::RepoUUID &parentID, const repo::lib::RepoMatrix &trans);

/**
* @brief Creates a property tree from the current
Expand Down

0 comments on commit 95d25b3

Please sign in to comment.