Skip to content

Feat/add cad to bom#499

Open
jeebeez wants to merge 25 commits intomainfrom
feat/add-cad-to-bom
Open

Feat/add cad to bom#499
jeebeez wants to merge 25 commits intomainfrom
feat/add-cad-to-bom

Conversation

@jeebeez
Copy link
Collaborator

@jeebeez jeebeez commented Feb 12, 2026

What does this PR do?

Carbon Smithy

  • Parse CAD models using OCC
  • Disassembles them using contact graphs, part specification, and collision detection
  • Create an assembly plan

TODO:

  • Improve path for the parts on dissassembles
  • Improve UI for the viewer
    • Play each step
    • Improve the look of UI
    • Wire annotations and tools
  • Integrate PLMs for better Metadata and classifications

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Run npm run dev:assembly
  • Run npm run dev:cad
  • Upload a part(assembly) .step file
  • Play around with generated

CAD services default to localhost:8000 and localhost:8080

Only set these if running services on a remote machine

CAD_SERVICE_URL="http://localhost:8000"

CAD_SERVER_URL="http://localhost:8080"

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

jeebeez and others added 22 commits January 14, 2026 22:36
- Fix simulator: start collision sweep at step 1 (skip rest-position contact),
  auto-scale removal_distance to 2x bounding box diagonal, add 12 diagonal
  directions for interlocking geometries (L-brackets)
- Move simulation to spawn_blocking to avoid blocking async runtime
- Enable entityOffsetsEnabled in xeokit viewer for per-entity animation
- Add useAnimationPlayback hook with RAF loop and keyframe interpolation
- Convert Rust Matrix4 animation data to position offsets in route loader
- Wire animation engine into WorkInstructionEditor and PlaybackControls

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 1: Remove sidebar from layout, minimalize topbar (logo + avatar)
Phase 2: Merged home screen with project cards grid, search, status filters
Phase 3: Upload modal with auto-pipeline (parse → simulate → done)
- NewProjectModal with dropzone + live progress polling
- Auto-chain simulation after parse in step-parser-occ job
- Resource route for lightweight status polling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The left sidebar now overlays the 3D viewer instead of eating into its
width. It slides in/out with a toggle chevron button, uses backdrop-blur
for a glass effect, and gives the viewer full width when collapsed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Back arrow links to home (/x), not project overview
- Click-to-edit project name with inline input
- Status badge with color coding
- "..." dropdown with Export, Settings, Re-run Simulation, Delete
- Name changes save via fetcher with updateName intent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Convert 5 old routes to redirect stubs:
- projects._index → /x (home)
- projects.new → /x (home, use modal now)
- projects.$id._index → projects.$id.edit (direct to editor)
- projects.$id.prep → projects.$id.edit (merged into editor)
- projects.$id.export → projects.$id.edit (will be modal)

Delete Layout/Sidebar.tsx (removed from layout in Phase 1)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move export functionality from route page into modal triggered from
editor "..." menu. Tabbed interface: Share Links, Video, PDF, Mobile.
Share link creation uses fetcher to POST to edit route action.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Right-side drawer triggered from editor "..." menu. Three tabs load
data from existing settings routes via useFetcher and support add/delete.
Links to full settings pages for advanced management.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed entity ID lookup: xeokit uses UUIDs as entity IDs (not Part_XX names)
- Removed unnecessary UUID→name mapping that was causing lookup failures
- Fixed infinite re-render loop by using refs for callback props in XeokitCanvas
- Added isModelLoaded state tracking to ensure animations only play after model loads
- Fixed React Strict Mode double-mount issues with cancelled flags
- Added proper cleanup for model loading effects
- Properly cast Supabase Json types to string[] in route loader

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ComponentTree: Only show folder icon for assemblies with >1 children
- WorkInstructionEditor: Add useEffect to sync highlighting with selectedNodeId
- Clicking a part in the viewer now highlights it in the 3D view as well
- Selection state is now properly synced between tree and viewer

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When clicking a part in the 3D viewer, the tree now automatically
expands any collapsed parent folders to reveal the selected node.
Uses containsNodeId helper to check if selectedNodeId is a descendant.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Backend (Rust):
- Add contact graph for part relationship detection (parry3d distance queries)
- Add part classification (fastener/structural/panel scoring)
- Add dependency graph with topological sort for assembly constraints
- Add DFM overlap detection in assembled state with SimulationIssue types
- Add PlannerStats for observability (collision checks, path evaluations)
- Rework path planner to require high completion ratio (90%+)
- Generate dense collision-validated keyframes per step
- Add internal deadline checks to prevent planner timeouts
- Track baseline overlap states to allow separation but block worsening

Frontend (TypeScript):
- Fix animation playback to follow full sampled keyframe trajectories
- Add piecewise interpolation (evaluatePartOffset) instead of endpoint-only
- Fix keyframe conversion to preserve rotation metadata
- Handle both Rust matrix keyframes and previously saved frontend keyframes
- Align simulation types with Rust response schema

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Enable swept_aabb_entry_time() for production use (was test-only)
- Skip collision sampling until first potential AABB intersection
- Reduce MAX_MOTION_SAMPLING_STEPS from 220 to 100
- Increase step size from 0.25 to 0.4 of min dimension
- Reduce binary search iterations from 10 to 6
- Loosen binary search tolerance from 1e-5 to 1e-4

Results on sample assembly (18 parts):
- Before: 54,008 ms, 33,328 collision checks
- After:  512 ms, 25,476 collision checks
- Same 18 steps, same assembly order

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, path planning only checked collisions against parts that
hadn't been removed yet during disassembly simulation. When reversed
for assembly animation, this caused parts to clip through other parts
that would be assembled later.

Now path planning checks collisions against ALL parts (except the one
being moved). This ensures paths are valid for assembly in any order,
fixing the clipping issue during animation playback.

Slight performance impact: 512ms → 747ms (still very fast)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- added readme and instructions and streamlined setup for local dev
@vercel
Copy link

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
academy Ready Ready Preview, Comment Feb 12, 2026 9:32am
carbon Ready Ready Preview, Comment Feb 12, 2026 9:32am
mes Ready Ready Preview, Comment Feb 12, 2026 9:32am

Request Review

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.

1 participant