Announcements
Visit Fusion 360 Feedback Hub, the great way to connect to our Product, UX, and Research teams. See you there!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API - Point3D use isclose in isEqualTo()

API - Point3D use isclose in isEqualTo()

As already stated in this thread: https://forums.autodesk.com/t5/fusion-360-support/model-precision-of-created-objects/

Fusion 360 seems not be very precise on the 'Nano level' 10.000000XXX mm where 'XXX' is the nano lvl. Cause of that it makes no sense to compare floats with '==' cause then the nano lvl will make a difference.

 

Better would be to use a method like math.isclose(ab*rel_tol=1e-09abs_tol=0.0) (src)

which returns True if the values a and b are close to each other and False otherwise. Or simply ignoring the last digits of a float while comparing.

 

The isEqualTo() method could then be supplemented by a rel_tol=1e-09 and an abs_tol=0.0.

 

Greets Fabi

 

1 Comment
marshaltu
Autodesk

UP-36124 has been logged to track the requirement in our internal system.

 

Thanks,

Marshal

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea