Skip to content

Commit

Permalink
Make the vertex numbers match the old dot files
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoenig committed Apr 8, 2020
1 parent 31bf464 commit 6ad2b7d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion subt_ign/src/dot_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,16 @@ bool fillVertexData(const std::string &_includeStr, VertexData &_vd)
modelSdf.SetPose(pose);

static int tileId = 0;
_vd.id = tileId++;
// Try getting the tile id from the tile name first.
try
{
int numIndex = name.rfind("_");
_vd.id = std::stoi(name.substr(numIndex+1));
}
catch (...)
{
_vd.id = tileId++;
}
_vd.tileType = modelType;
_vd.tileName = name;
_vd.model = modelSdf;
Expand Down

0 comments on commit 6ad2b7d

Please sign in to comment.