Open vvoovv opened 1 year ago
Do you clip all ways and intersections so that all points are located within the extent of the area of interest?
Do you clip all ways and intersections so that all points are located within the extent of the area of interest?
Yes, they are clipped. Such a border is already included in the section network graph as virtual ways of the category scene_border
, connecting each clipped way end. This is a relic from the time when we tried to use way-cycles. It could easily be extracted from this network. The only problem now are the clusters. These end at the cluster centerline, which is constructed from the outermost ways in the cluster. These endpoints are close to the scene border, but are not part of the network.
Below is an illustration. The black lines are the outermost cluster ways, their endpoints are included in the border from the network graph. The centerline (red) is constructed from these ways, their endpoint is the middle between the endpoints of the ways. The blue dotted line is the scene border.
minX
, minY
, maxX
, maxY
are now available as properties of the class BlenderApp
or CommandLineApp
. I made the related changes in the method createWaySectionNetwork
of the class StreetGenerator
.
For now I am using minX
, minY
, maxX
, maxY
with some margin to generate the border of the area of interest.
The resulting terrain patches look nice. Later a precise area border as described in your message will be needed.
Very nice! How do you find these patches? Does Blender provide some tool to create them?
The tools are "Merge by distance" (used to remove duplicated vertices) and "Fill" (used to create face out of edge loops). They are available both as Geometry Nodes and traditional Blender operators.
So the task was to create edge sequences for the edge lops.
I offset to the left and to the right each centerline of a way-section or way-cluster (the original centerline is in the middle). That is done in Geometry Nodes
I close the caps for dead-ends. That's done in the code.
I create edge sequences between the connectors of the intersection polygons. Such an edge sequence follows the related intersection polygon. That's done in the code.
Than duplicated vertices are removed in the Geometry Nodes to form edge loops and polygons for terrain patches are created using the Fill Curve node.
Thanks! You get a similar result as I did by way cycles, but in a much more general way, without islands and all that annoying stuff. Great idea!
I didn't consider sidewalks so far. It will be my next task to create terrain patches with sidewalks.
To create terrain patches between streets it is required to add a border of the area of interest.
This issue is intended to discuss the above matter.