@@ -651,19 +651,11 @@ def from_3pt_polyline(
651651 - np .array (unit_vector_from_PC_to_PI ) * tangent_length
652652 )
653653
654- point_of_curvature = convert_3pt_ndarray_to_tuple_of_floats (
655- numpy_3pt_array = point_of_curvature
656- )
657-
658654 point_of_tangency = (
659655 np .array (point_of_intersection )
660656 + np .array (unit_vector_from_PI_to_PT ) * tangent_length
661657 )
662658
663- point_of_tangency = convert_3pt_ndarray_to_tuple_of_floats (
664- numpy_3pt_array = point_of_tangency
665- )
666-
667659 unit_vector_from_PC_to_CC = calculate_cross_product_of_two_vectors (
668660 vector1 = axis_of_rotation ,
669661 vector2 = unit_vector_from_PC_to_PI ,
@@ -674,18 +666,14 @@ def from_3pt_polyline(
674666 + np .array (unit_vector_from_PC_to_CC ) * radius_of_curvature
675667 )
676668
677- center_of_curvature = convert_3pt_ndarray_to_tuple_of_floats (
678- numpy_3pt_array = center_of_curvature
679- )
680-
681669 return cls (
682670 point_of_intersection = point_of_intersection ,
683671 central_angle = float (central_angle ),
684672 radius_of_curvature = float (radius_of_curvature ),
685673 direction_of_axis_of_rotation = axis_of_rotation ,
686- point_of_curvature = point_of_curvature ,
687- point_of_tangency = point_of_tangency ,
688- center_of_curvature = center_of_curvature ,
674+ point_of_curvature = tuple ( point_of_curvature . tolist ()) ,
675+ point_of_tangency = tuple ( point_of_tangency . tolist ()) ,
676+ center_of_curvature = tuple ( center_of_curvature . tolist ()) ,
689677 )
690678
691679 @classmethod
@@ -736,18 +724,14 @@ def from_PC_and_PT_and_PI(
736724 + np .array (unit_vector_from_PC_to_CC ) * radius_of_curvature
737725 )
738726
739- center_of_curvature = convert_3pt_ndarray_to_tuple_of_floats (
740- numpy_3pt_array = center_of_curvature
741- )
742-
743727 return cls (
744728 point_of_intersection = point_of_intersection ,
745729 central_angle = float (central_angle_of_curvature ),
746730 radius_of_curvature = float (radius_of_curvature ),
747731 direction_of_axis_of_rotation = axis_of_rotation ,
748732 point_of_curvature = point_of_curvature ,
749733 point_of_tangency = point_of_tangency ,
750- center_of_curvature = center_of_curvature ,
734+ center_of_curvature = tuple ( center_of_curvature . tolist ()) ,
751735 )
752736
753737 @classmethod
@@ -801,14 +785,10 @@ def from_PC_and_PT_and_CC(
801785 * np .array (unit_vector_from_from_CC_to_PI )
802786 )
803787
804- point_of_intersection = convert_3pt_ndarray_to_tuple_of_floats (
805- numpy_3pt_array = point_of_intersection ,
806- )
807-
808788 return cls .from_PC_and_PT_and_PI (
809789 point_of_curvature = point_of_curvature ,
810790 point_of_tangency = point_of_tangency ,
811- point_of_intersection = point_of_intersection ,
791+ point_of_intersection = tuple ( point_of_intersection . tolist ()) ,
812792 )
813793
814794 @classmethod
@@ -846,13 +826,9 @@ def from_PC_and_CC_and_angle(
846826 rotated_vector
847827 )
848828
849- point_of_tangency = convert_3pt_ndarray_to_tuple_of_floats (
850- numpy_3pt_array = point_of_tangency
851- )
852-
853829 return cls .from_PC_and_PT_and_CC (
854830 point_of_curvature = point_of_curvature ,
855- point_of_tangency = point_of_tangency ,
831+ point_of_tangency = tuple ( point_of_tangency . tolist ()) ,
856832 point_on_center_of_curvature_side = point_of_center_of_curvature ,
857833 radius_of_curvature = radius_of_curvature ,
858834 )
@@ -900,11 +876,7 @@ def rotate_vector_about_axis(
900876 v * cos_angle + np .cross (k , v ) * sin_angle + k * np .dot (k , v ) * (1 - cos_angle )
901877 )
902878
903- rotated_vector = convert_3pt_ndarray_to_tuple_of_floats (
904- numpy_3pt_array = rotated_vector
905- )
906-
907- return rotated_vector
879+ return tuple (rotated_vector .tolist ())
908880
909881
910882def calculate_endpoint_coordinates_of_shortest_line_connecting_two_lines (
0 commit comments