|
@@ -3472,7 +3472,18 @@ void MainWindow::onClickCreateRoad()
|
|
|
xvectorgeo = CreateTurnGeo(startx,starty,starthdg,endx,endy,endhdg,R);
|
|
|
break;
|
|
|
case 1:
|
|
|
- xvectorgeo = CreateLineGeo(startx,starty,starthdg,endx,endy,endhdg);
|
|
|
+ {
|
|
|
+ double fdis = sqrt(pow(startx - endx,2) +pow(starty -endy,2));
|
|
|
+ if((fdis<10) || (starthdg == endhdg))
|
|
|
+ {
|
|
|
+ xvectorgeo = CreateLineGeo(startx,starty,starthdg,endx,endy,endhdg);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ xvectorgeo = geofit::CreateBezierGeo(startx,starty,starthdg,endx,endy,endhdg);
|
|
|
+ }
|
|
|
+//
|
|
|
+ }
|
|
|
break;
|
|
|
case 2:
|
|
|
xvectorgeo = CreateUTurnGeo(startx,starty,starthdg,endx,endy,endhdg,R);
|
|
@@ -3540,7 +3551,7 @@ void MainWindow::onClickCreateRoad()
|
|
|
pgb->AddGeometryParamPoly3(s,pbez->mfX,pbez->mfY,
|
|
|
pbez->mfHdg,pbez->mfLen,pbez->mfu[0],
|
|
|
pbez->mfu[1],pbez->mfu[2],pbez->mfu[3],pbez->mfv[0],
|
|
|
- pbez->mfv[1],pbez->mfv[2],pbez->mfv[3]);
|
|
|
+ pbez->mfv[1],pbez->mfv[2],pbez->mfv[3],false);
|
|
|
break;
|
|
|
}
|
|
|
s = s + xvectorgeo[j].mfLen;
|
|
@@ -3591,7 +3602,7 @@ void MainWindow::onClickCreateRoad()
|
|
|
|
|
|
pLL->AddWidthRecord(0,pa[i],pb[i],
|
|
|
0,0);
|
|
|
- pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
+ // pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
|
|
|
}
|
|
|
|
|
@@ -3632,7 +3643,7 @@ void MainWindow::onClickCreateRoad()
|
|
|
|
|
|
pLL->AddWidthRecord(0,pa[i],pb[i],
|
|
|
0,0);
|
|
|
- pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
+ // pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -3773,14 +3784,14 @@ void MainWindow::onClickCreateRoad()
|
|
|
|
|
|
pLL->AddWidthRecord(0,pa[i],pb[i],
|
|
|
0,0);
|
|
|
- pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
+// pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
|
|
|
pLS2->AddLane(-1,(i+1)*(-1),strvectorlanetype[i],false,false);
|
|
|
pLL = pLS2->GetLane(pLS2->GetLaneCount() - 1);
|
|
|
|
|
|
pLL->AddWidthRecord(0,pa[i]+pb[i]*xroadlen1 ,pb[i],
|
|
|
0,0);
|
|
|
- pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
+// pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
|
|
|
}
|
|
|
int noplanecount = mvectorrc[0].mvectorlcop.size();
|
|
@@ -3820,14 +3831,14 @@ void MainWindow::onClickCreateRoad()
|
|
|
|
|
|
pLL->AddWidthRecord(0,pa[i],pb[i],
|
|
|
0,0);
|
|
|
- pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
+ // pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
|
|
|
pLS2->AddLane(1,(i+1),strvectorlanetype[i],false,false);
|
|
|
pLL = pLS2->GetLane(pLS2->GetLaneCount() - 1);
|
|
|
|
|
|
pLL->AddWidthRecord(0,pa[i]+pb[i]*xroadlen1 ,pb[i],
|
|
|
0,0);
|
|
|
- pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
+// pLL->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"false");
|
|
|
|
|
|
}
|
|
|
}
|