MCPcopy Index your code
hub / github.com/BOBtheROSS/StreetGenFromEdges

github.com/BOBtheROSS/StreetGenFromEdges @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
19 symbols 26 edges 1 files 1 documented · 5% updated 5y ago★ 381 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Street Generation From Edges

created for Blender 2.90 but might work for older versions

Description

You can find the generate button in the Sidebar of the 3D View (to the right or press N to toggle it). In the Sidebar is a tab called Gen.
Example_flat
This Blender script generates street like geometry from the edges of a user created base mesh object.
Example

Setup

In Blender navigate to:
"Edit >> Preferences... >> Add-Ons (Category) > Install..."
and select the "StreetGenFromEdges.py" file

Alternatively copy the text inside the script "StreetGenFromEdges.py" file into the text editor and press the "Run Script" button (might be just a triangle/play symbol).
You can find it in the sidebar in the "Gen" Tab.

Important Note

This script is intended to work with 2D like mesh objects.
You can scale your base mesh vertices (in edit mode) on the local z-axis to zero to make sure it is planar. Example_flat

Options

Set the bevel size (length) of an arc for the street corners. The bevel is always based on the inner edge of a street corner. Also, dead ends of the street network can have beveled ends attached.
Bevel
Set a fixed subdivision count for the beveld street corners.
Subdivision count
If a street corners angle is bigger than the threshold angle, this will be a hard corner. This is useful for a highly subdivided base mesh with smooth turns in the street.
Subdivision Threshold
The subdivision count of an arc is calculated based on an angle. The bigger the street corners angle, the more subdivisions.
Angle Based
The subdivision count of an arc is calculated based on the maximum length an edge is allowed to have. The longer the arc, the more subdivision.
Edge Length Based
Angle and Edge Length Based can be used together. The minimal edge length might force more subdivisions and the maximum edge length might clamp the angle based subdivision. (depending on the settings)
Angle + Edge Length Based
In the Bottom is a Min/Max Subdivision setting that clamps the subdivision count calculated by Angle and/or Edge Length Based method.
The Angle Based Subdivision gets overruled by the Edge Length Subdivision and that by the Subdivision Count Min/Max.
Max/Min Count

Core symbols most depended-on inside this repo

register
called by 1
StreetGenFromEdges.py
draw
called by 0
StreetGenFromEdges.py
SetSubdivMax
called by 0
StreetGenFromEdges.py
SetSubdivMin
called by 0
StreetGenFromEdges.py
SetSubdivLongLen
called by 0
StreetGenFromEdges.py
SetSubdivShortLen
called by 0
StreetGenFromEdges.py
draw
called by 0
StreetGenFromEdges.py
execute
called by 0
StreetGenFromEdges.py

Shape

Method 14
Class 3
Function 2

Languages

Python100%

Modules by API surface

StreetGenFromEdges.py19 symbols

For agents

$ claude mcp add StreetGenFromEdges \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page