1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289
|
.. _math_core:
Core
####
.. module:: ezdxf.math
Math core module: :mod:`ezdxf.math`
These are the core math functions and classes which should be imported from
:mod:`ezdxf.math`.
Utility Functions
=================
.. autosummary::
:nosignatures:
arc_angle_span_deg
arc_angle_span_rad
arc_chord_length
arc_segment_count
area
closest_point
ellipse_param_span
has_matrix_2d_stretching
has_matrix_3d_stretching
open_uniform_knot_vector
required_knot_values
uniform_knot_vector
xround
gps_to_world_mercator
world_mercator_to_gps
.. autofunction:: closest_point
.. autofunction:: uniform_knot_vector
.. autofunction:: open_uniform_knot_vector
.. autofunction:: required_knot_values
.. autofunction:: xround
.. autofunction:: area
.. autofunction:: arc_angle_span_deg
.. autofunction:: arc_angle_span_rad
.. autofunction:: arc_segment_count
.. autofunction:: arc_chord_length
.. autofunction:: ellipse_param_span
.. autofunction:: has_matrix_2d_stretching
.. autofunction:: has_matrix_3d_stretching
.. autofunction:: gps_to_world_mercator
.. autofunction:: world_mercator_to_gps
.. _bulge_related_functions:
Bulge Related Functions
=======================
.. autosummary::
:nosignatures:
arc_to_bulge
bulge_3_points
bulge_center
bulge_radius
bulge_to_arc
bulge_from_radius_and_chord
bulge_from_arc_angle
.. seealso::
Description of the :ref:`bulge value`.
.. autofunction:: arc_to_bulge
.. autofunction:: bulge_3_points
.. autofunction:: bulge_center
.. autofunction:: bulge_radius
.. autofunction:: bulge_to_arc
.. autofunction:: bulge_from_radius_and_chord
.. autofunction:: bulge_from_arc_angle
2D Graphic Functions
====================
.. autosummary::
:nosignatures:
convex_hull_2d
distance_point_line_2d
intersect_polylines_2d
intersection_line_line_2d
is_axes_aligned_rectangle_2d
is_convex_polygon_2d
is_point_in_polygon_2d
is_point_left_of_line
is_point_on_line_2d
offset_vertices_2d
point_to_line_relation
rytz_axis_construction
.. autofunction:: convex_hull_2d
.. autofunction:: distance_point_line_2d
.. autofunction:: intersect_polylines_2d
.. autofunction:: intersection_line_line_2d
.. autofunction:: is_axes_aligned_rectangle_2d
.. autofunction:: is_convex_polygon_2d
.. autofunction:: is_point_in_polygon_2d
.. autofunction:: is_point_left_of_line
.. autofunction:: is_point_on_line_2d
.. autofunction:: offset_vertices_2d
.. code-block:: Python
source = [(0, 0), (3, 0), (3, 3), (0, 3)]
result = list(offset_vertices_2d(source, offset=0.5, closed=True))
.. image:: gfx/offset_vertices_2d_1.png
Example for a closed collinear shape, which creates 2 additional vertices and the first one has an unexpected location:
.. code-block:: Python
source = [(0, 0), (0, 1), (0, 2), (0, 3)]
result = list(offset_vertices_2d(source, offset=0.5, closed=True))
.. image:: gfx/offset_vertices_2d_2.png
.. autofunction:: point_to_line_relation
.. autofunction:: rytz_axis_construction
3D Graphic Functions
====================
.. autosummary::
:nosignatures:
basic_transformation
best_fit_normal
bezier_to_bspline
closed_uniform_bspline
cubic_bezier_bbox
cubic_bezier_from_3p
cubic_bezier_from_arc
cubic_bezier_from_ellipse
cubic_bezier_interpolation
distance_point_line_3d
estimate_end_tangent_magnitude
estimate_tangents
fit_points_to_cad_cv
fit_points_to_cubic_bezier
global_bspline_interpolation
have_bezier_curves_g1_continuity
intersect_polylines_3d
intersection_line_line_3d
intersection_line_polygon_3d
intersection_ray_polygon_3d
intersection_ray_ray_3d
is_planar_face
is_vertex_order_ccw_3d
linear_vertex_spacing
local_cubic_bspline_interpolation
normal_vector_3p
open_uniform_bspline
quadratic_bezier_bbox
quadratic_bezier_from_3p
quadratic_to_cubic_bezier
rational_bspline_from_arc
rational_bspline_from_ellipse
safe_normal_vector
spherical_envelope
split_bezier
split_polygon_by_plane
subdivide_face
subdivide_ngons
.. seealso::
The free online book `3D Math Primer for Graphics and Game Development <https://gamemath.com/>`_
is a very good resource for learning vector math and other graphic related topics,
it is easy to read for beginners and especially targeted to programmers.
.. autofunction:: basic_transformation
.. autofunction:: best_fit_normal
.. autofunction:: bezier_to_bspline
.. autofunction:: closed_uniform_bspline
.. autofunction:: cubic_bezier_bbox
.. autofunction:: cubic_bezier_from_3p
.. autofunction:: cubic_bezier_from_arc
.. autofunction:: cubic_bezier_from_ellipse
.. autofunction:: cubic_bezier_interpolation
.. autofunction:: distance_point_line_3d
.. autofunction:: estimate_end_tangent_magnitude
.. autofunction:: estimate_tangents
.. autofunction:: fit_points_to_cad_cv
.. autofunction:: fit_points_to_cubic_bezier
.. autofunction:: global_bspline_interpolation
.. autofunction:: have_bezier_curves_g1_continuity
.. autofunction:: intersect_polylines_3d
.. autofunction:: intersection_line_line_3d
.. autofunction:: intersection_line_polygon_3d
.. autofunction:: intersection_ray_polygon_3d
.. autofunction:: intersection_ray_ray_3d
.. autofunction:: is_planar_face
.. autofunction:: is_vertex_order_ccw_3d
.. autofunction:: linear_vertex_spacing
.. autofunction:: local_cubic_bspline_interpolation
.. autofunction:: normal_vector_3p
.. autofunction:: open_uniform_bspline
.. autofunction:: quadratic_bezier_bbox
.. autofunction:: quadratic_bezier_from_3p
.. autofunction:: quadratic_to_cubic_bezier
.. autofunction:: rational_bspline_from_arc
.. autofunction:: rational_bspline_from_ellipse
.. autofunction:: safe_normal_vector
.. autofunction:: spherical_envelope
.. autofunction:: split_bezier
.. autofunction:: split_polygon_by_plane
.. autofunction:: subdivide_face
.. autofunction:: subdivide_ngons
Transformation Classes
======================
.. autosummary::
:nosignatures:
Matrix44
OCS
UCS
OCS Class
---------
.. autoclass:: OCS
.. autoattribute:: ux
.. autoattribute:: uy
.. autoattribute:: uz
.. automethod:: from_wcs
.. automethod:: points_from_wcs
.. automethod:: to_wcs
.. automethod:: points_to_wcs
.. automethod:: render_axis
UCS Class
---------
.. autoclass:: UCS
.. autoattribute:: ux
.. autoattribute:: uy
.. autoattribute:: uz
.. autoattribute:: is_cartesian
.. automethod:: copy
.. automethod:: to_wcs
.. automethod:: points_to_wcs
.. automethod:: direction_to_wcs
.. automethod:: from_wcs
.. automethod:: points_from_wcs
.. automethod:: direction_from_wcs
.. automethod:: to_ocs
.. automethod:: points_to_ocs
.. automethod:: to_ocs_angle_deg
.. automethod:: transform
.. automethod:: rotate
.. automethod:: rotate_local_x
.. automethod:: rotate_local_y
.. automethod:: rotate_local_z
.. automethod:: shift
.. automethod:: moveto
.. automethod:: from_x_axis_and_point_in_xy
.. automethod:: from_x_axis_and_point_in_xz
.. automethod:: from_y_axis_and_point_in_xy
.. automethod:: from_y_axis_and_point_in_yz
.. automethod:: from_z_axis_and_point_in_xz
.. automethod:: from_z_axis_and_point_in_yz
.. automethod:: render_axis
Matrix44
--------
.. autoclass:: Matrix44
.. automethod:: __repr__
.. automethod:: get_row
.. automethod:: set_row
.. automethod:: get_col
.. automethod:: set_col
.. automethod:: copy
.. automethod:: __copy__
.. automethod:: scale
.. automethod:: translate
.. automethod:: x_rotate
.. automethod:: y_rotate
.. automethod:: z_rotate
.. automethod:: axis_rotate
.. automethod:: xyz_rotate
.. automethod:: shear_xy
.. automethod:: perspective_projection
.. automethod:: perspective_projection_fov
.. automethod:: chain
.. automethod:: ucs
.. automethod:: __hash__
.. automethod:: __getitem__
.. automethod:: __setitem__
.. automethod:: __iter__
.. automethod:: rows
.. automethod:: columns
.. automethod:: __mul__
.. automethod:: __imul__
.. automethod:: transform
.. automethod:: transform_direction
.. automethod:: transform_vertices
.. automethod:: fast_2d_transform
.. automethod:: transform_directions
.. automethod:: transpose
.. automethod:: determinant
.. automethod:: inverse
.. autoproperty:: is_cartesian
.. autoproperty:: is_orthogonal
Basic Construction Classes
==========================
.. autosummary::
:nosignatures:
BoundingBox
BoundingBox2d
ConstructionArc
ConstructionBox
ConstructionCircle
ConstructionEllipse
ConstructionLine
ConstructionPolyline
ConstructionRay
Plane
Shape2d
Vec2
Vec3
UVec
----
.. class:: UVec
Type alias for :code:`Union[Sequence[float], Vec2, Vec3]`
Vec3
----
.. autoclass:: Vec3
.. autoattribute:: x
.. autoattribute:: y
.. autoattribute:: z
.. autoattribute:: xy
.. autoattribute:: xyz
.. autoattribute:: vec2
.. autoattribute:: magnitude
.. autoattribute:: magnitude_xy
.. autoattribute:: magnitude_square
.. autoattribute:: is_null
.. autoattribute:: angle
.. autoattribute:: angle_deg
.. autoattribute:: spatial_angle
.. autoattribute:: spatial_angle_deg
.. automethod:: __str__
.. automethod:: __repr__
.. automethod:: __len__
.. automethod:: __hash__
.. automethod:: copy
.. automethod:: __copy__
.. automethod:: __deepcopy__
.. automethod:: __getitem__
.. automethod:: __iter__
.. automethod:: __abs__
.. automethod:: replace
.. automethod:: generate
.. automethod:: list
.. automethod:: tuple
.. automethod:: from_angle
.. automethod:: from_deg_angle
.. automethod:: orthogonal
.. automethod:: lerp
.. automethod:: is_parallel
.. automethod:: project
.. automethod:: normalize
.. automethod:: reversed
.. automethod:: isclose
.. automethod:: __neg__
.. automethod:: __bool__
.. automethod:: __eq__
.. automethod:: __lt__
.. automethod:: __add__
.. automethod:: __radd__
.. automethod:: __sub__
.. automethod:: __rsub__
.. automethod:: __mul__
.. automethod:: __rmul__
.. automethod:: __truediv__
.. automethod:: dot
.. automethod:: cross
.. automethod:: distance
.. automethod:: angle_about
.. automethod:: angle_between
.. automethod:: rotate
.. automethod:: rotate_deg
.. automethod:: sum
.. attribute:: X_AXIS
:code:`Vec3(1, 0, 0)`
.. attribute:: Y_AXIS
:code:`Vec3(0, 1, 0)`
.. attribute:: Z_AXIS
:code:`Vec3(0, 0, 1)`
.. attribute:: NULLVEC
:code:`Vec3(0, 0, 0)`
Vec2
----
.. autoclass:: Vec2
Plane
-----
.. autoclass:: Plane(normal: Vec3, distance: float)
.. autoattribute:: normal
.. autoattribute:: distance_from_origin
.. autoattribute:: vector
.. automethod:: from_3p
.. automethod:: from_vector
.. automethod:: copy
.. automethod:: signed_distance_to
.. automethod:: distance_to
.. automethod:: is_coplanar_vertex
.. automethod:: is_coplanar_plane
.. automethod:: intersect_line
.. automethod:: intersect_ray
BoundingBox
-----------
.. autoclass:: BoundingBox
.. attribute:: extmin
"lower left" corner of bounding box
.. attribute:: extmax
"upper right" corner of bounding box
.. autoproperty:: is_empty
.. autoproperty:: has_data
.. autoproperty:: size
.. autoproperty:: center
.. automethod:: inside
.. automethod:: any_inside
.. automethod:: all_inside
.. automethod:: has_intersection
.. automethod:: has_overlap
.. automethod:: contains
.. automethod:: extend
.. automethod:: union
.. automethod:: intersection
.. automethod:: rect_vertices
.. automethod:: cube_vertices
.. automethod:: grow
BoundingBox2d
-------------
.. autoclass:: BoundingBox2d
.. attribute:: extmin
"lower left" corner of bounding box
.. attribute:: extmax
"upper right" corner of bounding box
.. autoproperty:: is_empty
.. autoproperty:: has_data
.. autoproperty:: size
.. autoproperty:: center
.. automethod:: inside
.. automethod:: any_inside
.. automethod:: all_inside
.. automethod:: has_intersection
.. automethod:: has_overlap
.. automethod:: contains
.. automethod:: extend
.. automethod:: union
.. automethod:: intersection
.. automethod:: rect_vertices
ConstructionRay
---------------
.. autoclass:: ConstructionRay
.. autoattribute:: location
.. autoattribute:: direction
.. autoattribute:: slope
.. autoattribute:: angle
.. autoattribute:: angle_deg
.. autoattribute:: is_vertical
.. autoattribute:: is_horizontal
.. automethod:: __str__
.. automethod:: is_parallel
.. automethod:: intersect
.. automethod:: orthogonal
.. automethod:: bisectrix
.. automethod:: yof
.. automethod:: xof
ConstructionLine
----------------
.. autoclass:: ConstructionLine
.. attribute:: start
start point as :class:`Vec2`
.. attribute:: end
end point as :class:`Vec2`
.. autoattribute:: bounding_box
.. autoattribute:: ray
.. autoattribute:: is_vertical
.. autoattribute:: is_horizontal
.. automethod:: __str__
.. automethod:: translate
.. automethod:: length
.. automethod:: midpoint
.. automethod:: inside_bounding_box
.. automethod:: intersect
.. automethod:: has_intersection
.. automethod:: is_point_left_of_line
ConstructionCircle
------------------
.. autoclass:: ConstructionCircle
.. attribute:: center
center point as :class:`Vec2`
.. attribute:: radius
radius as float
.. autoattribute:: bounding_box
.. automethod:: from_3p
.. automethod:: __str__
.. automethod:: translate
.. automethod:: point_at
.. automethod:: vertices
.. automethod:: flattening
.. automethod:: inside
.. automethod:: tangent
.. automethod:: intersect_ray
.. automethod:: intersect_line
.. automethod:: intersect_circle
ConstructionArc
---------------
.. autoclass:: ConstructionArc
.. attribute:: center
center point as :class:`Vec2`
.. attribute:: radius
radius as float
.. attribute:: start_angle
start angle in degrees
.. attribute:: end_angle
end angle in degrees
.. autoattribute:: angle_span
.. autoattribute:: start_angle_rad
.. autoattribute:: end_angle_rad
.. autoattribute:: start_point
.. autoattribute:: end_point
.. autoattribute:: bounding_box
.. automethod:: angles
.. automethod:: vertices
.. automethod:: tangents
.. automethod:: translate
.. automethod:: scale_uniform
.. automethod:: rotate_z
.. automethod:: from_2p_angle
.. automethod:: from_2p_radius
.. automethod:: from_3p
.. automethod:: add_to_layout
.. automethod:: intersect_ray
.. automethod:: intersect_line
.. automethod:: intersect_circle
.. automethod:: intersect_arc
ConstructionEllipse
-------------------
.. autoclass:: ConstructionEllipse
.. attribute:: center
center point as :class:`Vec3`
.. attribute:: major_axis
major axis as :class:`Vec3`
.. attribute:: minor_axis
minor axis as :class:`Vec3`, automatically calculated from
:attr:`major_axis` and :attr:`extrusion`.
.. attribute:: extrusion
extrusion vector (normal of ellipse plane) as :class:`Vec3`
.. attribute:: ratio
ratio of minor axis to major axis (float)
.. attribute:: start
start param in radians (float)
.. attribute:: end
end param in radians (float)
.. autoattribute:: start_point
.. autoattribute:: end_point
.. autoproperty:: param_span
.. automethod:: to_ocs
.. automethod:: params
.. automethod:: vertices
.. automethod:: flattening
.. automethod:: params_from_vertices
.. automethod:: dxfattribs
.. automethod:: main_axis_points
.. automethod:: from_arc
.. automethod:: transform
.. automethod:: swap_axis
.. automethod:: add_to_layout
ConstructionBox
---------------
.. autoclass:: ConstructionBox
.. autoattribute:: center
.. autoattribute:: width
.. autoattribute:: height
.. autoattribute:: angle
.. autoattribute:: corners
.. autoattribute:: bounding_box
.. autoattribute:: incircle_radius
.. autoattribute:: circumcircle_radius
.. automethod:: __iter__
.. automethod:: __getitem__
.. automethod:: __repr__
.. automethod:: from_points
.. automethod:: translate
.. automethod:: expand
.. automethod:: scale
.. automethod:: rotate
.. automethod:: is_inside
.. automethod:: is_any_corner_inside
.. automethod:: is_overlapping
.. automethod:: border_lines
.. automethod:: intersect
ConstructionPolyline
--------------------
.. autoclass:: ConstructionPolyline
.. autoproperty:: length
.. autoproperty:: is_closed
.. automethod:: data
.. automethod:: index_at
.. automethod:: vertex_at
.. automethod:: divide
.. automethod:: divide_by_length
Shape2d
-------
.. autoclass:: Shape2d
.. attribute:: vertices
List of :class:`Vec2` objects
.. autoattribute:: bounding_box
.. automethod:: __len__
.. automethod:: __getitem__
.. automethod:: append
.. automethod:: extend
.. automethod:: translate
.. automethod:: scale
.. automethod:: scale_uniform
.. automethod:: rotate
.. automethod:: rotate_rad
.. automethod:: offset
.. automethod:: convex_hull
Curves
======
.. autosummary::
:nosignatures:
ApproxParamT
BSpline
Bezier
Bezier3P
Bezier4P
EulerSpiral
BSpline
-------
.. autoclass:: BSpline
.. autoproperty:: control_points
.. autoproperty:: count
.. autoproperty:: order
.. autoproperty:: degree
.. autoproperty:: max_t
.. autoproperty:: is_rational
.. autoproperty:: is_clamped
.. automethod:: knots
.. automethod:: weights
.. automethod:: params
.. automethod:: reverse
.. automethod:: transform
.. automethod:: approximate
.. automethod:: flattening
.. automethod:: point
.. automethod:: points
.. automethod:: derivative
.. automethod:: derivatives
.. automethod:: insert_knot
.. automethod:: knot_refinement
.. automethod:: from_ellipse
.. automethod:: from_arc
.. automethod:: from_fit_points
.. automethod:: arc_approximation
.. automethod:: ellipse_approximation
.. automethod:: bezier_decomposition
.. automethod:: cubic_bezier_approximation
.. automethod:: degree_elevation
.. automethod:: point_inversion
.. automethod:: measure
.. automethod:: split
.. autoclass:: ezdxf.math.bspline.Measurement
.. attribute:: extmin
minimum extents of the approximated curve as :class:`~ezdxf.math.Vec3`
.. attribute:: extmax
maximum extents of the approximated curve as :class:`~ezdxf.math.Vec3`
.. autoproperty:: length
.. automethod:: distance
.. automethod:: param_at
.. automethod:: divide
Bezier
------
.. autoclass:: Bezier
.. autoattribute:: control_points
.. automethod:: params
.. automethod:: reverse
.. automethod:: transform
.. automethod:: approximate
.. automethod:: flattening
.. automethod:: point
.. automethod:: points
.. automethod:: derivative
.. automethod:: derivatives
Bezier4P
--------
.. autoclass:: Bezier4P
.. autoattribute:: control_points
.. automethod:: reverse
.. automethod:: transform
.. automethod:: approximate
.. automethod:: flattening
.. automethod:: approximated_length
.. automethod:: point
.. automethod:: tangent
Bezier3P
--------
.. autoclass:: Bezier3P
.. autoattribute:: control_points
.. automethod:: reverse
.. automethod:: transform
.. automethod:: approximate
.. automethod:: flattening
.. automethod:: approximated_length
.. automethod:: point
.. automethod:: tangent
ApproxParamT
------------
.. autoclass:: ApproxParamT(curve, *, max_t: float = 1.0, segments: int = 100)
.. autoproperty:: max_t
.. autoproperty:: polyline
.. automethod:: param_t
.. automethod:: distance
EulerSpiral
-----------
.. autoclass:: EulerSpiral
.. automethod:: radius
.. automethod:: tangent
.. automethod:: distance
.. automethod:: point
.. automethod:: circle_center
.. automethod:: approximate
.. automethod:: bspline
.. _Global Curve Interpolation: http://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/INT-APP/CURVE-INT-global.html
.. _uniform: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/INT-APP/PARA-uniform.html
.. _chord length: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/INT-APP/PARA-chord-length.html
.. _centripetal: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/INT-APP/PARA-centripetal.html
.. _knot: http://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/INT-APP/PARA-knot-generation.html
.. _clamped curve: http://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-curve.html
.. _open curve: http://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-curve-open.html
.. _closed curve: http://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-curve-closed.html
.. _basis: http://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-basis_vector.html
.. _B-spline: https://en.wikipedia.org/wiki/B-spline
.. _Bézier curve: https://en.wikipedia.org/wiki/B%C3%A9zier_curve
.. _Lee Mac: http://www.lee-mac.com/bulgeconversion.html
.. _sagitta: https://en.wikipedia.org/wiki/Sagitta_(geometry)
|