Files
HartOMat/backend/alembic/versions/039_cad_mesh_attributes.py
Hartmut 716451ff76 feat(D): OCC mesh attribute extraction + Blender smooth shading integration
Migration 039: cad_files.mesh_attributes JSONB column.
domains/products/tasks.py: extract_mesh_attributes Celery task using pythonOCC.
still_render.py + turntable_render.py: _apply_mesh_attributes() sets auto-smooth
based on curved_ratio and topology threshold from OCC analysis.
render_blender.py: passes --mesh-attributes JSON arg to Blender subprocess.
render_still_task: loads mesh_attributes from DB and passes to renderer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 17:07:55 +01:00

20 lines
428 B
Python

"""Add mesh_attributes JSONB column to cad_files.
Revision ID: 039
Revises: 038
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects.postgresql import JSONB
revision = '039'
down_revision = '038'
branch_labels = None
depends_on = None
def upgrade():
op.add_column('cad_files', sa.Column('mesh_attributes', JSONB, nullable=True))
def downgrade():
op.drop_column('cad_files', 'mesh_attributes')