Skip to content

Commit

Permalink
two files with endless cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Elistratov committed Nov 30, 2020
1 parent 494d427 commit f044a54
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 0 deletions.
81 changes: 81 additions & 0 deletions debug/95211505_berlin_oehlertring_55.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import mathutils
import matplotlib.pyplot as plt
from bpypolyskel import bpypolyskel
from collections import Counter

verts = [
mathutils.Vector((-0.5223356485366821,-3.539959669113159,0.0)),
mathutils.Vector((-1.9265365600585938,-3.3284523487091064,0.0)),
mathutils.Vector((-2.828756093978882,-9.10593318939209,0.0)),
mathutils.Vector((-1.4245535135269165,-9.339705467224121,0.0)),
mathutils.Vector((-2.2046682834625244,-14.204366683959961,0.0)),
mathutils.Vector((5.616817951202393,-15.473405838012695,0.0)),
mathutils.Vector((5.5557661056518555,-15.840760231018066,0.0)),
mathutils.Vector((6.349446773529053,-15.974342346191406,0.0)),
mathutils.Vector((6.552955150604248,-16.163585662841797,0.0)),
mathutils.Vector((6.817515850067139,-16.36396026611328,0.0)),
mathutils.Vector((7.244882583618164,-16.586599349975586,0.0)),
mathutils.Vector((7.726518154144287,-16.753578186035156,0.0)),
mathutils.Vector((8.153884887695312,-16.82036781311035,0.0)),
mathutils.Vector((8.404878616333008,-16.831499099731445,0.0)),
mathutils.Vector((8.900080680847168,-16.79810333251953,0.0)),
mathutils.Vector((9.551305770874023,-16.619991302490234,0.0)),
mathutils.Vector((9.917619705200195,-16.45301055908203,0.0)),
mathutils.Vector((10.60954761505127,-16.55319595336914,0.0)),
mathutils.Vector((12.725991249084473,-1.8256231546401978,0.0)),
mathutils.Vector((0.0,0.0,0.0)),
mathutils.Vector((-0.5223356485366821,-3.539959669113159,5.893119812011719)),
mathutils.Vector((-1.9265365600585938,-3.3284523487091064,5.893119812011719)),
mathutils.Vector((-2.828756093978882,-9.10593318939209,5.893119812011719)),
mathutils.Vector((-1.4245535135269165,-9.339705467224121,5.893119812011719)),
mathutils.Vector((-2.2046682834625244,-14.204366683959961,5.893119812011719)),
mathutils.Vector((5.616817951202393,-15.473405838012695,5.893119812011719)),
mathutils.Vector((5.5557661056518555,-15.840760231018066,5.893119812011719)),
mathutils.Vector((6.349446773529053,-15.974342346191406,5.893119812011719)),
mathutils.Vector((6.552955150604248,-16.163585662841797,5.893119812011719)),
mathutils.Vector((6.817515850067139,-16.36396026611328,5.893119812011719)),
mathutils.Vector((7.244882583618164,-16.586599349975586,5.893119812011719)),
mathutils.Vector((7.726518154144287,-16.753578186035156,5.893119812011719)),
mathutils.Vector((8.153884887695312,-16.82036781311035,5.893119812011719)),
mathutils.Vector((8.404878616333008,-16.831499099731445,5.893119812011719)),
mathutils.Vector((8.900080680847168,-16.79810333251953,5.893119812011719)),
mathutils.Vector((9.551305770874023,-16.619991302490234,5.893119812011719)),
mathutils.Vector((9.917619705200195,-16.45301055908203,5.893119812011719)),
mathutils.Vector((10.60954761505127,-16.55319595336914,5.893119812011719)),
mathutils.Vector((12.725991249084473,-1.8256231546401978,5.893119812011719)),
mathutils.Vector((0.0,0.0,5.893119812011719))
]
unitVectors = [
mathutils.Vector((-0.9888455271720886,0.14894454181194305,0.0)),
mathutils.Vector((-0.15429142117500305,-0.9880253672599792,0.0)),
mathutils.Vector((0.9864237308502197,-0.16422027349472046,0.0)),
mathutils.Vector((-0.15834057331085205,-0.987384557723999,0.0)),
mathutils.Vector((0.9870916604995728,-0.1601559966802597,0.0)),
mathutils.Vector((-0.16394464671611786,-0.986469566822052,0.0)),
mathutils.Vector((0.9861302971839905,-0.1659727543592453,0.0)),
mathutils.Vector((0.7323065400123596,-0.6809750199317932,0.0)),
mathutils.Vector((0.7971649169921875,-0.6037616729736328,0.0)),
mathutils.Vector((0.8868696689605713,-0.462019681930542,0.0)),
mathutils.Vector((0.9448290467262268,-0.32756397128105164,0.0)),
mathutils.Vector((0.9880073070526123,-0.1544075310230255,0.0)),
mathutils.Vector((0.9990180730819702,-0.04430531710386276,0.0)),
mathutils.Vector((0.9977337718009949,0.06728583574295044,0.0)),
mathutils.Vector((0.9645736217498779,0.2638137936592102,0.0)),
mathutils.Vector((0.9099220633506775,0.4147793650627136,0.0)),
mathutils.Vector((0.9896796941757202,-0.14329735934734344,0.0)),
mathutils.Vector((0.14224493503570557,0.9898315072059631,0.0)),
mathutils.Vector((-0.989866316318512,0.14200252294540405,0.0)),
mathutils.Vector((-0.1459735929965973,-0.9892884492874146,0.0))
]
holesInfo = None
firstVertIndex = 20
numPolygonVerts = 20
faces = bpypolyskel.polygonize(verts, firstVertIndex, numPolygonVerts, holesInfo, 0.0, 0.5, None, unitVectors)
fig = plt.figure()
ax = fig.gca(projection='3d')
for face in faces:
for edge in zip(face, face[1:] + face[:1]):
p1 = verts[edge[0]]
p2 = verts[edge[1]]
ax.plot([p1.x,p2.x],[p1.y,p2.y],[p1.z,p2.z])
plt.show()
57 changes: 57 additions & 0 deletions debug/95978276_malchow_friedrich_ebert_strasse_11.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import mathutils
import matplotlib.pyplot as plt
from bpypolyskel import bpypolyskel
from collections import Counter

