python_shared.cpp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. #include "python_shared.h"
  2. #include <sstream>
  3. #include <string>
  4. #include <fstream>
  5. extern void python_export_vector(py::module &);
  6. extern void python_export_igl(py::module &);
  7. #ifdef PY_VIEWER
  8. extern void python_export_igl_viewer(py::module &);
  9. #endif
  10. #ifdef PY_COMISO
  11. extern void python_export_igl_comiso(py::module &);
  12. #endif
  13. #ifdef PY_TETGEN
  14. extern void python_export_igl_tetgen(py::module &);
  15. #endif
  16. #ifdef PY_EMBREE
  17. extern void python_export_igl_embree(py::module &);
  18. #endif
  19. #ifdef PY_TRIANGLE
  20. extern void python_export_igl_triangle(py::module &);
  21. #endif
  22. #ifdef PY_CGAL
  23. extern void python_export_igl_cgal(py::module &);
  24. #endif
  25. #ifdef PY_COPYLEFT
  26. extern void python_export_igl_copyleft(py::module &);
  27. #endif
  28. #ifdef PY_PNG
  29. extern void python_export_igl_png(py::module &);
  30. #endif
  31. #ifdef PY_BBW
  32. extern void python_export_igl_bbw(py::module &);
  33. #endif
  34. PYBIND11_PLUGIN(pyigl) {
  35. py::module m("pyigl", R"pyigldoc(
  36. Python wrappers for libigl
  37. --------------------------
  38. .. currentmodule:: pyigl
  39. .. autosummary::
  40. :toctree: _generate
  41. AABB
  42. ARAPEnergyType
  43. MeshBooleanType
  44. SolverStatus
  45. active_set
  46. arap
  47. avg_edge_length
  48. barycenter
  49. barycentric_coordinates
  50. bbw_bbw
  51. boundary_conditions
  52. boundary_facets
  53. boundary_loop
  54. cat
  55. collapse_edge
  56. colon
  57. column_to_quats
  58. comb_cross_field
  59. comb_frame_field
  60. compute_frame_field_bisectors
  61. copyleft_cgal_mesh_boolean
  62. copyleft_comiso_miq
  63. copyleft_comiso_nrosy
  64. copyleft_marching_cubes
  65. copyleft_swept_volume
  66. copyleft_tetgen_tetrahedralize
  67. cotmatrix
  68. covariance_scatter_matrix
  69. cross_field_missmatch
  70. cut_mesh_from_singularities
  71. deform_skeleton
  72. directed_edge_orientations
  73. directed_edge_parents
  74. doublearea
  75. dqs
  76. edge_lengths
  77. eigs
  78. embree_ambient_occlusion
  79. embree_reorient_facets_raycast
  80. find_cross_field_singularities
  81. fit_rotations
  82. floor
  83. forward_kinematics
  84. gaussian_curvature
  85. get_seconds
  86. grad
  87. harmonic
  88. hsv_to_rgb
  89. internal_angles
  90. invert_diag
  91. is_irregular_vertex
  92. jet
  93. lbs_matrix
  94. local_basis
  95. lscm
  96. map_vertices_to_circle
  97. massmatrix
  98. min_quad_with_fixed
  99. n_polyvector
  100. normalize_row_lengths
  101. normalize_row_sums
  102. parula
  103. per_corner_normals
  104. per_edge_normals
  105. per_face_normals
  106. per_vertex_normals
  107. planarize_quad_mesh
  108. png_readPNG
  109. png_writePNG
  110. point_mesh_squared_distance
  111. polar_svd
  112. principal_curvature
  113. quad_planarity
  114. randperm
  115. readDMAT
  116. readMESH
  117. readOBJ
  118. readOFF
  119. readTGF
  120. read_triangle_mesh
  121. rotate_vectors
  122. setdiff
  123. signed_distance
  124. slice
  125. slice_into
  126. slice_mask
  127. slice_tets
  128. sortrows
  129. triangle_triangulate
  130. unique
  131. unproject_onto_mesh
  132. upsample
  133. winding_number
  134. writeMESH
  135. writeOBJ
  136. )pyigldoc");
  137. python_export_vector(m);
  138. python_export_igl(m);
  139. #ifdef PY_VIEWER
  140. python_export_igl_viewer(m);
  141. #endif
  142. #ifdef PY_COMISO
  143. python_export_igl_comiso(m);
  144. #endif
  145. #ifdef PY_TETGEN
  146. python_export_igl_tetgen(m);
  147. #endif
  148. #ifdef PY_EMBREE
  149. python_export_igl_embree(m);
  150. #endif
  151. #ifdef PY_TRIANGLE
  152. python_export_igl_triangle(m);
  153. #endif
  154. #ifdef PY_CGAL
  155. python_export_igl_cgal(m);
  156. #endif
  157. #ifdef PY_COPYLEFT
  158. python_export_igl_copyleft(m);
  159. #endif
  160. #ifdef PY_PNG
  161. python_export_igl_png(m);
  162. #endif
  163. #ifdef PY_BBW
  164. python_export_igl_bbw(m);
  165. #endif
  166. return m.ptr();
  167. }