metafold 0.12.dev10__tar.gz → 0.12.dev11__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.
- {metafold-0.12.dev10 → metafold-0.12.dev11}/PKG-INFO +1 -1
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/simulation/compression_simulation.py +1 -1
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/simulation/run_experiment.py +6 -3
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold.egg-info/PKG-INFO +1 -1
- {metafold-0.12.dev10 → metafold-0.12.dev11}/pyproject.toml +1 -1
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_compression_simulation.py +30 -25
- {metafold-0.12.dev10 → metafold-0.12.dev11}/LICENSE +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/README.md +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/__init__.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/api.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/assets.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/auth.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/client.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/exceptions.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/jobs.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/materials.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/projects.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/simulation/__init__.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/simulation/compression_experiment.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/utils.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold/workflows.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold.egg-info/SOURCES.txt +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold.egg-info/dependency_links.txt +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold.egg-info/requires.txt +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/metafold.egg-info/top_level.txt +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/setup.cfg +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_assets.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_compession_experiment.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_jobs.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_materials.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_projects.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_run_experiment.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_shear_simulation.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_utils.py +0 -0
- {metafold-0.12.dev10 → metafold-0.12.dev11}/tests/test_workflows.py +0 -0
|
@@ -437,7 +437,7 @@ class CompressionSimulation:
|
|
|
437
437
|
WorkflowStep(WorkflowStepType.VON_MISES_STRESS),
|
|
438
438
|
WorkflowStep(WorkflowStepType.EFFECTIVE_STRAIN),
|
|
439
439
|
WorkflowStep(WorkflowStepType.FORCE_DISPLACEMENT),
|
|
440
|
-
|
|
440
|
+
# stress_strain is opt-in (not default): callers add it via workflow_steps.
|
|
441
441
|
WorkflowStep(WorkflowStepType.PARTICLE_DISPLACEMENT),
|
|
442
442
|
WorkflowStep(WorkflowStepType.ENERGY_METRICS),
|
|
443
443
|
],
|
|
@@ -98,12 +98,15 @@ Available material presets
|
|
|
98
98
|
"material_pla", "material_stainless_steel",
|
|
99
99
|
"material_ti64", "material_tpu"
|
|
100
100
|
|
|
101
|
-
Available workflow steps (default: all)
|
|
102
|
-
|
|
101
|
+
Available workflow steps (default: all except stress_strain)
|
|
102
|
+
------------------------------------------------------------
|
|
103
103
|
"compute_bvh", "metrics", "compress", "von_mises_stress",
|
|
104
|
-
"effective_strain", "force_displacement",
|
|
104
|
+
"effective_strain", "force_displacement",
|
|
105
105
|
"particle_displacement", "energy_metrics"
|
|
106
106
|
|
|
107
|
+
Opt-in (not run by default; add explicitly to workflow_steps):
|
|
108
|
+
"stress_strain"
|
|
109
|
+
|
|
107
110
|
Zip format (for run_experiment_from_zip)
|
|
108
111
|
-----------------------------------------
|
|
109
112
|
A zip containing:
|
|
@@ -565,24 +565,6 @@ jobs:
|
|
|
565
565
|
- compress
|
|
566
566
|
assets:
|
|
567
567
|
data: compress
|
|
568
|
-
stress-strain-upper_foam:
|
|
569
|
-
type: sim/postprocess/stress-strain
|
|
570
|
-
needs:
|
|
571
|
-
- force-displacement
|
|
572
|
-
assets:
|
|
573
|
-
data: force-displacement
|
|
574
|
-
stress-strain-midsole:
|
|
575
|
-
type: sim/postprocess/stress-strain
|
|
576
|
-
needs:
|
|
577
|
-
- force-displacement
|
|
578
|
-
assets:
|
|
579
|
-
data: force-displacement
|
|
580
|
-
stress-strain-outsole:
|
|
581
|
-
type: sim/postprocess/stress-strain
|
|
582
|
-
needs:
|
|
583
|
-
- force-displacement
|
|
584
|
-
assets:
|
|
585
|
-
data: force-displacement
|
|
586
568
|
particle-displacement:
|
|
587
569
|
type: sim/postprocess/particle-displacement
|
|
588
570
|
needs:
|
|
@@ -638,12 +620,6 @@ jobs:
|
|
|
638
620
|
"metrics-upper_foam.volume_resolution": "[32, 32, 16]",
|
|
639
621
|
"metrics-upper_foam.volume_size": "[0.1, 0.1, 0.05]",
|
|
640
622
|
"particle-displacement.keys": "[\"/material0/position\", \"/material1/position\", \"/material2/position\", \"/material3/position\"]",
|
|
641
|
-
"stress-strain-midsole.initial_length": "0.05",
|
|
642
|
-
"stress-strain-midsole.keys": "[\"/force_displacement\"]",
|
|
643
|
-
"stress-strain-outsole.initial_length": "0.05",
|
|
644
|
-
"stress-strain-outsole.keys": "[\"/force_displacement\"]",
|
|
645
|
-
"stress-strain-upper_foam.initial_length": "0.05",
|
|
646
|
-
"stress-strain-upper_foam.keys": "[\"/force_displacement\"]",
|
|
647
623
|
"von-mises-stress.keys": "[\"/material0/cauchy_stress\", \"/material1/cauchy_stress\", \"/material2/cauchy_stress\", \"/material3/cauchy_stress\"]"
|
|
648
624
|
}
|
|
649
625
|
""")
|
|
@@ -653,7 +629,8 @@ jobs:
|
|
|
653
629
|
|
|
654
630
|
|
|
655
631
|
class TestStressStrainPerPart:
|
|
656
|
-
"""stress-strain runs once per deformable part (not one representative).
|
|
632
|
+
"""stress-strain runs once per deformable part (not one representative).
|
|
633
|
+
It is opt-in: callers must add the step to workflow_steps."""
|
|
657
634
|
|
|
658
635
|
def _built_sim(self, ply_folder, basic_parts, tmp_path):
|
|
659
636
|
sim = CompressionSimulation(
|
|
@@ -662,6 +639,12 @@ class TestStressStrainPerPart:
|
|
|
662
639
|
stl_folder_path=str(ply_folder),
|
|
663
640
|
output_path=str(tmp_path / "out"),
|
|
664
641
|
client=MagicMock(),
|
|
642
|
+
# stress_strain is not default; opt in (needs compress + force-displacement).
|
|
643
|
+
workflow_steps=[
|
|
644
|
+
WorkflowStep(WorkflowStepType.COMPRESS),
|
|
645
|
+
WorkflowStep(WorkflowStepType.FORCE_DISPLACEMENT),
|
|
646
|
+
WorkflowStep(WorkflowStepType.STRESS_STRAIN),
|
|
647
|
+
],
|
|
665
648
|
)
|
|
666
649
|
# Distinct X/Y so compression_area = X*Y is unambiguous.
|
|
667
650
|
fake_patch = {"size": [0.1, 0.2, 0.05], "offset": [0.0, 0.0, 0.0], "resolution": [32, 32, 16]}
|
|
@@ -673,6 +656,16 @@ class TestStressStrainPerPart:
|
|
|
673
656
|
sim.build_workflow()
|
|
674
657
|
return sim
|
|
675
658
|
|
|
659
|
+
def test_not_run_by_default(self, ply_folder, basic_parts, tmp_path):
|
|
660
|
+
sim = CompressionSimulation(
|
|
661
|
+
parts=basic_parts,
|
|
662
|
+
simulation_name="t",
|
|
663
|
+
stl_folder_path=str(ply_folder),
|
|
664
|
+
output_path=str(tmp_path / "out"),
|
|
665
|
+
client=MagicMock(),
|
|
666
|
+
)
|
|
667
|
+
assert not sim._contains_step(WorkflowStepType.STRESS_STRAIN)
|
|
668
|
+
|
|
676
669
|
def test_one_job_per_deformable_part(self, ply_folder, basic_parts, tmp_path):
|
|
677
670
|
sim = self._built_sim(ply_folder, basic_parts, tmp_path)
|
|
678
671
|
for name in ("upper_foam", "midsole", "outsole"):
|
|
@@ -721,6 +714,18 @@ class TestMakeManifestV2:
|
|
|
721
714
|
stl_folder_path=str(ply_folder),
|
|
722
715
|
output_path=str(tmp_path / "out"),
|
|
723
716
|
client=MagicMock(),
|
|
717
|
+
# Every step, including opt-in stress_strain, so all cards render.
|
|
718
|
+
workflow_steps=[
|
|
719
|
+
WorkflowStep(WorkflowStepType.COMPUTE_BVH),
|
|
720
|
+
WorkflowStep(WorkflowStepType.METRICS),
|
|
721
|
+
WorkflowStep(WorkflowStepType.COMPRESS),
|
|
722
|
+
WorkflowStep(WorkflowStepType.VON_MISES_STRESS),
|
|
723
|
+
WorkflowStep(WorkflowStepType.EFFECTIVE_STRAIN),
|
|
724
|
+
WorkflowStep(WorkflowStepType.FORCE_DISPLACEMENT),
|
|
725
|
+
WorkflowStep(WorkflowStepType.STRESS_STRAIN),
|
|
726
|
+
WorkflowStep(WorkflowStepType.PARTICLE_DISPLACEMENT),
|
|
727
|
+
WorkflowStep(WorkflowStepType.ENERGY_METRICS),
|
|
728
|
+
],
|
|
724
729
|
)
|
|
725
730
|
# In the real flow create_sim_config() assigns material indices before
|
|
726
731
|
# make_manifest_v2() runs; mirror that so per-part cards key correctly.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|