get .obj file from the code
Closed this issue · 5 comments
-
I want to get .obj file from the code How Could i get it..?!
-
In web site (https://odrviewer.io/), if i push 'export .obj' button, the screen become black like under picture.
How could i use the function? please explain the function, thank you.
Thanks for noticing! It should be fixed now.
I re-added the functionality of getting a road network mesh in commit 74a5d07 This was accidentally removed when deprecating the viewer. You can now get an .obj like this via code:
odr::OpenDriveMap odr_map("test.xodr");
odr::RoadNetworkMesh road_network_mesh = odr_map.get_road_network_mesh(0.1 /*eps*/);
std::ofstream out_file("out.obj");
out_file << road_network_mesh.get_mesh().get_obj() << std::endl;
out_file.close();
Do you mean the junction areas are missing in the generated .obj file?
Best provide an example .xodr
Thank you for your reply @grepthat
I mean that I can get road outline in the generated .obj file, but I can't get the others such as center line.
"Best provide an example .xodr", In this sentence, you mean my opendrive file is something wrong??