python_shared.cpp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #include "python_shared.h"
  9. #include <sstream>
  10. #include <string>
  11. #include <fstream>
  12. extern void python_export_vector(py::module &);
  13. extern void python_export_igl(py::module &);
  14. #ifdef PY_GLFW
  15. extern void python_export_igl_glfw(py::module &);
  16. #endif
  17. #ifdef PY_COMISO
  18. extern void python_export_igl_comiso(py::module &);
  19. #endif
  20. #ifdef PY_TETGEN
  21. extern void python_export_igl_tetgen(py::module &);
  22. #endif
  23. #ifdef PY_EMBREE
  24. extern void python_export_igl_embree(py::module &);
  25. #endif
  26. #ifdef PY_TRIANGLE
  27. extern void python_export_igl_triangle(py::module &);
  28. #endif
  29. #ifdef PY_CGAL
  30. extern void python_export_igl_cgal(py::module &);
  31. #endif
  32. #ifdef PY_COPYLEFT
  33. extern void python_export_igl_copyleft(py::module &);
  34. #endif
  35. #ifdef PY_PNG
  36. extern void python_export_igl_png(py::module &);
  37. #endif
  38. PYBIND11_PLUGIN(pyigl) {
  39. py::module m("pyigl", R"pyigldoc(
  40. Python wrappers for libigl
  41. --------------------------
  42. .. currentmodule:: pyigl
  43. .. autosummary::
  44. :toctree: _generate
  45. AABB
  46. ARAPEnergyType
  47. MeshBooleanType
  48. SolverStatus
  49. active_set
  50. adjacency_list
  51. arap
  52. avg_edge_length
  53. barycenter
  54. barycentric_coordinates
  55. barycentric_to_global
  56. bbw
  57. boundary_conditions
  58. boundary_facets
  59. boundary_loop
  60. cat
  61. collapse_edge
  62. colon
  63. column_to_quats
  64. comb_cross_field
  65. comb_frame_field
  66. compute_frame_field_bisectors
  67. copyleft_cgal_RemeshSelfIntersectionsParam
  68. copyleft_cgal_mesh_boolean
  69. copyleft_cgal_remesh_self_intersections
  70. copyleft_comiso_miq
  71. copyleft_comiso_nrosy
  72. copyleft_marching_cubes
  73. copyleft_swept_volume
  74. copyleft_tetgen_tetrahedralize
  75. cotmatrix
  76. covariance_scatter_matrix
  77. cross_field_mismatch
  78. cut_mesh_from_singularities
  79. deform_skeleton
  80. directed_edge_orientations
  81. directed_edge_parents
  82. doublearea
  83. dqs
  84. edge_lengths
  85. edge_topology
  86. eigs
  87. embree_ambient_occlusion
  88. embree_line_mesh_intersection
  89. embree_reorient_facets_raycast
  90. find_cross_field_singularities
  91. fit_rotations
  92. floor
  93. forward_kinematics
  94. gaussian_curvature
  95. get_seconds
  96. grad
  97. harmonic
  98. hsv_to_rgb
  99. internal_angles
  100. invert_diag
  101. is_irregular_vertex
  102. jet
  103. lbs_matrix
  104. local_basis
  105. lscm
  106. map_vertices_to_circle
  107. massmatrix
  108. min_quad_with_fixed
  109. normalize_row_lengths
  110. normalize_row_sums
  111. parula
  112. per_corner_normals
  113. per_edge_normals
  114. per_face_normals
  115. per_vertex_normals
  116. planarize_quad_mesh
  117. png_readPNG
  118. png_writePNG
  119. point_mesh_squared_distance
  120. polar_svd
  121. principal_curvature
  122. quad_planarity
  123. randperm
  124. readDMAT
  125. readMESH
  126. readOBJ
  127. readOFF
  128. readTGF
  129. read_triangle_mesh
  130. remove_duplicate_vertices
  131. rotate_vectors
  132. setdiff
  133. signed_distance
  134. slice
  135. slice_into
  136. slice_mask
  137. marching_tets
  138. sortrows
  139. streamlines
  140. triangle_triangle_adjacency
  141. triangle_triangulate
  142. unique
  143. unproject_onto_mesh
  144. upsample
  145. winding_number
  146. writeMESH
  147. writeOBJ
  148. writePLY
  149. readPLY
  150. )pyigldoc");
  151. python_export_vector(m);
  152. python_export_igl(m);
  153. #ifdef PY_GLFW
  154. python_export_igl_glfw(m);
  155. #endif
  156. #ifdef PY_COMISO
  157. python_export_igl_comiso(m);
  158. #endif
  159. #ifdef PY_TETGEN
  160. python_export_igl_tetgen(m);
  161. #endif
  162. #ifdef PY_EMBREE
  163. python_export_igl_embree(m);
  164. #endif
  165. #ifdef PY_TRIANGLE
  166. python_export_igl_triangle(m);
  167. #endif
  168. #ifdef PY_CGAL
  169. python_export_igl_cgal(m);
  170. #endif
  171. #ifdef PY_COPYLEFT
  172. python_export_igl_copyleft(m);
  173. #endif
  174. #ifdef PY_PNG
  175. python_export_igl_png(m);
  176. #endif
  177. return m.ptr();
  178. }