nmwsharp / polyscope

A C++ & Python viewer for 3D data like meshes and point clouds
https://polyscope.run
MIT License
1.76k stars 190 forks source link

set_autoscale_structures sets incorrect scale #281

Open patsytau opened 2 months ago

patsytau commented 2 months ago

cube.off.txt test_polyscope.py.txt

This script, if installed with polyscope 1.3.1, correctly displays a cube on a grey grid. However, with 2.2.1, the window is blank, though it notes that the structure has been loaded.

Removing the polyscope.set_autoscale_structures(True) line results in displaying a cube on a grey grid, with the following output:

bbox diag = 10.392304845413264
gls = 10.392304420471191
gls = 10.392304420471191

With this line included, the window is blank, and the following output is given:

bbox diag = 10.392304845413264
gls = 10.392304420471191
gls = 0.009259259328246117

set_autoscale_structures(True) works in polyscope 1.3.1 as installed via pip.