verts = [
mathutils.Vector((-4.9820942878723145,-7.8257575035095215,0.0)),
mathutils.Vector((4.286461353302002,-13.725690841674805,0.0)),
mathutils.Vector((4.1407084465026855,-13.95946216583252,0.0)),
mathutils.Vector((19.9085693359375,-23.989307403564453,0.0)),
mathutils.Vector((20.06757164001465,-23.744403839111328,0.0)),
mathutils.Vector((23.433156967163086,-25.881723403930664,0.0)),
mathutils.Vector((29.163856506347656,-16.875944137573242,0.0)),
mathutils.Vector((26.06990623474121,-14.905608177185059,0.0)),
mathutils.Vector((42.64575958251953,11.14327335357666,0.0)),
mathutils.Vector((26.92434310913086,21.1396484375,0.0)),
mathutils.Vector((14.595121383666992,1.7700024843215942,0.0)),
mathutils.Vector((5.008577823638916,7.870290756225586,0.0)),
mathutils.Vector((-4.9820942878723145,-7.8257575035095215,15.563451766967773)),
mathutils.Vector((4.286461353302002,-13.725690841674805,15.563451766967773)),
mathutils.Vector((4.1407084465026855,-13.95946216583252,15.563451766967773)),
mathutils.Vector((19.9085693359375,-23.989307403564453,15.563451766967773)),
mathutils.Vector((20.06757164001465,-23.744403839111328,15.563451766967773)),
mathutils.Vector((23.433156967163086,-25.881723403930664,15.563451766967773)),
mathutils.Vector((29.163856506347656,-16.875944137573242,15.563451766967773)),
mathutils.Vector((26.06990623474121,-14.905608177185059,15.563451766967773)),
mathutils.Vector((42.64575958251953,11.14327335357666,15.563451766967773)),
mathutils.Vector((26.92434310913086,21.1396484375,15.563451766967773)),
mathutils.Vector((14.595121383666992,1.7700024843215942,15.563451766967773)),
mathutils.Vector((5.008577823638916,7.870290756225586,15.563451766967773))
]
unitVectors = [
mathutils.Vector((0.8435888886451721,-0.5369896292686462,0.0)),
mathutils.Vector((-0.5290741324424744,-0.8485755920410156,0.0)),
mathutils.Vector((0.8437643647193909,-0.5367136597633362,0.0)),
mathutils.Vector((0.5445428490638733,0.8387330174446106,0.0)),
mathutils.Vector((0.8441628813743591,-0.5360867977142334,0.0)),
mathutils.Vector((0.5368587970733643,0.8436721563339233,0.0)),
mathutils.Vector((-0.8434813618659973,0.5371584892272949,0.0)),
mathutils.Vector((0.5368591547012329,0.8436717987060547,0.0)),
mathutils.Vector((-0.8438599109649658,0.5365636348724365,0.0)),
mathutils.Vector((-0.5369710326194763,-0.8436006307601929,0.0)),
mathutils.Vector((-0.8436710834503174,0.5368605256080627,0.0)),
mathutils.Vector((-0.5369625687599182,-0.8436059951782227,0.0))
]
holesInfo = None
firstVertIndex = 12
numPolygonVerts = 12
faces = bpypolyskel.polygonize(verts, firstVertIndex, numPolygonVerts, holesInfo, 0.0, 0.5, None, unitVectors)
fig = plt.figure()
ax = fig.gca(projection='3d')
for face in faces:
for edge in zip(face, face[1:] + face[:1]):
p1 = verts[edge[0]]
p2 = verts[edge[1]]
ax.plot([p1.x,p2.x],[p1.y,p2.y],[p1.z,p2.z])
plt.show()

0 comments on commit f044a54

Please sign in to comment.