feat: add knowledge-driven joint design studio
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from src.knowledge_adapter import generate_single_gear_variants
|
||||
|
||||
|
||||
def test_single_gear_variants_are_solved_and_keep_baseline_immutable() -> None:
|
||||
result = generate_single_gear_variants()
|
||||
assert result["enabled"] is True
|
||||
assert result["candidateCount"] == 13
|
||||
assert result["baseline"] == {
|
||||
"z_sun": 20,
|
||||
"z_planet": 55,
|
||||
"z_ring": 130,
|
||||
"planet_count": 3,
|
||||
"module_mm": 0.5,
|
||||
}
|
||||
assert len({candidate["ratio"] for candidate in result["candidates"]}) == 13
|
||||
for candidate in result["candidates"]:
|
||||
parameters = candidate["parameters"]
|
||||
assert parameters["zRing"] == parameters["zSun"] + 2 * parameters["zPlanet"]
|
||||
assert candidate["constraints"]["equalSpacing"] is True
|
||||
assert candidate["constraints"]["planetClearance"] is True
|
||||
assert candidate["constraints"]["kinematicResidual"] < 1e-10
|
||||
assert candidate["speeds"]["ring"] == 0.0
|
||||
assert candidate["cadGenerated"] is False
|
||||
Reference in New Issue
Block a user