ca62319688
Sharp Edge Pipeline V02:
- export_step_to_gltf.py: replace BRep_Tool.Polygon3D_s (returns None in XCAF) with
GCPnts_UniformAbscissa curve sampling at 0.3mm step — extracts 17,129 segment pairs
- Inject sharp_edge_pairs + sharp_threshold_deg into GLB extras (scenes[0].extras)
via binary GLB JSON-chunk patching (no extra dependency)
- export_gltf.py: read schaeffler_sharp_edge_pairs from Blender scene custom props,
apply via KD-tree to mark edges sharp=True + seam=True (OCC mm Z-up → Blender transform)
- tools/restore_sharp_marks.py: dual-pass (dihedral angle + OCC pairs), updated coordinate
transform (X, -Z, Y) * 0.001
Tessellation:
- Admin UI: Draft / Standard / Fine preset buttons with active-state highlighting
- Default angular deflection: preview 0.5→0.1 rad, production 0.2→0.05 rad
- export_glb.py: read updated defaults from system_settings
Media / Cache:
- media/service.py: get_download_url appends ?v={file_size_bytes} cache-buster
- media/router.py: Cache-Control: no-cache for all download/thumbnail endpoints
Render pipeline:
- still_render.py / turntable_render.py: shared GPU activation + camera improvements
- render_order_line.py: global render position support
- render_thumbnail.py: updated defaults
Frontend:
- InlineCadViewer: file_size_bytes-aware URL update triggers re-fetch on regeneration
- ThreeDViewer: material panel, part selection, PBR mode improvements
- Admin.tsx: tessellation preset cards, GMSH setting dropdown
- MediaBrowser, ProductDetail, OrderDetail, Orders: various UI improvements
- New: MaterialPanel, GlobalRenderPositionsPanel, StepIndicator components
- New: renderPositions.ts API client
Plans / Docs:
- plan.md: GMSH Frontal-Delaunay tessellation plan (6 tasks)
- LEARNINGS.md: OCC Polygon3D_s None issue + GCPnts fix
- .gitignore: add backend/core (core dump from root process)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
67 lines
2.3 KiB
TypeScript
67 lines
2.3 KiB
TypeScript
import { CheckCircle2 } from 'lucide-react'
|
|
|
|
interface StepIndicatorProps {
|
|
step: number // current step (1-based)
|
|
total: number
|
|
labels: string[]
|
|
}
|
|
|
|
export default function StepIndicator({ step, total, labels }: StepIndicatorProps) {
|
|
return (
|
|
<>
|
|
{/* Mobile: simple text */}
|
|
<div className="md:hidden flex items-center justify-center py-3">
|
|
<span className="text-sm font-medium text-content-secondary">
|
|
Step {step} of {total}
|
|
{labels[step - 1] ? ` — ${labels[step - 1]}` : ''}
|
|
</span>
|
|
</div>
|
|
|
|
{/* Desktop: full step bar */}
|
|
<div className="hidden md:flex items-center w-full mb-6">
|
|
{Array.from({ length: total }, (_, i) => {
|
|
const num = i + 1
|
|
const isCompleted = num < step
|
|
const isActive = num === step
|
|
const isFuture = num > step
|
|
|
|
return (
|
|
<div key={num} className="flex items-center flex-1 last:flex-none">
|
|
{/* Step circle + label */}
|
|
<div className="flex flex-col items-center gap-1">
|
|
<div
|
|
className={`w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold transition-colors ${
|
|
isCompleted
|
|
? 'bg-accent text-accent-text'
|
|
: isActive
|
|
? 'bg-accent text-accent-text ring-4 ring-accent-light'
|
|
: 'bg-surface-muted text-content-muted border border-border-default'
|
|
}`}
|
|
>
|
|
{isCompleted ? <CheckCircle2 size={16} /> : num}
|
|
</div>
|
|
<span
|
|
className={`text-xs font-medium whitespace-nowrap ${
|
|
isActive ? 'text-accent' : isFuture ? 'text-content-muted' : 'text-content-secondary'
|
|
}`}
|
|
>
|
|
{labels[i] ?? `Step ${num}`}
|
|
</span>
|
|
</div>
|
|
|
|
{/* Connector line (not after last step) */}
|
|
{num < total && (
|
|
<div
|
|
className={`flex-1 h-0.5 mx-2 mt-[-16px] transition-colors ${
|
|
isCompleted ? 'bg-accent' : 'bg-border-default'
|
|
}`}
|
|
/>
|
|
)}
|
|
</div>
|
|
)
|
|
})}
|
|
</div>
|
|
</>
|
|
)
|
|
}
|