Setting of precisionΒΆ
In order to check if two points are the same, we have to set float numbers in limited digitals. By default, the package limits the float number at 10 digitals after zero, that is eps = 1e-10. We can get/set the digitals with functions get_eps()/set_eps().
After has been set to 0.001, the point (0.1,0.2) euqals to point (0.100001, 0.200009) in the domain of Shape4D.
>>> get_eps() # To get the current precision
1e-10
>>> set_eps(1e-2) # To set precision to 10^-2
>>> get_eps() # To see the result ...
0.01
The precision matters in geometry computation. For example below, at the precision of 0.01, one might have though a point lie in a polygon, though it actually lies outsides. About point and polygon, please refers to : Point and polygon


