Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Behaviour #558

Open
ohadmanor opened this issue Nov 27, 2024 · 2 comments
Open

Inconsistent Behaviour #558

ohadmanor opened this issue Nov 27, 2024 · 2 comments

Comments

@ohadmanor
Copy link

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
Copy link
Owner

vvoovv commented Nov 29, 2024

Hi @ohadmanor

Unfortunately I can't reproduce your problem.

@ohadmanor
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants