DeepSDFStruct 1.7.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. DeepSDFStruct/SDF.py +1734 -0
  2. DeepSDFStruct/__init__.py +66 -0
  3. DeepSDFStruct/deep_sdf/__init__.py +69 -0
  4. DeepSDFStruct/deep_sdf/create_screenshots_from_plyfiles.py +65 -0
  5. DeepSDFStruct/deep_sdf/data.py +258 -0
  6. DeepSDFStruct/deep_sdf/metrics/__init__.py +14 -0
  7. DeepSDFStruct/deep_sdf/metrics/mesh_to_analytical.py +24 -0
  8. DeepSDFStruct/deep_sdf/models.py +197 -0
  9. DeepSDFStruct/deep_sdf/networks/__init__.py +8 -0
  10. DeepSDFStruct/deep_sdf/networks/analytic_round_cross.py +105 -0
  11. DeepSDFStruct/deep_sdf/networks/deep_sdf_decoder.py +155 -0
  12. DeepSDFStruct/deep_sdf/networks/hierarchical_deep_sdf_decoder.py +139 -0
  13. DeepSDFStruct/deep_sdf/networks/hierarchical_positional_sdf_decoder.py +190 -0
  14. DeepSDFStruct/deep_sdf/networks/resnet_positional_sdf_decoder.py +108 -0
  15. DeepSDFStruct/deep_sdf/nn_utils.py +70 -0
  16. DeepSDFStruct/deep_sdf/plotting.py +143 -0
  17. DeepSDFStruct/deep_sdf/reconstruction.py +165 -0
  18. DeepSDFStruct/deep_sdf/training.py +840 -0
  19. DeepSDFStruct/deep_sdf/workspace.py +363 -0
  20. DeepSDFStruct/design_of_experiments.py +235 -0
  21. DeepSDFStruct/flexicubes/__init__.py +15 -0
  22. DeepSDFStruct/flexicubes/flexicubes.py +1005 -0
  23. DeepSDFStruct/flexicubes/tables.py +2338 -0
  24. DeepSDFStruct/flexisquares/__init__.py +15 -0
  25. DeepSDFStruct/flexisquares/flexisquares.py +967 -0
  26. DeepSDFStruct/flexisquares/tables.py +63 -0
  27. DeepSDFStruct/lattice_structure.py +254 -0
  28. DeepSDFStruct/local_shapes.py +226 -0
  29. DeepSDFStruct/mesh.py +1184 -0
  30. DeepSDFStruct/optimization.py +357 -0
  31. DeepSDFStruct/parametrization.py +215 -0
  32. DeepSDFStruct/pretrained_models.py +128 -0
  33. DeepSDFStruct/sampling.py +670 -0
  34. DeepSDFStruct/sdf_operations.py +990 -0
  35. DeepSDFStruct/sdf_primitives.py +1416 -0
  36. DeepSDFStruct/splinepy_unitcells/__init__.py +35 -0
  37. DeepSDFStruct/splinepy_unitcells/chi_3D.py +1617 -0
  38. DeepSDFStruct/splinepy_unitcells/cross_lattice.py +165 -0
  39. DeepSDFStruct/splinepy_unitcells/double_lattice_extruded.py +298 -0
  40. DeepSDFStruct/splinepy_unitcells/snappy_3d.py +544 -0
  41. DeepSDFStruct/torch_spline.py +446 -0
  42. DeepSDFStruct/trained_models/analytic_round_cross/LatentCodes/latest.pth +0 -0
  43. DeepSDFStruct/trained_models/analytic_round_cross/ModelParameters/latest.pth +0 -0
  44. DeepSDFStruct/trained_models/analytic_round_cross/OptimizerParameters/latest.pth +0 -0
  45. DeepSDFStruct/trained_models/analytic_round_cross/specs.json +45 -0
  46. DeepSDFStruct/trained_models/chi_and_cross/LatentCodes/latest.pth +0 -0
  47. DeepSDFStruct/trained_models/chi_and_cross/Logs.pth +0 -0
  48. DeepSDFStruct/trained_models/chi_and_cross/ModelParameters/latest.pth +0 -0
  49. DeepSDFStruct/trained_models/chi_and_cross/OptimizerParameters/latest.pth +0 -0
  50. DeepSDFStruct/trained_models/chi_and_cross/specs.json +76 -0
  51. DeepSDFStruct/trained_models/primitives/LatentCodes/latest.pth +0 -0
  52. DeepSDFStruct/trained_models/primitives/ModelParameters/latest.pth +0 -0
  53. DeepSDFStruct/trained_models/primitives/OptimizerParameters/latest.pth +0 -0
  54. DeepSDFStruct/trained_models/primitives/specs.json +46 -0
  55. DeepSDFStruct/trained_models/primitives_2d/LatentCodes/latest.pth +0 -0
  56. DeepSDFStruct/trained_models/primitives_2d/ModelParameters/latest.pth +0 -0
  57. DeepSDFStruct/trained_models/primitives_2d/OptimizerParameters/latest.pth +0 -0
  58. DeepSDFStruct/trained_models/primitives_2d/specs.json +46 -0
  59. DeepSDFStruct/trained_models/round_cross/LatentCodes/latest.pth +0 -0
  60. DeepSDFStruct/trained_models/round_cross/Logs.pth +0 -0
  61. DeepSDFStruct/trained_models/round_cross/ModelParameters/latest.pth +0 -0
  62. DeepSDFStruct/trained_models/round_cross/OptimizerParameters/latest.pth +0 -0
  63. DeepSDFStruct/trained_models/round_cross/specs.json +45 -0
  64. DeepSDFStruct/trained_models/test_experiment/LatentCodes/latent_code_data_map.json +106 -0
  65. DeepSDFStruct/trained_models/test_experiment/specs.json +45 -0
  66. DeepSDFStruct/trained_models/test_experiment/training_summary.json +10 -0
  67. DeepSDFStruct/trained_models/test_experiment_hierarchical/LatentCodes/latent_code_data_map.json +106 -0
  68. DeepSDFStruct/trained_models/test_experiment_hierarchical/specs.json +45 -0
  69. DeepSDFStruct/trained_models/test_experiment_hierarchical/training_summary.json +10 -0
  70. DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latent_code_data_map.json +5006 -0
  71. DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latest.pth +0 -0
  72. DeepSDFStruct/trained_models/test_experiment_homogenization/Logs.png +0 -0
  73. DeepSDFStruct/trained_models/test_experiment_homogenization/ModelParameters/latest.pth +0 -0
  74. DeepSDFStruct/trained_models/test_experiment_homogenization/OptimizerParameters/latest.pth +0 -0
  75. DeepSDFStruct/trained_models/test_experiment_homogenization/specs.json +83 -0
  76. DeepSDFStruct/trained_models/test_experiment_homogenization/training_summary.json +10 -0
  77. DeepSDFStruct/utils.py +96 -0
  78. DeepSDFStruct/visualization/latent_viewer.py +211 -0
  79. DeepSDFStruct/visualization/latent_viewer_cli.py +8 -0
  80. benchmarks/generate_sdf_showcase.py +622 -0
  81. benchmarks/sdf_from_mesh_benchmark.py +52 -0
  82. benchmarks/sdf_from_mesh_comparison.md +33 -0
  83. benchmarks/sdf_showcase/operations/boolean/difference_sphere_box.png +0 -0
  84. benchmarks/sdf_showcase/operations/boolean/union_sphere_box.png +0 -0
  85. benchmarks/sdf_showcase/operations/transformations/circular_array_sphere.png +0 -0
  86. benchmarks/sdf_showcase/operations/transformations/dilate_sphere.png +0 -0
  87. benchmarks/sdf_showcase/operations/transformations/mirror_sphere.png +0 -0
  88. benchmarks/sdf_showcase/operations/transformations/repeat_sphere.png +0 -0
  89. benchmarks/sdf_showcase/operations/transformations/revolve_circle.png +0 -0
  90. benchmarks/sdf_showcase/operations/transformations/shell_sphere.png +0 -0
  91. benchmarks/sdf_showcase/operations/transformations/twist_torus.png +0 -0
  92. benchmarks/sdf_showcase/primitives/2D/circle.png +0 -0
  93. benchmarks/sdf_showcase/primitives/2D/equilateral_triangle.png +0 -0
  94. benchmarks/sdf_showcase/primitives/2D/hexagon.png +0 -0
  95. benchmarks/sdf_showcase/primitives/2D/polygon_pentagon.png +0 -0
  96. benchmarks/sdf_showcase/primitives/2D/rectangle.png +0 -0
  97. benchmarks/sdf_showcase/primitives/2D/rounded_rectangle.png +0 -0
  98. benchmarks/sdf_showcase/primitives/3D/box.png +0 -0
  99. benchmarks/sdf_showcase/primitives/3D/capped_cone.png +0 -0
  100. benchmarks/sdf_showcase/primitives/3D/capped_cylinder.png +0 -0
  101. benchmarks/sdf_showcase/primitives/3D/capsule.png +0 -0
  102. benchmarks/sdf_showcase/primitives/3D/cone.png +0 -0
  103. benchmarks/sdf_showcase/primitives/3D/corner_spheres.png +0 -0
  104. benchmarks/sdf_showcase/primitives/3D/cross_ms.png +0 -0
  105. benchmarks/sdf_showcase/primitives/3D/cylinder.png +0 -0
  106. benchmarks/sdf_showcase/primitives/3D/dodecahedron.png +0 -0
  107. benchmarks/sdf_showcase/primitives/3D/ellipsoid.png +0 -0
  108. benchmarks/sdf_showcase/primitives/3D/icosahedron.png +0 -0
  109. benchmarks/sdf_showcase/primitives/3D/octahedron.png +0 -0
  110. benchmarks/sdf_showcase/primitives/3D/pyramid.png +0 -0
  111. benchmarks/sdf_showcase/primitives/3D/rounded_box.png +0 -0
  112. benchmarks/sdf_showcase/primitives/3D/rounded_cone.png +0 -0
  113. benchmarks/sdf_showcase/primitives/3D/rounded_cylinder.png +0 -0
  114. benchmarks/sdf_showcase/primitives/3D/sphere.png +0 -0
  115. benchmarks/sdf_showcase/primitives/3D/tetrahedron.png +0 -0
  116. benchmarks/sdf_showcase/primitives/3D/torus.png +0 -0
  117. benchmarks/sdf_showcase/primitives/3D/wireframe_box.png +0 -0
  118. deepsdfstruct-1.7.2.dist-info/METADATA +44 -0
  119. deepsdfstruct-1.7.2.dist-info/RECORD +165 -0
  120. deepsdfstruct-1.7.2.dist-info/WHEEL +5 -0
  121. deepsdfstruct-1.7.2.dist-info/licenses/LICENSE +208 -0
  122. deepsdfstruct-1.7.2.dist-info/licenses/NOTICE +67 -0
  123. deepsdfstruct-1.7.2.dist-info/scm_file_list.json +178 -0
  124. deepsdfstruct-1.7.2.dist-info/scm_version.json +8 -0
  125. deepsdfstruct-1.7.2.dist-info/top_level.txt +4 -0
  126. docs/Makefile +20 -0
  127. docs/api_reference.rst +6 -0
  128. docs/conf.py +60 -0
  129. docs/index.rst +136 -0
  130. docs/make.bat +35 -0
  131. docs/qr_code_github.png +0 -0
  132. docs/qr_code_paper.png +0 -0
  133. docs/readme_images/example_output_01.png +0 -0
  134. docs/readme_images/example_output_02.png +0 -0
  135. docs/readme_images/example_output_03.png +0 -0
  136. docs/readme_images/example_output_04.png +0 -0
  137. tests/data/chairs/1005.obj +282 -0
  138. tests/data/chairs/1024.obj +222 -0
  139. tests/data/chairs/README.md +1 -0
  140. tests/data/circular_balls_test_case.stl +0 -0
  141. tests/data/cone.stl +1794 -0
  142. tests/data/example_disconnectd_mesh.inp +1784 -0
  143. tests/data/example_line_mesh.vtk +0 -0
  144. tests/data/stanford_bunny.stl +0 -0
  145. tests/data/sweep_test_case.stl +0 -0
  146. tests/test_DOE.py +49 -0
  147. tests/test_elongate_sdf.py +195 -0
  148. tests/test_flexisquares.py +187 -0
  149. tests/test_generate_dataset.py +76 -0
  150. tests/test_lattice_evaluation.py +137 -0
  151. tests/test_mesh_export.py +137 -0
  152. tests/test_mesh_functions.py +49 -0
  153. tests/test_networks.py +71 -0
  154. tests/test_pretrained_models.py +40 -0
  155. tests/test_reconstruction.py +101 -0
  156. tests/test_sdf_from_mesh.py +52 -0
  157. tests/test_sdf_functions.py +117 -0
  158. tests/test_sdf_primitives.py +668 -0
  159. tests/test_sdf_trimesh_comparison.py +482 -0
  160. tests/test_splinepy_unitcells.py +64 -0
  161. tests/test_structural_optimization.py +178 -0
  162. tests/test_torch_spline.py +216 -0
  163. tests/test_train_model.py +110 -0
  164. tests/test_training_data_ids.py +41 -0
  165. tests/tmp_outputs/temp_file.txt +0 -0
