Hi All,
Good day.
I'm trying to create widening using the below code but not able to find a way to remove the exit transition.
OffsetAlignmentInfo _SrcOffSetNfo = _oSrcAlign.OffsetAlignmentInfo;
mStation = 400;
_TransitionLength = 100
_SrcOffSetNfo.AddWidening(mStation, mStation + _TransitionLength, 25);
AlignmentRegionCollection oRegs = _SrcOffSetNfo.Regions;
foreach(AlignmentRegion oReg In oRegs)
{
AlignmentTransition oExitTrans = oReg.ExitTransition;
oExitTrans.TransitionDescription.Dispose();
oExitTrans.Dispose();
}
Output:
Output needed to be achieve
Thanks in advance.
Solved! Go to Solution.
Solved by alexisgacia. Go to Solution.
You'll always have the end transition. If you want it to not go back towards the alignment, then you'll want the end of your transition to match the end of the alignment.
Thank you for your reply.
What I am trying to achieve is to merge with the other roads with the different setup.
I dont know on how to match the end of the transition. There is no option or properties where we can put the offset value for the end of the transition.
I found an alternative solution is to remove the region.
OffsetAlignmentInfo _SrcOffSetNfo = _oSrcAlign.OffsetAlignmentInfo;
mStation = 400;
_TransitionLength = 100
_SrcOffSetNfo.AddWidening(mStation, mStation + _TransitionLength, 25);
// Remove the end region
_SrcOffSetNfo.Regions.Remove(2);
_SrcOffSetNfo.Regions[1].StartStation = mStation;
_SrcOffSetNfo.Regions[1].EndStation = 750; // optional
Can't find what you're looking for? Ask the community or share your knowledge.