DeepSDFStruct 1.7.2__tar.gz → 1.7.3__tar.gz
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.
- deepsdfstruct-1.7.3/.github/workflows/publish.yml +56 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/flexicubes/flexicubes.py +57 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct.egg-info/PKG-INFO +1 -1
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct.egg-info/SOURCES.txt +1 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct.egg-info/scm_file_list.json +129 -128
- deepsdfstruct-1.7.3/DeepSDFStruct.egg-info/scm_version.json +8 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/PKG-INFO +1 -1
- deepsdfstruct-1.7.3/tests/test_tet_orientation.py +88 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/uv.lock +850 -117
- deepsdfstruct-1.7.2/.github/workflows/publish.yml +0 -56
- deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/scm_version.json +0 -8
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/.deepsource.toml +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/.github/copilot-instructions.md +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/.github/workflows/copilot-setup-steps.yml +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/.github/workflows/docs.yml +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/.github/workflows/test.yml +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/.gitignore +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/.pre-commit-config.yaml +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/AGENT_INSTRUCTIONS.md +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/SDF.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/__init__.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/__init__.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/create_screenshots_from_plyfiles.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/data.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/metrics/__init__.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/metrics/mesh_to_analytical.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/models.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/networks/__init__.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/networks/analytic_round_cross.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/networks/deep_sdf_decoder.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/networks/hierarchical_deep_sdf_decoder.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/networks/hierarchical_positional_sdf_decoder.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/networks/resnet_positional_sdf_decoder.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/nn_utils.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/plotting.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/reconstruction.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/training.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/deep_sdf/workspace.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/design_of_experiments.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/flexicubes/__init__.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/flexicubes/tables.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/flexisquares/__init__.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/flexisquares/flexisquares.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/flexisquares/tables.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/lattice_structure.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/local_shapes.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/mesh.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/optimization.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/parametrization.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/pretrained_models.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/sampling.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/sdf_operations.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/sdf_primitives.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/splinepy_unitcells/__init__.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/splinepy_unitcells/chi_3D.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/splinepy_unitcells/cross_lattice.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/splinepy_unitcells/double_lattice_extruded.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/splinepy_unitcells/snappy_3d.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/torch_spline.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/analytic_round_cross/LatentCodes/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/analytic_round_cross/ModelParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/analytic_round_cross/OptimizerParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/analytic_round_cross/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/chi_and_cross/LatentCodes/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/chi_and_cross/Logs.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/chi_and_cross/ModelParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/chi_and_cross/OptimizerParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/chi_and_cross/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives/LatentCodes/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives/ModelParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives/OptimizerParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives_2d/LatentCodes/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives_2d/ModelParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives_2d/OptimizerParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/primitives_2d/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/round_cross/LatentCodes/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/round_cross/Logs.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/round_cross/ModelParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/round_cross/OptimizerParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/round_cross/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment/LatentCodes/latent_code_data_map.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment/training_summary.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_hierarchical/LatentCodes/latent_code_data_map.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_hierarchical/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_hierarchical/training_summary.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latent_code_data_map.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_homogenization/Logs.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_homogenization/ModelParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_homogenization/OptimizerParameters/latest.pth +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_homogenization/specs.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/trained_models/test_experiment_homogenization/training_summary.json +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/utils.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/visualization/latent_viewer.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct/visualization/latent_viewer_cli.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct.egg-info/dependency_links.txt +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct.egg-info/requires.txt +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/DeepSDFStruct.egg-info/top_level.txt +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/LICENSE +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/MANIFEST.in +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/NOTICE +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/README.md +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/SDF_FEATURE_TRACKING.md +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/generate_sdf_showcase.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_from_mesh_benchmark.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_from_mesh_comparison.md +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/boolean/difference_sphere_box.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/boolean/union_sphere_box.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/transformations/circular_array_sphere.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/transformations/dilate_sphere.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/transformations/mirror_sphere.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/transformations/repeat_sphere.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/transformations/revolve_circle.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/transformations/shell_sphere.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/operations/transformations/twist_torus.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/2D/circle.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/2D/equilateral_triangle.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/2D/hexagon.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/2D/polygon_pentagon.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/2D/rectangle.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/2D/rounded_rectangle.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/box.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/capped_cone.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/capped_cylinder.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/capsule.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/cone.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/corner_spheres.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/cross_ms.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/cylinder.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/dodecahedron.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/ellipsoid.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/icosahedron.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/octahedron.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/pyramid.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/rounded_box.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/rounded_cone.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/rounded_cylinder.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/sphere.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/tetrahedron.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/torus.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/benchmarks/sdf_showcase/primitives/3D/wireframe_box.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/Makefile +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/api_reference.rst +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/conf.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/index.rst +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/make.bat +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/qr_code_github.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/qr_code_paper.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/readme_images/example_output_01.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/readme_images/example_output_02.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/readme_images/example_output_03.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/docs/readme_images/example_output_04.png +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/example.ipynb +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/pyproject.toml +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/setup.cfg +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/chairs/1005.obj +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/chairs/1024.obj +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/chairs/README.md +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/circular_balls_test_case.stl +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/cone.stl +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/example_disconnectd_mesh.inp +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/example_line_mesh.vtk +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/stanford_bunny.stl +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/data/sweep_test_case.stl +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_DOE.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_elongate_sdf.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_flexisquares.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_generate_dataset.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_lattice_evaluation.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_mesh_export.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_mesh_functions.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_networks.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_pretrained_models.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_reconstruction.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_sdf_from_mesh.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_sdf_functions.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_sdf_primitives.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_sdf_trimesh_comparison.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_splinepy_unitcells.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_structural_optimization.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_torch_spline.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_train_model.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/test_training_data_ids.py +0 -0
- {deepsdfstruct-1.7.2 → deepsdfstruct-1.7.3}/tests/tmp_outputs/temp_file.txt +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
uses: ./.github/workflows/test.yml
|
|
11
|
+
secrets: inherit
|
|
12
|
+
|
|
13
|
+
publish:
|
|
14
|
+
needs: test
|
|
15
|
+
if: github.ref_type == 'tag'
|
|
16
|
+
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
environment:
|
|
19
|
+
name: pypi
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
id-token: write
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout repository
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
|
|
31
|
+
- name: Set up Python
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.13"
|
|
35
|
+
|
|
36
|
+
- name: Install uv
|
|
37
|
+
uses: astral-sh/setup-uv@v6
|
|
38
|
+
with:
|
|
39
|
+
enable-cache: true
|
|
40
|
+
|
|
41
|
+
- name: Verify stable tag format
|
|
42
|
+
shell: bash
|
|
43
|
+
run: |
|
|
44
|
+
if [[ ! "$GITHUB_REF_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
45
|
+
echo "::error::Tag '$GITHUB_REF_NAME' must be in the format vX.Y.Z"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
- name: Sync dependencies
|
|
50
|
+
run: uv sync --locked
|
|
51
|
+
|
|
52
|
+
- name: Build package
|
|
53
|
+
run: uv build
|
|
54
|
+
|
|
55
|
+
- name: Publish to PyPI
|
|
56
|
+
run: uv publish
|
|
@@ -28,10 +28,14 @@ Licensed under the Apache License, Version 2.0.
|
|
|
28
28
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
29
|
# See the License for the specific language governing permissions and
|
|
30
30
|
# limitations under the License.
|
|
31
|
+
import logging
|
|
32
|
+
|
|
31
33
|
import torch
|
|
32
34
|
import warnings
|
|
33
35
|
from DeepSDFStruct.flexicubes.tables import *
|
|
34
36
|
|
|
37
|
+
logger = logging.getLogger(__name__)
|
|
38
|
+
|
|
35
39
|
__all__ = ["FlexiCubes"]
|
|
36
40
|
|
|
37
41
|
|
|
@@ -1002,4 +1006,57 @@ class FlexiCubes:
|
|
|
1002
1006
|
|
|
1003
1007
|
tets = torch.cat([tets_surface, tets_inside])
|
|
1004
1008
|
vertices = torch.cat([vertices, inside_verts, inside_cubes_center])
|
|
1009
|
+
# The surface (pyramid) and interior sub-procedures above emit tets
|
|
1010
|
+
# with inconsistent winding, so a large fraction come out inverted
|
|
1011
|
+
# (negative signed volume). FEA solvers require a positive signed
|
|
1012
|
+
# volume / Jacobian, so normalize every tet to positive orientation
|
|
1013
|
+
# and drop degenerate (zero-volume) elements.
|
|
1014
|
+
tets = self._orient_tets(vertices, tets)
|
|
1005
1015
|
return vertices, tets
|
|
1016
|
+
|
|
1017
|
+
@staticmethod
|
|
1018
|
+
def _orient_tets(vertices, tets, threshold_factor=1e-5):
|
|
1019
|
+
"""Return ``tets`` with a consistent, strictly positive signed volume.
|
|
1020
|
+
|
|
1021
|
+
For a tetrahedron with vertices ``(v0, v1, v2, v3)`` the signed volume
|
|
1022
|
+
is proportional to ``det([v1 - v0, v2 - v0, v3 - v0])``. Elements with
|
|
1023
|
+
a negative determinant are inverted; swapping the last two vertices
|
|
1024
|
+
flips the orientation so the signed volume becomes positive without
|
|
1025
|
+
changing the element's geometry. The vertex indices are merely
|
|
1026
|
+
reordered, so gradients to ``vertices`` are unaffected.
|
|
1027
|
+
|
|
1028
|
+
Degenerate elements (four coplanar vertices, zero volume) cannot be
|
|
1029
|
+
repaired by reordering and are removed instead. Vertices are left
|
|
1030
|
+
untouched, so indices of the remaining tets stay valid.
|
|
1031
|
+
|
|
1032
|
+
Args:
|
|
1033
|
+
vertices (torch.Tensor): All vertices as coordinates
|
|
1034
|
+
tets (torch.Tensor): Indices of vertices that form tets
|
|
1035
|
+
threshold_factor (float, optional): Maximum element volume
|
|
1036
|
+
up until the elements get removed. Gets multiplied by
|
|
1037
|
+
the Hadamard bound |e1||e2||e3|.
|
|
1038
|
+
"""
|
|
1039
|
+
if tets.shape[0] == 0:
|
|
1040
|
+
return tets
|
|
1041
|
+
# Only integer index masks are derived here, so skip autograd
|
|
1042
|
+
# recording even when ``vertices`` requires gradients.
|
|
1043
|
+
with torch.no_grad():
|
|
1044
|
+
v0 = vertices[tets[:, 0]]
|
|
1045
|
+
v1 = vertices[tets[:, 1]]
|
|
1046
|
+
v2 = vertices[tets[:, 2]]
|
|
1047
|
+
v3 = vertices[tets[:, 3]]
|
|
1048
|
+
e1, e2, e3 = v1 - v0, v2 - v0, v3 - v0
|
|
1049
|
+
signed_vol = torch.einsum("ij,ij->i", e1, torch.linalg.cross(e2, e3, dim=1))
|
|
1050
|
+
inverted = signed_vol < 0
|
|
1051
|
+
# Coplanar tets only evaluate to exactly zero up to floating-point
|
|
1052
|
+
# rounding (which depends on the association order of the triple
|
|
1053
|
+
# product), so compare against a tolerance relative to the Hadamard
|
|
1054
|
+
# bound |e1||e2||e3| of the determinant instead of zero itself.
|
|
1055
|
+
scale = e1.norm(dim=1) * e2.norm(dim=1) * e3.norm(dim=1)
|
|
1056
|
+
degenerate = signed_vol.abs() <= threshold_factor * scale
|
|
1057
|
+
tets = tets.clone()
|
|
1058
|
+
tets[inverted] = tets[inverted][:, [0, 1, 3, 2]]
|
|
1059
|
+
if degenerate.any():
|
|
1060
|
+
logger.info(f"removed {int(degenerate.sum())} elements with 0 volume")
|
|
1061
|
+
tets = tets[~degenerate]
|
|
1062
|
+
return tets
|
|
@@ -166,6 +166,7 @@ tests/test_sdf_primitives.py
|
|
|
166
166
|
tests/test_sdf_trimesh_comparison.py
|
|
167
167
|
tests/test_splinepy_unitcells.py
|
|
168
168
|
tests/test_structural_optimization.py
|
|
169
|
+
tests/test_tet_orientation.py
|
|
169
170
|
tests/test_torch_spline.py
|
|
170
171
|
tests/test_train_model.py
|
|
171
172
|
tests/test_training_data_ids.py
|
|
@@ -1,178 +1,179 @@
|
|
|
1
1
|
{
|
|
2
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
3
|
".gitignore",
|
|
4
|
+
"README.md",
|
|
13
5
|
"AGENT_INSTRUCTIONS.md",
|
|
6
|
+
"example.ipynb",
|
|
14
7
|
"SDF_FEATURE_TRACKING.md",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
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",
|
|
8
|
+
".deepsource.toml",
|
|
9
|
+
"NOTICE",
|
|
10
|
+
"pyproject.toml",
|
|
11
|
+
"MANIFEST.in",
|
|
12
|
+
".pre-commit-config.yaml",
|
|
13
|
+
"uv.lock",
|
|
14
|
+
"LICENSE",
|
|
55
15
|
"benchmarks/generate_sdf_showcase.py",
|
|
56
16
|
"benchmarks/sdf_from_mesh_benchmark.py",
|
|
57
17
|
"benchmarks/sdf_from_mesh_comparison.md",
|
|
58
|
-
"benchmarks/sdf_showcase/
|
|
59
|
-
"benchmarks/sdf_showcase/
|
|
60
|
-
"benchmarks/sdf_showcase/
|
|
61
|
-
"benchmarks/sdf_showcase/
|
|
62
|
-
"benchmarks/sdf_showcase/
|
|
63
|
-
"benchmarks/sdf_showcase/
|
|
64
|
-
"benchmarks/sdf_showcase/
|
|
65
|
-
"benchmarks/sdf_showcase/
|
|
66
|
-
"benchmarks/sdf_showcase/
|
|
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",
|
|
18
|
+
"benchmarks/sdf_showcase/primitives/2D/rectangle.png",
|
|
19
|
+
"benchmarks/sdf_showcase/primitives/2D/rounded_rectangle.png",
|
|
20
|
+
"benchmarks/sdf_showcase/primitives/2D/equilateral_triangle.png",
|
|
21
|
+
"benchmarks/sdf_showcase/primitives/2D/hexagon.png",
|
|
22
|
+
"benchmarks/sdf_showcase/primitives/2D/circle.png",
|
|
23
|
+
"benchmarks/sdf_showcase/primitives/2D/polygon_pentagon.png",
|
|
24
|
+
"benchmarks/sdf_showcase/primitives/3D/capsule.png",
|
|
25
|
+
"benchmarks/sdf_showcase/primitives/3D/cylinder.png",
|
|
26
|
+
"benchmarks/sdf_showcase/primitives/3D/wireframe_box.png",
|
|
70
27
|
"benchmarks/sdf_showcase/primitives/3D/sphere.png",
|
|
28
|
+
"benchmarks/sdf_showcase/primitives/3D/cross_ms.png",
|
|
29
|
+
"benchmarks/sdf_showcase/primitives/3D/cone.png",
|
|
71
30
|
"benchmarks/sdf_showcase/primitives/3D/corner_spheres.png",
|
|
72
|
-
"benchmarks/sdf_showcase/primitives/3D/torus.png",
|
|
73
31
|
"benchmarks/sdf_showcase/primitives/3D/dodecahedron.png",
|
|
74
|
-
"benchmarks/sdf_showcase/primitives/3D/
|
|
75
|
-
"benchmarks/sdf_showcase/primitives/3D/cone.png",
|
|
76
|
-
"benchmarks/sdf_showcase/primitives/3D/capsule.png",
|
|
32
|
+
"benchmarks/sdf_showcase/primitives/3D/rounded_box.png",
|
|
77
33
|
"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
34
|
"benchmarks/sdf_showcase/primitives/3D/octahedron.png",
|
|
83
|
-
"benchmarks/sdf_showcase/primitives/3D/pyramid.png",
|
|
84
35
|
"benchmarks/sdf_showcase/primitives/3D/rounded_cylinder.png",
|
|
36
|
+
"benchmarks/sdf_showcase/primitives/3D/icosahedron.png",
|
|
85
37
|
"benchmarks/sdf_showcase/primitives/3D/box.png",
|
|
38
|
+
"benchmarks/sdf_showcase/primitives/3D/rounded_cone.png",
|
|
39
|
+
"benchmarks/sdf_showcase/primitives/3D/ellipsoid.png",
|
|
86
40
|
"benchmarks/sdf_showcase/primitives/3D/capped_cone.png",
|
|
87
|
-
"benchmarks/sdf_showcase/primitives/
|
|
88
|
-
"benchmarks/sdf_showcase/primitives/
|
|
89
|
-
"benchmarks/sdf_showcase/primitives/
|
|
90
|
-
"benchmarks/sdf_showcase/
|
|
91
|
-
"benchmarks/sdf_showcase/
|
|
92
|
-
"benchmarks/sdf_showcase/
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
41
|
+
"benchmarks/sdf_showcase/primitives/3D/torus.png",
|
|
42
|
+
"benchmarks/sdf_showcase/primitives/3D/pyramid.png",
|
|
43
|
+
"benchmarks/sdf_showcase/primitives/3D/tetrahedron.png",
|
|
44
|
+
"benchmarks/sdf_showcase/operations/transformations/repeat_sphere.png",
|
|
45
|
+
"benchmarks/sdf_showcase/operations/transformations/mirror_sphere.png",
|
|
46
|
+
"benchmarks/sdf_showcase/operations/transformations/circular_array_sphere.png",
|
|
47
|
+
"benchmarks/sdf_showcase/operations/transformations/dilate_sphere.png",
|
|
48
|
+
"benchmarks/sdf_showcase/operations/transformations/twist_torus.png",
|
|
49
|
+
"benchmarks/sdf_showcase/operations/transformations/revolve_circle.png",
|
|
50
|
+
"benchmarks/sdf_showcase/operations/transformations/shell_sphere.png",
|
|
51
|
+
"benchmarks/sdf_showcase/operations/boolean/union_sphere_box.png",
|
|
52
|
+
"benchmarks/sdf_showcase/operations/boolean/difference_sphere_box.png",
|
|
53
|
+
".github/copilot-instructions.md",
|
|
54
|
+
".github/workflows/copilot-setup-steps.yml",
|
|
55
|
+
".github/workflows/publish.yml",
|
|
56
|
+
".github/workflows/test.yml",
|
|
57
|
+
".github/workflows/docs.yml",
|
|
101
58
|
"DeepSDFStruct/SDF.py",
|
|
102
59
|
"DeepSDFStruct/design_of_experiments.py",
|
|
60
|
+
"DeepSDFStruct/lattice_structure.py",
|
|
61
|
+
"DeepSDFStruct/optimization.py",
|
|
103
62
|
"DeepSDFStruct/sampling.py",
|
|
104
|
-
"DeepSDFStruct/
|
|
63
|
+
"DeepSDFStruct/pretrained_models.py",
|
|
64
|
+
"DeepSDFStruct/utils.py",
|
|
105
65
|
"DeepSDFStruct/parametrization.py",
|
|
66
|
+
"DeepSDFStruct/local_shapes.py",
|
|
67
|
+
"DeepSDFStruct/mesh.py",
|
|
106
68
|
"DeepSDFStruct/torch_spline.py",
|
|
69
|
+
"DeepSDFStruct/sdf_primitives.py",
|
|
70
|
+
"DeepSDFStruct/sdf_operations.py",
|
|
71
|
+
"DeepSDFStruct/__init__.py",
|
|
107
72
|
"DeepSDFStruct/visualization/latent_viewer_cli.py",
|
|
108
73
|
"DeepSDFStruct/visualization/latent_viewer.py",
|
|
109
|
-
"DeepSDFStruct/flexicubes/__init__.py",
|
|
110
74
|
"DeepSDFStruct/flexicubes/tables.py",
|
|
111
75
|
"DeepSDFStruct/flexicubes/flexicubes.py",
|
|
112
|
-
"DeepSDFStruct/
|
|
113
|
-
"DeepSDFStruct/trained_models/
|
|
114
|
-
"DeepSDFStruct/trained_models/
|
|
115
|
-
"DeepSDFStruct/trained_models/
|
|
76
|
+
"DeepSDFStruct/flexicubes/__init__.py",
|
|
77
|
+
"DeepSDFStruct/trained_models/round_cross/specs.json",
|
|
78
|
+
"DeepSDFStruct/trained_models/round_cross/Logs.pth",
|
|
79
|
+
"DeepSDFStruct/trained_models/round_cross/ModelParameters/latest.pth",
|
|
80
|
+
"DeepSDFStruct/trained_models/round_cross/LatentCodes/latest.pth",
|
|
81
|
+
"DeepSDFStruct/trained_models/round_cross/OptimizerParameters/latest.pth",
|
|
116
82
|
"DeepSDFStruct/trained_models/test_experiment_hierarchical/specs.json",
|
|
117
83
|
"DeepSDFStruct/trained_models/test_experiment_hierarchical/training_summary.json",
|
|
118
84
|
"DeepSDFStruct/trained_models/test_experiment_hierarchical/LatentCodes/latent_code_data_map.json",
|
|
119
|
-
"DeepSDFStruct/trained_models/
|
|
85
|
+
"DeepSDFStruct/trained_models/primitives/specs.json",
|
|
86
|
+
"DeepSDFStruct/trained_models/primitives/ModelParameters/latest.pth",
|
|
87
|
+
"DeepSDFStruct/trained_models/primitives/LatentCodes/latest.pth",
|
|
88
|
+
"DeepSDFStruct/trained_models/primitives/OptimizerParameters/latest.pth",
|
|
89
|
+
"DeepSDFStruct/trained_models/analytic_round_cross/specs.json",
|
|
90
|
+
"DeepSDFStruct/trained_models/analytic_round_cross/ModelParameters/latest.pth",
|
|
91
|
+
"DeepSDFStruct/trained_models/analytic_round_cross/LatentCodes/latest.pth",
|
|
92
|
+
"DeepSDFStruct/trained_models/analytic_round_cross/OptimizerParameters/latest.pth",
|
|
120
93
|
"DeepSDFStruct/trained_models/test_experiment_homogenization/specs.json",
|
|
121
94
|
"DeepSDFStruct/trained_models/test_experiment_homogenization/training_summary.json",
|
|
122
|
-
"DeepSDFStruct/trained_models/test_experiment_homogenization/
|
|
123
|
-
"DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latent_code_data_map.json",
|
|
124
|
-
"DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latest.pth",
|
|
95
|
+
"DeepSDFStruct/trained_models/test_experiment_homogenization/Logs.png",
|
|
125
96
|
"DeepSDFStruct/trained_models/test_experiment_homogenization/ModelParameters/latest.pth",
|
|
126
|
-
"DeepSDFStruct/trained_models/
|
|
127
|
-
"DeepSDFStruct/trained_models/
|
|
128
|
-
"DeepSDFStruct/trained_models/
|
|
129
|
-
"DeepSDFStruct/trained_models/
|
|
97
|
+
"DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latest.pth",
|
|
98
|
+
"DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latent_code_data_map.json",
|
|
99
|
+
"DeepSDFStruct/trained_models/test_experiment_homogenization/OptimizerParameters/latest.pth",
|
|
100
|
+
"DeepSDFStruct/trained_models/primitives_2d/specs.json",
|
|
101
|
+
"DeepSDFStruct/trained_models/primitives_2d/ModelParameters/latest.pth",
|
|
102
|
+
"DeepSDFStruct/trained_models/primitives_2d/LatentCodes/latest.pth",
|
|
103
|
+
"DeepSDFStruct/trained_models/primitives_2d/OptimizerParameters/latest.pth",
|
|
130
104
|
"DeepSDFStruct/trained_models/test_experiment/specs.json",
|
|
131
105
|
"DeepSDFStruct/trained_models/test_experiment/training_summary.json",
|
|
132
106
|
"DeepSDFStruct/trained_models/test_experiment/LatentCodes/latent_code_data_map.json",
|
|
133
107
|
"DeepSDFStruct/trained_models/chi_and_cross/specs.json",
|
|
134
108
|
"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
109
|
"DeepSDFStruct/trained_models/chi_and_cross/ModelParameters/latest.pth",
|
|
138
|
-
"DeepSDFStruct/trained_models/
|
|
139
|
-
"DeepSDFStruct/trained_models/
|
|
140
|
-
"DeepSDFStruct/
|
|
141
|
-
"DeepSDFStruct/
|
|
142
|
-
"DeepSDFStruct/
|
|
143
|
-
"DeepSDFStruct/
|
|
144
|
-
"DeepSDFStruct/
|
|
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",
|
|
110
|
+
"DeepSDFStruct/trained_models/chi_and_cross/LatentCodes/latest.pth",
|
|
111
|
+
"DeepSDFStruct/trained_models/chi_and_cross/OptimizerParameters/latest.pth",
|
|
112
|
+
"DeepSDFStruct/splinepy_unitcells/cross_lattice.py",
|
|
113
|
+
"DeepSDFStruct/splinepy_unitcells/chi_3D.py",
|
|
114
|
+
"DeepSDFStruct/splinepy_unitcells/double_lattice_extruded.py",
|
|
115
|
+
"DeepSDFStruct/splinepy_unitcells/snappy_3d.py",
|
|
116
|
+
"DeepSDFStruct/splinepy_unitcells/__init__.py",
|
|
149
117
|
"DeepSDFStruct/deep_sdf/plotting.py",
|
|
150
|
-
"DeepSDFStruct/deep_sdf/__init__.py",
|
|
151
|
-
"DeepSDFStruct/deep_sdf/workspace.py",
|
|
152
118
|
"DeepSDFStruct/deep_sdf/create_screenshots_from_plyfiles.py",
|
|
119
|
+
"DeepSDFStruct/deep_sdf/data.py",
|
|
153
120
|
"DeepSDFStruct/deep_sdf/nn_utils.py",
|
|
121
|
+
"DeepSDFStruct/deep_sdf/workspace.py",
|
|
122
|
+
"DeepSDFStruct/deep_sdf/reconstruction.py",
|
|
154
123
|
"DeepSDFStruct/deep_sdf/training.py",
|
|
155
|
-
"DeepSDFStruct/deep_sdf/
|
|
124
|
+
"DeepSDFStruct/deep_sdf/models.py",
|
|
125
|
+
"DeepSDFStruct/deep_sdf/__init__.py",
|
|
156
126
|
"DeepSDFStruct/deep_sdf/metrics/mesh_to_analytical.py",
|
|
157
127
|
"DeepSDFStruct/deep_sdf/metrics/__init__.py",
|
|
158
|
-
"DeepSDFStruct/deep_sdf/networks/
|
|
128
|
+
"DeepSDFStruct/deep_sdf/networks/deep_sdf_decoder.py",
|
|
159
129
|
"DeepSDFStruct/deep_sdf/networks/analytic_round_cross.py",
|
|
160
|
-
"DeepSDFStruct/deep_sdf/networks/resnet_positional_sdf_decoder.py",
|
|
161
130
|
"DeepSDFStruct/deep_sdf/networks/hierarchical_positional_sdf_decoder.py",
|
|
131
|
+
"DeepSDFStruct/deep_sdf/networks/resnet_positional_sdf_decoder.py",
|
|
162
132
|
"DeepSDFStruct/deep_sdf/networks/hierarchical_deep_sdf_decoder.py",
|
|
163
|
-
"DeepSDFStruct/deep_sdf/networks/
|
|
164
|
-
"DeepSDFStruct/flexisquares/__init__.py",
|
|
133
|
+
"DeepSDFStruct/deep_sdf/networks/__init__.py",
|
|
165
134
|
"DeepSDFStruct/flexisquares/flexisquares.py",
|
|
166
135
|
"DeepSDFStruct/flexisquares/tables.py",
|
|
167
|
-
"DeepSDFStruct/
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
136
|
+
"DeepSDFStruct/flexisquares/__init__.py",
|
|
137
|
+
"tests/test_sdf_functions.py",
|
|
138
|
+
"tests/test_train_model.py",
|
|
139
|
+
"tests/test_flexisquares.py",
|
|
140
|
+
"tests/test_DOE.py",
|
|
141
|
+
"tests/test_sdf_trimesh_comparison.py",
|
|
142
|
+
"tests/test_mesh_functions.py",
|
|
143
|
+
"tests/test_lattice_evaluation.py",
|
|
144
|
+
"tests/test_networks.py",
|
|
145
|
+
"tests/test_pretrained_models.py",
|
|
146
|
+
"tests/test_elongate_sdf.py",
|
|
147
|
+
"tests/test_training_data_ids.py",
|
|
148
|
+
"tests/test_torch_spline.py",
|
|
149
|
+
"tests/test_reconstruction.py",
|
|
150
|
+
"tests/test_structural_optimization.py",
|
|
151
|
+
"tests/test_generate_dataset.py",
|
|
152
|
+
"tests/test_sdf_primitives.py",
|
|
153
|
+
"tests/test_sdf_from_mesh.py",
|
|
154
|
+
"tests/test_tet_orientation.py",
|
|
155
|
+
"tests/test_splinepy_unitcells.py",
|
|
156
|
+
"tests/test_mesh_export.py",
|
|
157
|
+
"tests/tmp_outputs/temp_file.txt",
|
|
158
|
+
"tests/data/stanford_bunny.stl",
|
|
159
|
+
"tests/data/sweep_test_case.stl",
|
|
160
|
+
"tests/data/example_line_mesh.vtk",
|
|
161
|
+
"tests/data/example_disconnectd_mesh.inp",
|
|
162
|
+
"tests/data/cone.stl",
|
|
163
|
+
"tests/data/circular_balls_test_case.stl",
|
|
164
|
+
"tests/data/chairs/1024.obj",
|
|
165
|
+
"tests/data/chairs/README.md",
|
|
166
|
+
"tests/data/chairs/1005.obj",
|
|
167
|
+
"docs/conf.py",
|
|
168
|
+
"docs/api_reference.rst",
|
|
169
|
+
"docs/Makefile",
|
|
170
|
+
"docs/make.bat",
|
|
171
|
+
"docs/qr_code_paper.png",
|
|
172
|
+
"docs/index.rst",
|
|
173
|
+
"docs/qr_code_github.png",
|
|
174
|
+
"docs/readme_images/example_output_03.png",
|
|
175
|
+
"docs/readme_images/example_output_02.png",
|
|
176
|
+
"docs/readme_images/example_output_04.png",
|
|
177
|
+
"docs/readme_images/example_output_01.png"
|
|
177
178
|
]
|
|
178
179
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""Regression tests for tetrahedron orientation in FlexiCubes output.
|
|
2
|
+
|
|
3
|
+
FlexiCubes' ``_tetrahedralize`` builds tets from two sub-procedures (surface
|
|
4
|
+
pyramids and interior edges) whose vertex orderings do not share a consistent
|
|
5
|
+
winding, so a large fraction of the elements used to come out inverted
|
|
6
|
+
(negative signed volume). That breaks FEA solvers, which require a positive
|
|
7
|
+
signed volume / Jacobian on every element. The interior sub-procedure can
|
|
8
|
+
additionally emit degenerate (exactly coplanar, zero-volume) tets, which are
|
|
9
|
+
removed during extraction. These tests pin both fixes: every tet returned by
|
|
10
|
+
FlexiCubes must have a strictly positive signed volume.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import torch
|
|
14
|
+
|
|
15
|
+
from DeepSDFStruct.flexicubes.flexicubes import FlexiCubes
|
|
16
|
+
from DeepSDFStruct.optimization import tet_signed_vol
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _sphere_volume_mesh(res=16, radius=0.7, center=(0.0, 0.0, 0.0)):
|
|
20
|
+
fc = FlexiCubes(device="cpu")
|
|
21
|
+
x_nx3, cube_fx8 = fc.construct_voxel_grid(
|
|
22
|
+
res, bounds=[[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]]
|
|
23
|
+
)
|
|
24
|
+
c = torch.tensor(center, dtype=x_nx3.dtype)
|
|
25
|
+
s_n = torch.linalg.norm(x_nx3 - c, dim=1) - radius
|
|
26
|
+
verts, tets, _ = fc(x_nx3, s_n, cube_fx8, res, output_tetmesh=True)
|
|
27
|
+
return verts, tets
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def test_orient_tets_flips_inverted_element():
|
|
31
|
+
"""A single inverted tet is flipped to positive signed volume."""
|
|
32
|
+
verts = torch.tensor(
|
|
33
|
+
[[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]
|
|
34
|
+
)
|
|
35
|
+
# [0, 1, 2, 3] is positively oriented; [0, 1, 3, 2] is its inversion.
|
|
36
|
+
tets = torch.tensor([[0, 1, 2, 3], [0, 1, 3, 2]])
|
|
37
|
+
|
|
38
|
+
assert (
|
|
39
|
+
tet_signed_vol(verts, tets) < 0
|
|
40
|
+
).any(), "fixture should contain an inversion"
|
|
41
|
+
|
|
42
|
+
oriented = FlexiCubes._orient_tets(verts, tets)
|
|
43
|
+
vols = tet_signed_vol(verts, oriented)
|
|
44
|
+
assert (vols > 0).all(), f"expected all positive volumes, got {vols.tolist()}"
|
|
45
|
+
# Orientation is fixed by reordering indices only: |volume| is preserved.
|
|
46
|
+
assert torch.allclose(vols.abs(), tet_signed_vol(verts, tets).abs())
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_orient_tets_handles_empty():
|
|
50
|
+
verts = torch.zeros((0, 3))
|
|
51
|
+
tets = torch.zeros((0, 4), dtype=torch.long)
|
|
52
|
+
assert FlexiCubes._orient_tets(verts, tets).shape == (0, 4)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def test_orient_tets_removes_degenerate_elements():
|
|
56
|
+
"""Zero-volume (coplanar) tets are dropped."""
|
|
57
|
+
verts = torch.tensor(
|
|
58
|
+
[
|
|
59
|
+
[0.0, 0.0, 0.0],
|
|
60
|
+
[1.0, 0.0, 0.0],
|
|
61
|
+
[0.0, 1.0, 0.0],
|
|
62
|
+
[0.0, 0.0, 1.0],
|
|
63
|
+
[1.0, 1.0, 0.0], # coplanar with the first three (z = 0 plane)
|
|
64
|
+
]
|
|
65
|
+
)
|
|
66
|
+
tets = torch.tensor([[0, 1, 2, 3], [0, 1, 2, 4]])
|
|
67
|
+
|
|
68
|
+
oriented = FlexiCubes._orient_tets(verts, tets)
|
|
69
|
+
|
|
70
|
+
assert oriented.shape == (1, 4)
|
|
71
|
+
assert (tet_signed_vol(verts, oriented) > 0).all()
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def test_flexicubes_volume_mesh_has_only_positive_tets():
|
|
75
|
+
"""End-to-end: extracted volume mesh has strictly positive signed volumes."""
|
|
76
|
+
for center in [(0.0, 0.0, 0.0), (0.13, 0.07, 0.21)]:
|
|
77
|
+
verts, tets = _sphere_volume_mesh(center=center)
|
|
78
|
+
assert tets.shape[0] > 0
|
|
79
|
+
vols = tet_signed_vol(verts, tets)
|
|
80
|
+
n_bad = int((vols <= 0).sum())
|
|
81
|
+
assert n_bad == 0, f"{n_bad} non-positive tets for center {center}"
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if __name__ == "__main__":
|
|
85
|
+
test_orient_tets_flips_inverted_element()
|
|
86
|
+
test_orient_tets_handles_empty()
|
|
87
|
+
test_flexicubes_volume_mesh_has_only_positive_tets()
|
|
88
|
+
print("ok")
|