@@ -0,0 +1,178 @@
1
+ {
2
+ "files": [
3
+ "LICENSE",
4
+ "uv.lock",
5
+ ".pre-commit-config.yaml",
6
+ "pyproject.toml",
7
+ "MANIFEST.in",
8
+ "NOTICE",
9
+ ".deepsource.toml",
10
+ "README.md",
11
+ "example.ipynb",
12
+ ".gitignore",
13
+ "AGENT_INSTRUCTIONS.md",
14
+ "SDF_FEATURE_TRACKING.md",
15
+ "tests/test_mesh_functions.py",
16
+ "tests/test_torch_spline.py",
17
+ "tests/test_DOE.py",
18
+ "tests/test_mesh_export.py",
19
+ "tests/test_sdf_trimesh_comparison.py",
20
+ "tests/test_flexisquares.py",
21
+ "tests/test_train_model.py",
22
+ "tests/test_pretrained_models.py",
23
+ "tests/test_sdf_primitives.py",
24
+ "tests/test_structural_optimization.py",
25
+ "tests/test_sdf_functions.py",
26
+ "tests/test_sdf_from_mesh.py",
27
+ "tests/test_networks.py",
28
+ "tests/test_training_data_ids.py",
29
+ "tests/test_elongate_sdf.py",
30
+ "tests/test_lattice_evaluation.py",
31
+ "tests/test_generate_dataset.py",
32
+ "tests/test_reconstruction.py",
33
+ "tests/test_splinepy_unitcells.py",
34
+ "tests/tmp_outputs/temp_file.txt",
35
+ "tests/data/stanford_bunny.stl",
36
+ "tests/data/example_disconnectd_mesh.inp",
37
+ "tests/data/sweep_test_case.stl",
38
+ "tests/data/cone.stl",
39
+ "tests/data/circular_balls_test_case.stl",
40
+ "tests/data/example_line_mesh.vtk",
41
+ "tests/data/chairs/1024.obj",
42
+ "tests/data/chairs/README.md",
43
+ "tests/data/chairs/1005.obj",
44
+ "docs/index.rst",
45
+ "docs/api_reference.rst",
46
+ "docs/qr_code_paper.png",
47
+ "docs/Makefile",
48
+ "docs/qr_code_github.png",
49
+ "docs/conf.py",
50
+ "docs/make.bat",
51
+ "docs/readme_images/example_output_01.png",
52
+ "docs/readme_images/example_output_02.png",
53
+ "docs/readme_images/example_output_03.png",
54
+ "docs/readme_images/example_output_04.png",
55
+ "benchmarks/generate_sdf_showcase.py",
56
+ "benchmarks/sdf_from_mesh_benchmark.py",
57
+ "benchmarks/sdf_from_mesh_comparison.md",
58
+ "benchmarks/sdf_showcase/operations/transformations/shell_sphere.png",
59
+ "benchmarks/sdf_showcase/operations/transformations/mirror_sphere.png",
60
+ "benchmarks/sdf_showcase/operations/transformations/circular_array_sphere.png",
61
+ "benchmarks/sdf_showcase/operations/transformations/twist_torus.png",
62
+ "benchmarks/sdf_showcase/operations/transformations/dilate_sphere.png",
63
+ "benchmarks/sdf_showcase/operations/transformations/repeat_sphere.png",
64
+ "benchmarks/sdf_showcase/operations/transformations/revolve_circle.png",
65
+ "benchmarks/sdf_showcase/operations/boolean/union_sphere_box.png",
66
+ "benchmarks/sdf_showcase/operations/boolean/difference_sphere_box.png",
67
+ "benchmarks/sdf_showcase/primitives/3D/icosahedron.png",
68
+ "benchmarks/sdf_showcase/primitives/3D/ellipsoid.png",
69
+ "benchmarks/sdf_showcase/primitives/3D/rounded_box.png",
70
+ "benchmarks/sdf_showcase/primitives/3D/sphere.png",
71
+ "benchmarks/sdf_showcase/primitives/3D/corner_spheres.png",
72
+ "benchmarks/sdf_showcase/primitives/3D/torus.png",
73
+ "benchmarks/sdf_showcase/primitives/3D/dodecahedron.png",
74
+ "benchmarks/sdf_showcase/primitives/3D/rounded_cone.png",
75
+ "benchmarks/sdf_showcase/primitives/3D/cone.png",
76
+ "benchmarks/sdf_showcase/primitives/3D/capsule.png",
77
+ "benchmarks/sdf_showcase/primitives/3D/capped_cylinder.png",
78
+ "benchmarks/sdf_showcase/primitives/3D/cross_ms.png",
79
+ "benchmarks/sdf_showcase/primitives/3D/wireframe_box.png",
80
+ "benchmarks/sdf_showcase/primitives/3D/tetrahedron.png",
81
+ "benchmarks/sdf_showcase/primitives/3D/cylinder.png",
82
+ "benchmarks/sdf_showcase/primitives/3D/octahedron.png",
83
+ "benchmarks/sdf_showcase/primitives/3D/pyramid.png",
84
+ "benchmarks/sdf_showcase/primitives/3D/rounded_cylinder.png",
85
+ "benchmarks/sdf_showcase/primitives/3D/box.png",
86
+ "benchmarks/sdf_showcase/primitives/3D/capped_cone.png",
87
+ "benchmarks/sdf_showcase/primitives/2D/rounded_rectangle.png",
88
+ "benchmarks/sdf_showcase/primitives/2D/hexagon.png",
89
+ "benchmarks/sdf_showcase/primitives/2D/rectangle.png",
90
+ "benchmarks/sdf_showcase/primitives/2D/circle.png",
91
+ "benchmarks/sdf_showcase/primitives/2D/polygon_pentagon.png",
92
+ "benchmarks/sdf_showcase/primitives/2D/equilateral_triangle.png",
93
+ "DeepSDFStruct/pretrained_models.py",
94
+ "DeepSDFStruct/sdf_primitives.py",
95
+ "DeepSDFStruct/optimization.py",
96
+ "DeepSDFStruct/lattice_structure.py",
97
+ "DeepSDFStruct/__init__.py",
98
+ "DeepSDFStruct/mesh.py",
99
+ "DeepSDFStruct/sdf_operations.py",
100
+ "DeepSDFStruct/utils.py",
101
+ "DeepSDFStruct/SDF.py",
102
+ "DeepSDFStruct/design_of_experiments.py",
103
+ "DeepSDFStruct/sampling.py",
104
+ "DeepSDFStruct/local_shapes.py",
105
+ "DeepSDFStruct/parametrization.py",
106
+ "DeepSDFStruct/torch_spline.py",
107
+ "DeepSDFStruct/visualization/latent_viewer_cli.py",
108
+ "DeepSDFStruct/visualization/latent_viewer.py",
109
+ "DeepSDFStruct/flexicubes/__init__.py",
110
+ "DeepSDFStruct/flexicubes/tables.py",
111
+ "DeepSDFStruct/flexicubes/flexicubes.py",
112
+ "DeepSDFStruct/trained_models/primitives_2d/specs.json",
113
+ "DeepSDFStruct/trained_models/primitives_2d/OptimizerParameters/latest.pth",
114
+ "DeepSDFStruct/trained_models/primitives_2d/LatentCodes/latest.pth",
115
+ "DeepSDFStruct/trained_models/primitives_2d/ModelParameters/latest.pth",
116
+ "DeepSDFStruct/trained_models/test_experiment_hierarchical/specs.json",
117
+ "DeepSDFStruct/trained_models/test_experiment_hierarchical/training_summary.json",
118
+ "DeepSDFStruct/trained_models/test_experiment_hierarchical/LatentCodes/latent_code_data_map.json",
119
+ "DeepSDFStruct/trained_models/test_experiment_homogenization/Logs.png",
120
+ "DeepSDFStruct/trained_models/test_experiment_homogenization/specs.json",
121
+ "DeepSDFStruct/trained_models/test_experiment_homogenization/training_summary.json",
122
+ "DeepSDFStruct/trained_models/test_experiment_homogenization/OptimizerParameters/latest.pth",
123
+ "DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latent_code_data_map.json",
124
+ "DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latest.pth",
125
+ "DeepSDFStruct/trained_models/test_experiment_homogenization/ModelParameters/latest.pth",
126
+ "DeepSDFStruct/trained_models/primitives/specs.json",
127
+ "DeepSDFStruct/trained_models/primitives/OptimizerParameters/latest.pth",
128
+ "DeepSDFStruct/trained_models/primitives/LatentCodes/latest.pth",
129
+ "DeepSDFStruct/trained_models/primitives/ModelParameters/latest.pth",
130
+ "DeepSDFStruct/trained_models/test_experiment/specs.json",
131
+ "DeepSDFStruct/trained_models/test_experiment/training_summary.json",
132
+ "DeepSDFStruct/trained_models/test_experiment/LatentCodes/latent_code_data_map.json",
133
+ "DeepSDFStruct/trained_models/chi_and_cross/specs.json",
134
+ "DeepSDFStruct/trained_models/chi_and_cross/Logs.pth",
135
+ "DeepSDFStruct/trained_models/chi_and_cross/OptimizerParameters/latest.pth",
136
+ "DeepSDFStruct/trained_models/chi_and_cross/LatentCodes/latest.pth",
137
+ "DeepSDFStruct/trained_models/chi_and_cross/ModelParameters/latest.pth",
138
+ "DeepSDFStruct/trained_models/analytic_round_cross/specs.json",
139
+ "DeepSDFStruct/trained_models/analytic_round_cross/OptimizerParameters/latest.pth",
140
+ "DeepSDFStruct/trained_models/analytic_round_cross/LatentCodes/latest.pth",
141
+ "DeepSDFStruct/trained_models/analytic_round_cross/ModelParameters/latest.pth",
142
+ "DeepSDFStruct/trained_models/round_cross/specs.json",
143
+ "DeepSDFStruct/trained_models/round_cross/Logs.pth",
144
+ "DeepSDFStruct/trained_models/round_cross/OptimizerParameters/latest.pth",
145
+ "DeepSDFStruct/trained_models/round_cross/LatentCodes/latest.pth",
146
+ "DeepSDFStruct/trained_models/round_cross/ModelParameters/latest.pth",
147
+ "DeepSDFStruct/deep_sdf/reconstruction.py",
148
+ "DeepSDFStruct/deep_sdf/models.py",
149
+ "DeepSDFStruct/deep_sdf/plotting.py",
150
+ "DeepSDFStruct/deep_sdf/__init__.py",
151
+ "DeepSDFStruct/deep_sdf/workspace.py",
152
+ "DeepSDFStruct/deep_sdf/create_screenshots_from_plyfiles.py",
153
+ "DeepSDFStruct/deep_sdf/nn_utils.py",
154
+ "DeepSDFStruct/deep_sdf/training.py",
155
+ "DeepSDFStruct/deep_sdf/data.py",
156
+ "DeepSDFStruct/deep_sdf/metrics/mesh_to_analytical.py",
157
+ "DeepSDFStruct/deep_sdf/metrics/__init__.py",
158
+ "DeepSDFStruct/deep_sdf/networks/__init__.py",
159
+ "DeepSDFStruct/deep_sdf/networks/analytic_round_cross.py",
160
+ "DeepSDFStruct/deep_sdf/networks/resnet_positional_sdf_decoder.py",
161
+ "DeepSDFStruct/deep_sdf/networks/hierarchical_positional_sdf_decoder.py",
162
+ "DeepSDFStruct/deep_sdf/networks/hierarchical_deep_sdf_decoder.py",
163
+ "DeepSDFStruct/deep_sdf/networks/deep_sdf_decoder.py",
164
+ "DeepSDFStruct/flexisquares/__init__.py",
165
+ "DeepSDFStruct/flexisquares/flexisquares.py",
166
+ "DeepSDFStruct/flexisquares/tables.py",
167
+ "DeepSDFStruct/splinepy_unitcells/cross_lattice.py",
168
+ "DeepSDFStruct/splinepy_unitcells/__init__.py",
169
+ "DeepSDFStruct/splinepy_unitcells/snappy_3d.py",
170
+ "DeepSDFStruct/splinepy_unitcells/chi_3D.py",
171
+ "DeepSDFStruct/splinepy_unitcells/double_lattice_extruded.py",
172
+ ".github/copilot-instructions.md",
173
+ ".github/workflows/publish.yml",
174
+ ".github/workflows/test.yml",
175
+ ".github/workflows/docs.yml",
176
+ ".github/workflows/copilot-setup-steps.yml"
177
+ ]
178
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "1.7.2",
3
+ "distance": 0,
4
+ "node": "g27ad05453a6ccc347866c55444c7d82d2b8b6f6d",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-07-10"
8
+ }
@@ -0,0 +1,4 @@
1
+ DeepSDFStruct
2
+ benchmarks
3
+ docs
4
+ tests
docs/Makefile ADDED
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
docs/api_reference.rst ADDED
@@ -0,0 +1,6 @@
1
+ .. autosummary::
2
+ :toctree: source/generated
3
+ :template:
4
+ :recursive:
5
+
6
+ DeepSDFStruct
docs/conf.py ADDED
@@ -0,0 +1,60 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ project = "DeepSDFStruct"
10
+ copyright = "2025, Michael Kofler"
11
+ author = "Michael Kofler"
12
+
13
+ # Try to get version from package, fallback to default if not installed
14
+ try:
15
+ from importlib.metadata import version as package_version
16
+
17
+ release = str(package_version("DeepSDFStruct"))
18
+ except Exception:
19
+ release = "latest"
20
+
21
+ # -- General configuration ---------------------------------------------------
22
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
23
+
24
+ extensions = []
25
+
26
+ templates_path = ["_templates"]
27
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
28
+
29
+
30
+ # -- Options for HTML output -------------------------------------------------
31
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
32
+
33
+ html_theme = "pydata_sphinx_theme"
34
+ html_static_path = ["_static"]
35
+
36
+ # -- Extensions --------------------------------------------------------------
37
+ extensions = [
38
+ "sphinx.ext.autodoc",
39
+ "sphinx.ext.autosummary",
40
+ "sphinx.ext.napoleon",
41
+ "sphinx_autodoc_typehints",
42
+ ]
43
+
44
+
45
+ autosummary_context = {"skipmethods": ["__init__"]}
46
+
47
+
48
+ autodoc_default_options = {
49
+ "members": True,
50
+ "undoc-members": True,
51
+ "show-inheritance": True,
52
+ "autosummary": True,
53
+ }
54
+
55
+ autodoc_typehints_format = "fully-qualified" # show full package.module.Class
56
+ autodoc_typehints_description_target = "all" # document args + return types
57
+ autodoc_typehints = "both"
58
+
59
+
60
+ html_theme_options = {"collapse_navigation": False, "navigation_depth": 4}
docs/index.rst ADDED
@@ -0,0 +1,136 @@
1
+ DeepSDFStruct Documentation
2
+ ===========================
3
+
4
+ **DeepSDFStruct** is a differentiable framework for generating and deforming 3D microstructured materials using Signed Distance Functions (SDFs) and spline-based lattices. The library provides tools for creating, manipulating, and optimizing complex 3D geometries with applications in additive manufacturing, materials science, and computational design.
5
+
6
+ Overview
7
+ --------
8
+
9
+ DeepSDFStruct combines classical geometric representations (SDFs, splines) with deep learning approaches to enable:
10
+
11
+ * **Flexible Geometry Definition**: Define complex 3D structures using primitive shapes, lattice patterns, or learned implicit representations
12
+ * **Differentiable Operations**: All operations are PyTorch-compatible, enabling gradient-based optimization
13
+ * **Mesh Generation**: Extract high-quality surface and volume meshes using FlexiCubes and FlexiSquares algorithms
14
+ * **Deep Learning Integration**: Train neural networks to represent and generate novel geometric structures
15
+ * **Structural Optimization**: Optimize designs for specific mechanical properties or manufacturing constraints
16
+
17
+ Key Features
18
+ ------------
19
+
20
+ Signed Distance Functions (SDFs)
21
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22
+
23
+ The core abstraction is the ``SDFBase`` class, which represents geometries as implicit functions that return the signed distance to the nearest surface. The library provides:
24
+
25
+ * **Primitive Shapes**: Spheres, cylinders, boxes, tori, and other basic geometric primitives
26
+ * **Lattice Structures**: Periodic microstructures with customizable unit cells
27
+ * **Mesh-based SDFs**: Convert existing triangle meshes to SDF representations
28
+ * **Deep Learning SDFs**: Neural network-based implicit representations trained from data
29
+ * **Composition Operations**: Combine multiple SDFs using boolean operations (union, intersection, difference)
30
+
31
+ Spline-based Deformations
32
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
33
+
34
+ DeepSDFStruct uses B-splines for smooth, parametric deformations:
35
+
36
+ * **TorchSpline**: PyTorch-compatible spline evaluation for differentiable operations
37
+ * **Parametrization**: Define spatially-varying material properties or geometry parameters
38
+
39
+ Mesh Generation
40
+ ~~~~~~~~~~~~~~~
41
+
42
+ Generate high-quality meshes from SDF representations:
43
+
44
+ * **FlexiCubes**: Advanced dual contouring for smooth, feature-preserving surface meshes
45
+ * **FlexiSquares**: 2D mesh extraction for cross-sections and planar geometries
46
+ * **Volume Meshing**: Generate tetrahedral meshes for finite element analysis
47
+ * **Mesh Processing**: Clean, repair, and optimize generated meshes
48
+
49
+ Deep Learning Components
50
+ ~~~~~~~~~~~~~~~~~~~~~~~~
51
+
52
+ Train neural networks to learn geometric representations:
53
+
54
+ * **DeepSDF Architecture**: Multi-layer perceptron decoder for implicit geometry
55
+ * **Hierarchical Models**: Multi-scale representations for complex structures
56
+ * **Training Pipeline**: Complete workflow for dataset generation, training, and inference
57
+ * **Latent Space Optimization**: Optimize learned representations for specific objectives
58
+
59
+ Optimization and Analysis
60
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
61
+
62
+ Tools for structural design and optimization:
63
+
64
+ * **Gradient-based Optimization**: Leverage automatic differentiation for shape optimization
65
+ * **MMA Optimizer**: Method of Moving Asymptotes for constrained optimization
66
+ * **Finite Element Integration**: Interface with TorchFEM for structural analysis
67
+ * **Design of Experiments**: Generate parameter sweeps and design spaces
68
+
69
+ Core Modules
70
+ ------------
71
+
72
+ * ``DeepSDFStruct.SDF``: Base classes for signed distance functions
73
+ * ``DeepSDFStruct.mesh``: Mesh generation and processing utilities
74
+ * ``DeepSDFStruct.lattice_structure``: Periodic lattice structure generation
75
+ * ``DeepSDFStruct.sdf_primitives``: Primitive geometric shapes
76
+ * ``DeepSDFStruct.sampling``: Strategies for sampling points from SDFs
77
+ * ``DeepSDFStruct.optimization``: Optimization algorithms and utilities
78
+ * ``DeepSDFStruct.torch_spline``: PyTorch-compatible B-spline operations
79
+ * ``DeepSDFStruct.parametrization``: Parametrization functions for spatially-varying properties
80
+ * ``DeepSDFStruct.deep_sdf``: Deep learning models and training pipelines
81
+ * ``DeepSDFStruct.flexicubes``: FlexiCubes mesh extraction algorithm
82
+ * ``DeepSDFStruct.flexisquares``: FlexiSquares 2D mesh extraction
83
+ * ``DeepSDFStruct.splinepy_unitcells``: Predefined unit cell geometries
84
+
85
+ Installation
86
+ ------------
87
+
88
+ Install directly from GitHub using pip::
89
+
90
+ pip install git+https://github.com/mkofler96/DeepSDFStruct.git
91
+
92
+ Or add to your UV project::
93
+
94
+ uv add git+https://github.com/mkofler96/DeepSDFStruct.git
95
+
96
+ Quick Start
97
+ -----------
98
+
99
+ Basic SDF operations::
100
+
101
+ import torch
102
+ from DeepSDFStruct.sdf_primitives import SphereSDF, CylinderSDF
103
+ from DeepSDFStruct.mesh import create_3D_mesh
104
+
105
+ # Create a sphere SDF
106
+ sphere = SphereSDF(center=[0, 0, 0], radius=0.5)
107
+
108
+ # Query SDF values
109
+ points = torch.tensor([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]])
110
+ distances = sphere(points)
111
+
112
+ # Generate mesh
113
+ mesh = create_3D_mesh(sphere, resolution=64)
114
+
115
+ For more examples, see the `example notebook <https://github.com/mkofler96/DeepSDFStruct/blob/main/example.ipynb>`_.
116
+
117
+ .. toctree::
118
+ :maxdepth: 2
119
+ :caption: Contents:
120
+
121
+ api_reference
122
+
123
+ Indices and tables
124
+ ==================
125
+
126
+ * :ref:`genindex`
127
+ * :ref:`modindex`
128
+ * :ref:`search`
129
+
130
+ QR Codes to paper and Code
131
+ ------------
132
+ Kofler, M., Giritsch, M. & Elgeti, S. Structural optimization of lattice structures using deep neural networks as geometry representation. Graphical Models 142, 101307 (2025).
133
+ .. image:: qr_code_paper.png
134
+
135
+ Github Repository
136
+ .. image:: qr_code_github.png
docs/make.bat ADDED
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
Binary file
docs/qr_code_paper.png ADDED
Binary file
Binary file
Binary file
Binary file
Binary file