Skip to content

feat: add RobertEngine — fabric physics module for garment overlay rendering#106

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-pilot-fabric-physics
Draft

feat: add RobertEngine — fabric physics module for garment overlay rendering#106
Copilot wants to merge 2 commits intomainfrom
copilot/update-pilot-fabric-physics

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

Implements the TRYONYOU V10 fabric physics engine that computes garment overlay render metrics (width, height, alpha, sheen) from biometrically-detected volumetry — no user-supplied weight or size required.

New: api/robert_engine.py

  • PILOT_FABRIC_PHYSICS — 5 Lafayette collection fabrics with physical properties (drape coefficient, GSM, elasticity, friction)
  • calculate_lafayette_factor — silhouette width multiplier derived from drape coefficient
  • calculate_gravity_stretch — longitudinal elongation from GSM weight, capped at 15% per patent PCT/EP2025/067317
  • calculate_dynamic_alpha — transparency with sinusoidal "breathing" pulse when fit < 95%
  • get_render_metrics — primary API returning width, height, alpha, is_shiny, is_scanning, patent_id

Fixes a falsy-zero bug from the reference spec: if not timestampif timestamp is None, which caused timestamp=0 to be silently discarded.

engine = RobertEngine()
metrics = engine.get_render_metrics("silk_haussmann", shoulder_w=450, torso_h=800, fit_score=88)
# {"width": 1062.0, "height": 803.4, "alpha": 0.85, "is_shiny": True,
#  "is_scanning": True, "patent_id": "PCT/EP2025/067317"}

New: tests/test_robert_engine.py

29 unittest cases covering constants, all three physics methods (including GSM floor/ceiling clamping, alpha floor/ceiling), end-to-end get_render_metrics, and custom fabric injection via the constructor.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tryonyou-pilot Error Error Apr 7, 2026 1:36pm

Request Review

Copilot AI changed the title [WIP] Update pilot fabric physics properties feat: add RobertEngine — fabric physics module for garment overlay rendering Apr 7, 2026
Copilot AI requested a review from LVT-ENG April 7, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants