compas
compas copied to clipboard
Infer precision from first coordinate in OBJ and STL files
@brgcode brought up the idea of inferring precision based on first vertex in STL files in issue #360 .
I'm opening this issue to see if that's something that would be beneficial for the file readers. In that case I think we should also do it for OBJ and PLY.
I'll be happy to implement it if people will find it useful.
the default precision by which these files are currently processed is the default precision of compas, which is 0.001
.
for STL files this is certainly to low. it should be more something like 0.000001
.
and in general i think one could assume that the points in a file are distinct up to the precision of the provided number of digits.
so i would vote yes...
@brgcode:
for STL files this is certainly to low. it should be more something like
0.000001
.
Would the check be like below?
if first_vertex_precision > compas.PRECISION:
precision = first_vertex_precision
Would it be enough to make sure this is set in the reader or does this require changing compas.PRECISION
?
@tomvanmele mehh, precision by import seems to invite flaky behaviour
another salute to compas.Tolerance
this is indeed not relevant anymore...