Page MenuHome

Verify and convert float cardinals to int in DXF import
Needs ReviewPublic

Authored by Mikael Lövqvist (Mikael-Lovqvist) on Jan 19 2022, 3:26 PM.

Details

Summary

In _cubic_bezier_closed and _cubic_bezier_open the number of points to add is calculated with an expression that will yield a float type answer of an integer if all is well. The member function add of curve.splines.new('BEZIER').bezier_points requires an int type and will raise an exception if a float is given.

This fix will convert the value to an int and also make sure it is an integer to catch any problems with the input data.

Diff Detail