feat: extract workflow bbox services phase 3
This commit is contained in:
@@ -117,7 +117,7 @@ def render_step_thumbnail(self, cad_file_id: str):
|
||||
# ── Post-render: bbox + sharp edges + materials (single session) ──────
|
||||
try:
|
||||
from app.models.cad_file import CadFile
|
||||
from app.domains.pipeline.tasks.extract_metadata import _bbox_from_glb, _bbox_from_step_cadquery
|
||||
from app.domains.rendering.workflow_runtime_services import resolve_cad_bbox
|
||||
|
||||
with _pipeline_session(_tenant_id) as session:
|
||||
cad = session.get(CadFile, cad_file_id)
|
||||
@@ -131,7 +131,7 @@ def render_step_thumbnail(self, cad_file_id: str):
|
||||
if step_path and not attrs.get("dimensions_mm"):
|
||||
_step = Path(step_path)
|
||||
_glb = _step.parent / f"{_step.stem}_thumbnail.glb"
|
||||
bbox_data = _bbox_from_glb(str(_glb)) or _bbox_from_step_cadquery(step_path)
|
||||
bbox_data = resolve_cad_bbox(step_path, glb_path=str(_glb)).bbox_data
|
||||
if bbox_data:
|
||||
cad.mesh_attributes = {**attrs, **bbox_data}
|
||||
attrs = cad.mesh_attributes
|
||||
|
||||
Reference in New Issue
Block a user