Skip to content

Deeper dive into *road_base.py*

Ishaan Paranjape edited this page Mar 28, 2023 · 1 revision

Since road_base.py is the script to generate a single road element, it would be useful to understand the functions in this Blender operator.

  1. get_strips_s_boundaries(self, lanes, length_broken_line), get_strips_t_values(lanes, s): The documentation for this says Return list of tuples with a line marking toggle flag and a list with the start and stop values of the faces in each strip. S co-ordinates are coordinates of points along the curvature of a road assuming that the road begins at s=0. This function returns a list with s co-ordinates at regular intervals. For each s co-ordinate, the second function mentioned provides a t co-ordinate. We can obtain the xyz coordinates using the geometry.sample_cross_section(s, t_values) function. This function takes a single s and a list of t values.
Clone this wiki locally