Browse Source

change tool/map_lanetoxodr. for fix a problem in turn contact.

yuchuli 3 years ago
parent
commit
ab255ae0d3
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/tool/map_lanetoxodr/autoroadcontact.cpp

+ 8 - 0
src/tool/map_lanetoxodr/autoroadcontact.cpp

@@ -262,6 +262,10 @@ int AutoRoadContact::CalcContact(Road *pRoad1, Road *pRoad2,int & contacttype,in
                 if(xroad1rightlane.at(i)->GetType() == "driving")
                 {
                     nindex1 = i;
+                    if(bTurnRight == false)
+                    {
+                        break;
+                    }
                 }
             }
             for(i=0;i<xroad2rightlane.size();i++)
@@ -269,6 +273,10 @@ int AutoRoadContact::CalcContact(Road *pRoad1, Road *pRoad2,int & contacttype,in
                 if(xroad2rightlane.at(i)->GetType() == "driving")
                 {
                     nindex2 = i;
+                    if(bTurnRight == false)
+                    {
+                        break;
+                    }
                 }
             }
             if((nindex1<0)||(nindex2<0))