vvoovv / blosm

Blosm addon for Blender. A few clicks import of Google 3D cities, OpenStreetMap, terrain. Global coverage. Source code is in the branch 'release'.
1.61k stars 191 forks source link

Inconsistent Behaviour #558

Open ohadmanor opened 4 days ago

ohadmanor commented 4 days ago

Hi,

I have strange behavior (I try everything to debug it):

When I use the following coordinate everything works perfect: maxLat = 31.309, minLat = 31.303, maxLon = 35.29, minLon = 35.26

But when I change to: 31.309, minLat = 31.303, maxLon = 35.3, minLon = 35.26 I get the following error:

Python: Traceback (most recent call last): File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm__init.py", line 256, in execute return self.importOsm(context) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\init.py", line 357, in importOsm a.render() File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\app\blender.py", line 488, in render m.render() File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\building\manager.py", line 81, in render self.renderer.render(building, self.data) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\building2\renderer.py", line 156, in render action.do(building, itemClass, buildingStyle, self) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\action\volume\init.py", line 93, in do self.generateVolume(footprint, element.getData(self.data)) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\action\volume\init__.py", line 100, in generateVolume volumeGenerator.do(footprint, coords) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\action\volume\roof.py", line 83, in do self.render(footprint, roofItem) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\action\volume\roof_hipped.py", line 70, in render ok = self.generateRoof(footprint, roofItem, firstVertIndex) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\action\volume\roof_hipped.py", line 225, in generateRoof polygonize( File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\lib\bpypolyskel\bpypolyskel.py", line 1053, in polygonize embedding = graph.circular_embedding(verts,'CCW') File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\lib\bpypolyskel\poly2FacesGraph.py", line 60, in circular_embedding ordering = sorted(neighbors, key = cmp_to_key( lambda a,b: compare_angles(vList,a,b,vertex)) ) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\lib\bpypolyskel\poly2FacesGraph.py", line 60, in ordering = sorted(neighbors, key = cmp_to_key( lambda a,b: compare_angles(vList,a,b,vertex)) ) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\lib\bpypolyskel\poly2FacesGraph.py", line 18, in compare_angles a1 = pseudoangle(vList[p1] - vList[center]) File "C:\Develop\3DTiles\blender\3.6\scripts\addons\blosm\lib\bpypolyskel\poly2FacesGraph.py", line 11, in pseudoangle p = d[0]/(abs(d[0])+abs(d[1])) # -1 .. 1 increasing with x ZeroDivisionError: float division by zero

vvoovv commented 2 days ago

Hi @ohadmanor

Unfortunately I can't reproduce your problem.

ohadmanor commented 17 hours ago

I try to use the original coordinate that cause the broblem with the latest versions: Blender 4.3, Blosm 2.7.11, and as you can see I get the error. any Idea?

image