95cfe0aa93
- export_step_to_gltf.py: STEP→GLB via RWGltf_CafWriter + BRepBuilderAPI_Transform (mm→m pre-scaling, XCAFDoc_ShapeTool.GetComponents_s static method) - Blender scripts (blender_render.py, still_render.py, turntable_render.py, export_gltf.py, export_blend.py): import GLB instead of STL, remove _scale_mm_to_m - step_tasks.py: add generate_gltf_production_task, remove generate_stl_cache, replace _bbox_from_stl with _bbox_from_glb (trimesh), auto-queue geometry GLB after thumbnail render - render_blender.py: replace _stl_from_cache_or_convert with _glb_from_step, remove convert_step_to_stl and export_per_part_stls - domains/rendering/tasks.py: update render_turntable_task, export_gltf/blend tasks to use GLB instead of STL - cad.py: remove STL download/generate endpoints, add generate-gltf-production - admin.py: generate-missing-stls → generate-missing-geometry-glbs - Frontend: replace STL cache UI with GLB generate buttons, remove stl_cached field Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
73 lines
2.1 KiB
Python
73 lines
2.1 KiB
Python
import uuid
|
|
from datetime import datetime
|
|
from pydantic import BaseModel
|
|
from app.domains.rendering.schemas import RenderPositionOut
|
|
|
|
|
|
class ProductCreate(BaseModel):
|
|
pim_id: str
|
|
name: str | None = None
|
|
category_key: str | None = None
|
|
ebene1: str | None = None
|
|
ebene2: str | None = None
|
|
baureihe: str | None = None
|
|
produkt_baureihe: str | None = None
|
|
lagertyp: str | None = None
|
|
name_cad_modell: str | None = None
|
|
gewuenschte_bildnummer: str | None = None
|
|
medias_rendering: bool | None = None
|
|
components: list[dict] = []
|
|
cad_part_materials: list[dict] = []
|
|
notes: str | None = None
|
|
is_active: bool = True
|
|
source_excel: str | None = None
|
|
|
|
|
|
class ProductPatch(BaseModel):
|
|
name: str | None = None
|
|
category_key: str | None = None
|
|
ebene1: str | None = None
|
|
ebene2: str | None = None
|
|
baureihe: str | None = None
|
|
produkt_baureihe: str | None = None
|
|
lagertyp: str | None = None
|
|
name_cad_modell: str | None = None
|
|
gewuenschte_bildnummer: str | None = None
|
|
medias_rendering: bool | None = None
|
|
components: list[dict] | None = None
|
|
cad_part_materials: list[dict] | None = None
|
|
notes: str | None = None
|
|
is_active: bool | None = None
|
|
|
|
|
|
class ProductOut(BaseModel):
|
|
id: uuid.UUID
|
|
pim_id: str
|
|
name: str | None
|
|
category_key: str | None
|
|
ebene1: str | None
|
|
ebene2: str | None
|
|
baureihe: str | None
|
|
produkt_baureihe: str | None
|
|
lagertyp: str | None
|
|
name_cad_modell: str | None
|
|
gewuenschte_bildnummer: str | None
|
|
medias_rendering: bool | None
|
|
components: list[dict]
|
|
cad_part_materials: list[dict]
|
|
cad_file_id: uuid.UUID | None
|
|
thumbnail_url: str | None = None
|
|
render_image_url: str | None = None
|
|
processing_status: str | None = None
|
|
cad_parsed_objects: list[str] | None = None
|
|
cad_mesh_attributes: dict | None = None
|
|
arbeitspaket: str | None = None
|
|
notes: str | None
|
|
is_active: bool
|
|
source_excel: str | None
|
|
render_positions: list[RenderPositionOut] = []
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
|
|
model_config = {"from_attributes": True}
|