edit the code around line 240 :1] note the MakeLaneMarkers shape copy after the Vehicles().2] add the code for the marker creation and position reportsStreetsides --> case calcNbrOfLanes < 1.1 : Asphalt case Nbr_of_left_lanes == 0 && Nbr_of_right_lanes == 0: split(v,unitSpace,0){ ~calcLanesLeft : Lanes(calcNbrOfLanes,connectionEnd,0) Vehicles(0) MarkerCreation("left") | Median_width : Median | ~calcLanesRight : scaleUV(0,-1,-1) Lanes(calcNbrOfLanes,connectionStart,2) Vehicles(2) MarkerCreation("right") } else: split(v,unitSpace,0){ ~Nbr_of_left_lanes : Lanes(Nbr_of_left_lanes,connectionEnd,0) Vehicles(0) MarkerCreation("left") | Median_width : Median | ~Nbr_of_right_lanes : scaleUV(0,-1,-1) Lanes(Nbr_of_right_lanes,connectionStart,2) Vehicles(2) MarkerCreation("right")} @Range ( "all", "left", "right") @Group("MARKERS") attr markerOutput = "all" MarkerCreation(side) --> case markerOutput == "all" : MakeLaneMarkers case markerOutput == side : MakeLaneMarkers else : NIL MakeLaneMarkers --> color(1,0,0) t (0,.1,0) split(v,unitSpace,0) { ~Lane_width : LaneShape }* LaneShape --> split(v,unitSpace,0) { ~1 : NIL | markerDim : LaneCenterLine | ~1 : NIL } markerDim = 0.25 markerDist = 15 LaneCenterLine --> split(u,unitSpace,0) {{ markerDim : LaneMarker | ~ markerDist : NIL }* | markerDim : LaneMarker } LaneMarker --> report("markerPosX", convert(x, scope, world, pos, 0.5 * scope.sx, 0.5 * scope.sy, 0.5 * scope.sz)) report("markerPosY", convert(y, scope, world, pos, 0.5 * scope.sx, 0.5 * scope.sy, 0.5 * scope.sz)) report("markerPosZ", convert(z, scope, world, pos, 0.5 * scope.sx, 0.5 * scope.sy, 0.5 * scope.sz)) X. # NIL
Now once you generate a street, you should get the reports in the Inspector's Reports tab.To grab those and produce your java script code :1] copy the attached .py script to your scripts folder2] run the Script Based Exporter ( Python ), where you select the new script under the Misc options, then run it.3] open the console ( Python output ) and get your code.To adapt the offset, just copy paste your export offset values and edit the Python script accordingly.I also just added the lane direction switch called (markerOutput).Note also that now, the markers are produced as geometry, thus you may want to NIL it as commented out in the last line after the reports ( X. # NIL )let me know if it works on your machine too. 😉